/* Midas Branding */
:root {
    --midas-yellow: #FFB81C;
    --midas-black: #1A1A1A;
    --midas-dark-gray: #2D2D2D;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* ============================================================
   LIGHT THEME (default)
   ============================================================ */
body {
    margin-bottom: 60px;
    background-color: #f8f9fa;
    color: #212529;
    transition: background-color 0.3s, color 0.3s;
}

.card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
    background-color: #fff;
}

.table {
    color: #212529;
}

.progress-circle::before {
    background: white;
}

.progress-circle-value {
    color: var(--midas-black);
}

/* ============================================================
   DARK THEME
   ============================================================ */
body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-theme .card {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e0e0e0;
}

body.dark-theme .card-body {
    color: #e0e0e0;
}

body.dark-theme .table {
    color: #e0e0e0;
}

body.dark-theme .table-light {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}

body.dark-theme .table-light th {
    color: #e0e0e0 !important;
}

body.dark-theme .table-hover tbody tr:hover {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-theme .table-striped > tbody > tr:nth-of-type(odd) {
    color: #e0e0e0;
    background-color: rgba(255, 255, 255, 0.03);
}

body.dark-theme .table-success {
    background-color: #1a3a2a !important;
    color: #a3d9b1 !important;
}

body.dark-theme .table-warning {
    background-color: #3a3520 !important;
    color: #f0d080 !important;
}

body.dark-theme .table-secondary {
    background-color: #2a2a2a !important;
    color: #999 !important;
}

body.dark-theme .table-dark {
    background-color: var(--midas-black);
}

body.dark-theme .form-control,
body.dark-theme .form-select {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-theme .form-control::placeholder {
    color: #777;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-theme .form-text {
    color: #888 !important;
}

body.dark-theme .form-check-label {
    color: #e0e0e0;
}

body.dark-theme .text-muted {
    color: #888 !important;
}

body.dark-theme .text-dark {
    color: #e0e0e0 !important;
}

body.dark-theme .list-group-item {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e0e0e0;
}

body.dark-theme .alert-success {
    background-color: #1a3a2a;
    border-color: #2a5a3a;
    color: #a3d9b1;
}

body.dark-theme .alert-danger {
    background-color: #3a1a1a;
    border-color: #5a2a2a;
    color: #d9a3a3;
}

body.dark-theme .progress-circle::before {
    background: #1e1e1e;
}

body.dark-theme .progress-circle-value {
    color: #e0e0e0;
}

body.dark-theme .accordion-body {
    background-color: #1e1e1e;
}

body.dark-theme .btn-outline-secondary {
    color: #aaa;
    border-color: #555;
}

body.dark-theme .btn-outline-secondary:hover {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-theme .btn-outline-primary {
    color: #6ea8fe;
    border-color: #6ea8fe;
}

body.dark-theme .btn-outline-danger {
    color: #ea868f;
    border-color: #ea868f;
}

body.dark-theme .btn-outline-dark {
    color: #e0e0e0;
    border-color: #666;
}

body.dark-theme a:not(.btn):not(.nav-link):not(.navbar-brand):not(.badge) {
    color: #6ea8fe;
}

body.dark-theme hr {
    border-color: #444;
}

/* ============================================================
   SHARED STYLES (both themes)
   ============================================================ */

/* Brand Colors */
.bg-midas-black {
    background-color: var(--midas-black) !important;
}

.bg-midas-yellow {
    background-color: var(--midas-yellow) !important;
}

.text-midas-yellow {
    color: var(--midas-yellow) !important;
}

.border-midas-yellow {
    border-color: var(--midas-yellow) !important;
}

/* Midas Yellow Button */
.btn-midas-yellow {
    background-color: var(--midas-yellow);
    border-color: var(--midas-yellow);
    color: var(--midas-black);
}

.btn-midas-yellow:hover {
    background-color: #e5a519;
    border-color: #e5a519;
    color: var(--midas-black);
}

.btn-midas-yellow:active,
.btn-midas-yellow:focus {
    background-color: #cc9316;
    border-color: #cc9316;
    color: var(--midas-black);
    box-shadow: 0 0 0 0.25rem rgba(255, 184, 28, 0.5);
}

/* Navbar */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--midas-yellow);
}

/* Accordion overrides */
.accordion-button:not(.collapsed) {
    background-color: var(--midas-black);
    color: var(--midas-yellow);
}

.accordion-button::after {
    filter: brightness(0) invert(1);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 184, 28, 0.25);
}

/* Status select coloring */
.status-select option[value="Completed"] {
    background-color: #d1e7dd;
}

.status-select option[value="InProgress"] {
    background-color: #fff3cd;
}

.status-select option[value="Skipped"],
.status-select option[value="NotApplicable"] {
    background-color: #e2e3e5;
}

/* Notes textarea */
.notes-input {
    resize: vertical;
    min-height: 32px;
}

.notes-input:focus {
    min-height: 60px;
}

/* Progress circle for dashboard */
.progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        #198754 calc(var(--progress) * 1%),
        #e9ecef calc(var(--progress) * 1%)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    width: 90px;
    height: 90px;
    border-radius: 50%;
    position: absolute;
    transition: background-color 0.3s;
}

.progress-circle-value {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.3s;
}

/* Footer */
.footer {
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Form focus states */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--midas-yellow);
    box-shadow: 0 0 0 0.25rem rgba(255, 184, 28, 0.25);
}

/* Saving indicator */
.saving-indicator {
    display: none;
    font-size: 0.75rem;
    color: #6c757d;
}

.saving-indicator.active {
    display: inline;
}

/* Theme toggle button */
.theme-toggle {
    cursor: pointer;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.theme-toggle:hover {
    border-color: var(--midas-yellow);
    color: var(--midas-yellow);
}

/* Print styles */
@media print {
    .navbar, .footer, .no-print {
        display: none !important;
    }
    .container-fluid {
        padding: 0;
    }
    .accordion-collapse {
        display: block !important;
    }
}
