/* Emma Signature -- brand-tema basert paa Constellation-monsteret 2026.
   Emma-teal primary (#5a8f99, samme som login-knappen), skarpe hjorner,
   subtile hairline-borders, myke tonede paneler. Ingen watermark eller
   bakgrunn-tekst -- rent uttrykk. Personlighet: rolig profesjonell, brand-
   ankret, litt varmere enn Constellation sin trading-floor-aestetikk. */

/* ===== TYPOGRAPHY (delt) ===== */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --bs-border-radius: 0.25rem;
    --bs-border-radius-sm: 0.15rem;
    --bs-border-radius-lg: 0.35rem;
    --bs-border-radius-pill: 999px;
    --bs-border-radius-xl: 0.5rem;
    --bs-border-radius-xxl: 0.75rem;
    --bs-body-font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-size: 0.92rem;
    --bs-body-line-height: 1.5;
    --bs-body-font-weight: 400;
    --bs-font-monospace: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ===== LIGHT -- Emma brand ===== */
:root,
[data-bs-theme="light"] {
    --bs-primary: #5a8f99;
    --bs-primary-rgb: 90, 143, 153;
    --bs-secondary: #6b7f88;
    --bs-secondary-rgb: 107, 127, 136;
    --bs-success: #4d8f65;
    --bs-success-rgb: 77, 143, 101;
    --bs-info: #4a89a3;
    --bs-info-rgb: 74, 137, 163;
    --bs-warning: #c8892e;
    --bs-warning-rgb: 200, 137, 46;
    --bs-danger: #b8112a;
    --bs-danger-rgb: 184, 17, 42;
    --bs-body-bg: #f4f6f7;
    --bs-body-bg-rgb: 244, 246, 247;
    --bs-body-color: #172025;
    --bs-body-color-rgb: 23, 32, 37;
    --bs-secondary-bg: #e7ecee;
    --bs-tertiary-bg: #eef2f3;
    --bs-border-color: #ccd6da;
    --bs-link-color: #4a7580;
    --bs-link-hover-color: #3a5c66;
    --bs-focus-ring-color: rgba(90, 143, 153, 0.35);
    --bs-emphasis-color: #0a1114;
}

/* Subtil vertical fade -- ingen graph-paper, ingen watermark. Ren emma-tone. */
[data-bs-theme="light"] body {
    background: linear-gradient(180deg, #f4f6f7 0%, #edf1f2 100%);
    background-attachment: fixed;
    color: #172025;
}

[data-bs-theme="light"] .card,
[data-bs-theme="light"] .dropdown-menu,
[data-bs-theme="light"] .modal-content,
[data-bs-theme="light"] .offcanvas,
[data-bs-theme="light"] .popover,
[data-bs-theme="light"] .toast {
    background-color: #ffffff !important;
    border: 1px solid #ccd6da !important;
    box-shadow: 0 1px 2px rgba(23, 32, 37, .04) !important;
}

[data-bs-theme="light"] .navbar {
    background-color: #ffffff !important;
    border-bottom: 2px solid #5a8f99;
    box-shadow: none;
}

[data-bs-theme="light"] .btn-primary {
    background-color: #5a8f99 !important;
    border: 1px solid #5a8f99 !important;
    color: #ffffff !important;
    font-weight: 600;
}
[data-bs-theme="light"] .btn-primary:hover {
    background-color: #4a7580 !important;
    border-color: #4a7580 !important;
}
[data-bs-theme="light"] .btn-outline-primary {
    background-color: transparent !important;
    color: #4a7580 !important;
    border: 1px solid #5a8f99 !important;
}
[data-bs-theme="light"] .btn-outline-primary:hover {
    background-color: #5a8f99 !important;
    color: #ffffff !important;
}
[data-bs-theme="light"] .btn-secondary {
    background-color: #6b7f88 !important;
    border: 1px solid #6b7f88 !important;
    color: #ffffff !important;
}

/* ===== DARK -- deep sea ===== */
[data-bs-theme="dark"] {
    --bs-primary: #7fb0b8;
    --bs-primary-rgb: 127, 176, 184;
    --bs-secondary: #8f9ca4;
    --bs-secondary-rgb: 143, 156, 164;
    --bs-success: #6dbf88;
    --bs-success-rgb: 109, 191, 136;
    --bs-info: #7bc0d6;
    --bs-info-rgb: 123, 192, 214;
    --bs-warning: #e0b062;
    --bs-warning-rgb: 224, 176, 98;
    --bs-danger: #f57676;
    --bs-danger-rgb: 245, 118, 118;
    --bs-body-bg: #0f1a1e;
    --bs-body-bg-rgb: 15, 26, 30;
    --bs-body-color: #dce4e6;
    --bs-body-color-rgb: 220, 228, 230;
    --bs-secondary-color: #8f9ca4;
    --bs-secondary-bg: #17262c;
    --bs-tertiary-bg: #132025;
    --bs-border-color: #253840;
    --bs-link-color: #9dc3ca;
    --bs-link-hover-color: #b8d3d9;
    --bs-focus-ring-color: rgba(127, 176, 184, 0.36);
    --bs-emphasis-color: #ffffff;
}

[data-bs-theme="dark"] body {
    background: linear-gradient(180deg, #0f1a1e 0%, #0d1619 60%, #0a1315 100%);
    background-attachment: fixed;
    color: #dce4e6;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .popover,
[data-bs-theme="dark"] .toast {
    background-color: #17262c !important;
    border: 1px solid #253840 !important;
    color: #dce4e6 !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .navbar {
    background-color: #132025 !important;
    border-bottom: 2px solid #7fb0b8;
    box-shadow: none;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
    background-color: #132025 !important;
    border: 1px solid #253840 !important;
    color: #dce4e6 !important;
}
[data-bs-theme="dark"] .form-control::placeholder { color: #5a6d76 !important; }

[data-bs-theme="dark"] .btn-primary {
    background-color: #7fb0b8 !important;
    border: 1px solid #7fb0b8 !important;
    color: #0f1a1e !important;
    font-weight: 700;
}
[data-bs-theme="dark"] .btn-primary:hover {
    background-color: #a0c8ce !important;
    border-color: #a0c8ce !important;
}
[data-bs-theme="dark"] .btn-outline-primary {
    background-color: transparent !important;
    color: #7fb0b8 !important;
    border: 1px solid #7fb0b8 !important;
}
[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #7fb0b8 !important;
    color: #0f1a1e !important;
}
[data-bs-theme="dark"] .btn-secondary {
    background-color: #253840 !important;
    border: 1px solid #253840 !important;
    color: #dce4e6 !important;
}

[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table > :not(caption) > * > * {
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
    background-color: transparent;
}
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(127, 176, 184, 0.08);
    color: var(--bs-body-color);
}
[data-bs-theme="dark"] hr { border-color: var(--bs-border-color); opacity: 1; }
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary { color: var(--bs-secondary-color) !important; }

/* ===== SHARED ===== */
.btn {
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.9rem;
}
.btn:focus-visible,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px var(--bs-focus-ring-color) !important;
    border-color: var(--bs-primary) !important;
    outline-offset: 0;
}
a { color: var(--bs-link-color); text-decoration: none; }
a:hover { color: var(--bs-link-hover-color); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
