html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 64px;
    padding-bottom: 64px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    background: white;
    color: #6c757d;
    transition: all 0.2s ease;
}

    .step-circle.active {
        border-color: #212529;
        color: #212529;
    }

    .step-circle.complete {
        background: #212529;
        border-color: #212529;
        color: white;
    }

.step-label {
    color: #6c757d;
    font-size: 11px;
}

.step-line {
    height: 2px;
    background: #dee2e6;
    margin: 0 8px;
    margin-bottom: 20px;
}

.mission-option {
    cursor: pointer;
    transition: all 0.15s ease;
}

    .mission-option:hover {
        border-color: #212529 !important;
    }

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Barlow+Condensed:wght@300;400;600;700&display=swap');

/* ── In-App Toast Notifications ────────────────────────────── */
#notif-toast-stack {
    position: fixed;
    bottom: 80px; /* sits above the nav bar */
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    pointer-events: none;
}

.notif-toast {
    pointer-events: all;
    background: #1c2018;
    border: 1px solid #555;
    border-left: 4px solid #821a1a;
    color: #e8e4d0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    padding: 1.1rem 1.4rem;
    max-width: 380px;
    min-width: 300px;
    cursor: pointer;
    opacity: 0;
    transform: translateX(calc(100% + 1rem));
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 6px 24px rgba(0,0,0,0.6);
}

.notif-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.notif-toast-label {
    font-size: 11px;
    color: #8aab6e;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.notif-toast-preview {
    color: #d4d0c4;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Light mode — keep toast dark so it always contrasts against khaki bg */
body.light-mode .notif-toast {
    background: #2a2e24;
    border-color: #555;
    border-left-color: #821a1a;
    color: #e8e4d0;
}
body.light-mode .notif-toast-label { color: #8aab6e; }
body.light-mode .notif-toast-preview { color: #d4d0c4; }

.brotherhood-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #e8e4d0;
    border-top: 2px solid #b8b4a0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: stretch;
    z-index: 100;
}

.nav-node {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    border-top: 3px solid transparent;
    transition: all 0.15s ease;
    padding: 0 4px;
    min-width: 0;
}

    .nav-node:hover {
        background: rgba(0, 0, 0, 0.05);
        text-decoration: none;
    }

    .nav-node.active {
        border-top-color: #821a1a;
        background: rgba(130, 26, 26, 0.06);
    }

.nav-designator {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: #9aaa8a;
    transition: all 0.15s ease;
}

.nav-label {
    font-family: 'Barlow Condensed', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #4a5240;
    text-transform: uppercase;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nav-node.active .nav-designator {
    color: #821a1a;
}

.nav-node.active .nav-label {
    color: #0a0a08;
    font-weight: 700;
}

.nav-node:hover .nav-label {
    color: #1a1e14;
}

.nav-node:hover .nav-designator {
    color: #6a7a60;
}

/* ── User Badge ────────────────────────────────────────────── */
.user-badge {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 150;
    width: 44px;
    height: 44px;
    background: #821a1a;
    border: 1px solid #a02020;
    color: #e8e4d0;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
}

.user-badge:hover {
    background: #a02020;
    color: #ffffff;
}

.user-badge-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 9px;
    height: 9px;
    background: #e8e4d0;
    border-radius: 50%;
    pointer-events: none;
    border: 2px solid #821a1a;
}

/* ── Profile Modal ─────────────────────────────────────────── */
.profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 200;
    display: none;
    pointer-events: none;
    transition: background 0.25s ease;
}

.profile-overlay.open {
    display: block;
    background: rgba(0,0,0,0.72);
    pointer-events: all;
}

.profile-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-50% + 30px));
    width: min(520px, calc(100vw - 2rem));
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: #0d100a;
    border: 1px solid #2a3228;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 201;
}

.profile-overlay.open .profile-panel {
    opacity: 1;
    transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
    .profile-panel {
        left: 0;
        right: 0;
        bottom: 64px;
        top: auto;
        width: 100%;
        max-height: calc(100dvh - 64px - 2rem);
        transform: translateY(100%);
        transition: transform 0.3s ease, opacity 0.3s ease;
        padding-bottom: 1.5rem;
    }
    .profile-overlay.open .profile-panel {
        transform: translateY(0);
    }
    .profile-close {
        position: sticky;
        top: 0;
        width: 100%;
        text-align: right;
        background: #0d100a;
        padding: 0.6rem 0.75rem;
        margin: -2rem -2rem 0.5rem -2rem;
        width: calc(100% + 4rem);
        z-index: 10;
        border-bottom: 1px solid #1e2218;
    }

    /* Hide top corner marks on mobile — they clutter small screens */
    .corner-mark.tl,
    .corner-mark.tr {
        display: none;
    }
}

.profile-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #4a5240;
    background: none;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    padding: 0;
}
.profile-close:hover { color: #e8e4d0; }

.profile-eyebrow {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: #6a7a58;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.profile-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #e8e4d0;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.profile-email {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: #6a7a58;
    text-transform: lowercase;
    margin-bottom: 1.25rem;
}

.profile-service-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #1e2218;
}

.profile-service-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.profile-field-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #6a7a58;
    text-transform: uppercase;
}

.profile-field-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c8c4b0;
}

.profile-block {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #1e2218;
}
.profile-block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.profile-block-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #6a7a58;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
}

.profile-phone-link {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: #e8e4d0;
    text-decoration: none;
    padding: 0.65rem 1rem;
    border: 1px solid #821a1a;
    transition: all 0.15s ease;
}
.profile-phone-link:hover {
    background: #821a1a;
    color: #ffffff;
    text-decoration: none;
}

.profile-phone-none {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: #4a5240;
    text-transform: uppercase;
}

.profile-address-lines {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #c8c4b0;
    line-height: 1.5;
}

.profile-mission-tag {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #6a7a58;
    border: 1px solid #1e2218;
    padding: 2px 8px;
    margin: 2px;
    text-transform: uppercase;
}

.profile-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #1e2218;
}

.profile-btn {
    flex: 1;
    padding: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    border: 1px solid #2a3228;
    color: #8a9a7a;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}
.profile-btn:hover {
    border-color: #821a1a;
    color: #e8e4d0;
    text-decoration: none;
}

.profile-btn-logout:hover {
    background: #821a1a;
    border-color: #a02020;
    color: #ffffff;
}

.profile-btn-admin {
    background: #821a1a;
    border-color: #a02020;
    color: #e8e4d0;
}

.profile-btn-admin:hover {
    background: #a02020;
    border-color: #c03030;
    color: #ffffff;
    text-decoration: none;
}

/* ── Theme Toggle in Profile ──────────────────────────────── */
.profile-theme-block {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #1e2218;
}

.profile-theme-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #6a7a58;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
}

.theme-switch {
    display: flex;
    gap: 0;
    border: 1px solid #821a1a;
}

.theme-opt {
    flex: 1;
    padding: 0.6rem 0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    background: transparent;
    border: none;
    color: #4a5240;
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-opt:hover { color: #e8e4d0; }

.theme-opt.active {
    background: #821a1a;
    color: #e8e4d0;
}

/* ── Light Mode: Nav ──────────────────────────────────────── */
body.light-mode .brotherhood-nav {
    background: #6a6050;
    border-top-color: #4a4030;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}

body.light-mode .nav-label { color: #e8e4d0; }
body.light-mode .nav-designator { color: #b0a888; }
body.light-mode .nav-node {
    border-right: 1px solid #4a4030;
}
body.light-mode .nav-node:last-child { border-right: none; }
body.light-mode .nav-node:hover { background: rgba(0,0,0,0.12); }
body.light-mode .nav-node:hover .nav-label { color: #ffffff; }
body.light-mode .nav-node:hover .nav-designator { color: #c8c0a0; }
body.light-mode .nav-node.active .nav-label { color: #ffffff; font-weight: 700; }
body.light-mode .nav-node.active .nav-designator { color: #e8a0a0; }
