/* StageOS inspired theme with lime green accent */
:root {
    --sos-black: #000000;
    --sos-white: #ffffff;
    --sos-gray: #333333;
    --sos-light-gray: #e5e5e5;
    --sos-accent: #ff6b35;
    --stageos-lime: #39ff14;
}

/* ============================================================
 * Phase 2 design sec 2.3: active-nav state
 * 2 px lime underline + aria-current="page". Not relying on
 * colour alone (FR-A11Y-*); the aria attribute carries the
 * semantic, the underline is the visual reinforcement.
 * ============================================================ */
.navbar-nav .nav-link.active,
.navbar-nav .nav-link[aria-current="page"] {
    border-bottom: 2px solid var(--color-primary, #39ff14);
    /* Pull the underline tight against the link text without shifting layout */
    padding-bottom: calc(0.5rem - 2px);
}

/* ============================================================
 * Phase 2 design sec 5: sticky bottom action-bar slot
 * Renders only when a view declares @section ActionBar { ... }.
 * Sticks to the viewport bottom on scroll; uses surface tokens
 * so dark/light themes pick up automatically.
 * ============================================================ */
#action-bar {
    position: sticky;
    bottom: 0;
    z-index: var(--z-sticky, 1020);
    background: var(--color-surface, #141414);
    border-top: 1px solid var(--color-border, #2b2b30);
    box-shadow: var(--shadow, 0 4px 16px rgba(0, 0, 0, 0.10));
    padding: var(--space-3, 12px) var(--space-4, 16px);
}

@media (prefers-reduced-motion: reduce) {
    #action-bar {
        box-shadow: none;
    }
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--sos-black);
    color: var(--sos-white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* Main page background with stage image */
.dashboard-container {
    position: relative;
    min-height: 100vh;
}

.dashboard-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/Images/stageOS.png') !important;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.2 !important;
    z-index: -1;
    pointer-events: none;
}

/* Header/Navigation - StageOS Style */
.navbar {
    background-color: var(--sos-black) !important;
    border-bottom: 1px solid var(--sos-gray) !important;
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 1000;
}

.navbar-brand {
    color: var(--sos-white) !important;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* Style for the "OS" part - add this new rule */
.navbar-brand .os-accent {
    color: var(--stageos-lime);
}

/* Navigation links - lime green on hover */
.nav-link {
    color: var(--sos-light-gray) !important;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #39ff14 !important;
}

.dropdown-menu {
    background-color: var(--sos-black);
    border: 1px solid var(--sos-gray);
}
    
.dropdown-item {
    color: var(--sos-light-gray);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: var(--sos-gray);
    color: var(--sos-white);
}

/* Container - FIXED: Added proper bottom spacing */
.container {
    background-color: rgba(0, 0, 0, 0.85);
    padding: 1.5rem;
    padding-bottom: 8rem !important; /* INCREASED - Space for buttons + footer */
    border-radius: 0;
    flex: 1 0 auto; /* CHANGED - Allow flex grow/shrink */
    position: relative;
    z-index: 1;
}

/* Typography - reduce sizes */
h1.display-4 {
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--sos-white);
    text-transform: uppercase;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h1 {
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--sos-white);
    text-transform: uppercase;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.lead {
    color: var(--sos-light-gray);
    font-weight: 300;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Cards - more compact */
.card {
    background-color: var(--sos-black);
    border: 1px solid var(--sos-gray);
    border-radius: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.card:hover {
    border-color: var(--sos-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.card.active,
.card:focus-within {
    border-color: var(--stageos-lime);
    box-shadow: 0 0 0 2px var(--stageos-lime);
}

.card-body {
    padding: 1.25rem;
    background-color: var(--sos-black);
}

.card-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--sos-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--sos-light-gray);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

/* Buttons - ALL lime green on hover - COMPLETE OVERRIDE */
.btn {
    border-radius: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--sos-black) !important;
    border: 2px solid var(--sos-white) !important;
    color: var(--sos-white) !important;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:active:focus {
    background-color: #39ff14 !important;
    color: #000000 !important;
    border-color: #39ff14 !important;
    transform: translateY(-1px);
}

.btn-primary.active {
    background-color: var(--sos-black) !important;
    border-color: var(--stageos-lime) !important;
    color: var(--stageos-lime) !important;
}

.btn-outline-primary {
    border: 1px solid var(--sos-white) !important;
    color: var(--sos-white) !important;
    background-color: transparent !important;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary:active:focus {
    background-color: #39ff14 !important;
    color: #000000 !important;
    border-color: #39ff14 !important;
}

.btn-outline-primary.active {
    border-color: var(--stageos-lime) !important;
    color: var(--stageos-lime) !important;
    background-color: transparent !important;
}

.btn-secondary {
    background-color: var(--sos-black) !important;
    border: 1px solid var(--sos-gray) !important;
    color: var(--sos-white) !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary:active:focus {
    background-color: #39ff14 !important;
    color: #000000 !important;
    border-color: #39ff14 !important;
}

.btn-secondary.active {
    border-color: var(--stageos-lime) !important;
    color: var(--stageos-lime) !important;
}

.btn-success {
    background-color: var(--sos-black) !important;
    border: 1px solid var(--sos-accent) !important;
    color: var(--sos-white) !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success:active:focus {
    background-color: #39ff14 !important;
    color: #000000 !important;
    border-color: #39ff14 !important;
}

.btn-success.active {
    border-color: var(--stageos-lime) !important;
    color: var(--stageos-lime) !important;
}

.btn-danger {
    background-color: var(--sos-black) !important;
    border: 1px solid #dc3545 !important;
    color: var(--sos-white) !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background-color: #39ff14 !important;
    color: #000000 !important;
    border-color: #39ff14 !important;
}

.btn-danger.active {
    border-color: var(--stageos-lime) !important;
    color: var(--stageos-lime) !important;
}

/* Small buttons */
.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
}

/* Link buttons (like logout) */
.btn-link {
    color: var(--sos-white) !important;
    text-decoration: none;
    padding: 0.35rem 1rem;
}

.btn-link:hover {
    color: #39ff14 !important;
}

.btn-link.active {
    color: var(--stageos-lime) !important;
}

/* Form submit buttons */
button[type="submit"]:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: #39ff14 !important;
    color: #000000 !important;
}

/* Override Bootstrap focus states */
.btn:focus,
.btn:active:focus,
.btn-primary:focus,
.btn-primary:active:focus {
    box-shadow: 0 0 0 0.2rem rgba(57, 255, 20, 0.5) !important;
}

/* Disabled button state */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Controls */
.form-control,
.form-select {
    background-color: var(--sos-black);
    border: 1px solid var(--sos-gray);
    color: var(--sos-white);
    border-radius: 0;
}   

.form-control:focus,
.form-select:focus {
    background-color: var(--sos-black);
    border-color: var(--stageos-lime);
    color: var(--sos-white);
    box-shadow: 0 0 0 0.2rem rgba(57, 255, 20, 0.25);
}

.form-control::placeholder {
    color: var(--sos-light-gray);
    opacity: 0.6;
}

.form-label {
    color: var(--sos-white);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.form-check-input {
    background-color: var(--sos-black);
    border-color: var(--sos-gray);
}

.form-check-input:checked {
    background-color: var(--stageos-lime);
    border-color: var(--stageos-lime);
}

.form-check-input:focus {
    border-color: var(--stageos-lime);
    box-shadow: 0 0 0 0.2rem rgba(57, 255, 20, 0.25);
}

.form-check-label {
    color: var(--sos-white);
}

.text-muted {
    color: var(--sos-light-gray) !important;
}

.text-danger {
    color: #ff6b6b !important;
}

.text-white {
    color: var(--sos-white) !important;
}

.text-success {
    color: var(--stageos-lime) !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #39b4ff !important;
}

.text-secondary {
    color: var(--sos-light-gray) !important;
}

/* Tables */
.table {
    /* Bootstrap 5 applies cell colour via `.table > :not(caption) > * > *` reading
       these custom properties, which beats the bare `.table { color: ... }` rule.
       Setting the variables here makes every cell honour our dark-on-light palette. */
    --bs-table-color: var(--sos-white);
    --bs-table-bg: var(--sos-black);
    --bs-table-border-color: var(--sos-gray);
    --bs-table-striped-color: var(--sos-white);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.04);
    --bs-table-hover-color: var(--sos-white);
    --bs-table-hover-bg: rgba(57, 255, 20, 0.05);
    color: var(--sos-white);
    background-color: var(--sos-black);
}

.table thead th {
    border-color: var(--sos-gray);
    background-color: var(--sos-black);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.table td {
    border-color: var(--sos-gray);
    background-color: var(--sos-black);
}

.table tbody tr:hover {
    background-color: rgba(57, 255, 20, 0.05);
}

.table tbody tr.active {
    background-color: rgba(57, 255, 20, 0.1);
    border-left: 3px solid var(--stageos-lime);
}

/* Footer */
.footer {
    background-color: var(--sos-black);
    border-top: 1px solid var(--sos-gray);
    color: var(--sos-light-gray);
    padding: 1rem 0 !important; /* Reduced from 1.25rem */
    margin-top: auto;
    position: relative;
    font-size: 0.85rem;
}

.footer .container {
    padding: 0.5rem 1rem;
}

/* Card header */
.card-header {
    background-color: var(--sos-black);
    border-bottom: 1px solid var(--sos-gray);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-header h5 {
    margin: 0;
    padding: 0;
}

/* Gap utility for older browsers */
.gap-2 > * + * {
    margin-top: 0.5rem;
}

/* Add bottom margin to card rows */
.row {
    margin-bottom: 1.5rem; /* Reduced from 2rem */
}

.row:last-of-type {
    margin-bottom: 2rem !important; /* Reduced from 5rem */
}

/* Add extra padding to main element */
main {
    padding-bottom: 2rem !important;
    min-height: calc(100vh - 200px);
}

/* Add these new rules for better vertical spacing */
.mb-4 {
    margin-bottom: 1.25rem !important; /* Override Bootstrap's mb-4 */
}

.mt-5 {
    margin-top: 2rem !important; /* Override Bootstrap's mt-5 */
}

/* User info in navbar */
.navbar .user-info {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.navbar .user-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.navbar .user-role {
    color: #39ff14;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar form {
    margin: 0;
}

.navbar .btn-outline-primary.btn-sm {
    padding: 0.35rem 1rem;
    font-size: 0.75rem;
}

/* Alert styling */
.alert {
    border-radius: 0;
    border: 1px solid;
    background-color: var(--sos-black);
}

.alert-success {
    background-color: var(--sos-black);
    border-color: var(--stageos-lime);
    color: var(--stageos-lime);
}

.alert-info {
    background-color: var(--sos-black);
    border-color: #39b4ff;
    color: #39b4ff;
}

.alert-warning {
    background-color: var(--sos-black);
    border-color: #ffc107;
    color: #ffc107;
}

.alert-danger {
    background-color: var(--sos-black);
    border-color: #dc3545;
    color: #dc3545;
}

.btn-close {
    filter: invert(1);
}

/* Duplicate highlighting */
.border-warning {
    border-color: #ffc107 !important;
    border-width: 2px !important;
}

.bg-warning {
    background-color: var(--sos-black) !important;
    border: 1px solid #ffc107 !important;
}

/* Selection highlight */
.bg-selected {
    background-color: var(--sos-black) !important;
    border: 2px solid var(--stageos-lime) !important;
}

/* EPK Media Cards */
.epk-media-card {
    background-color: var(--sos-gray);
    border: 1px solid var(--sos-gray);
    border-radius: 4px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.epk-media-card:hover {
    border-color: var(--stageos-lime);
    box-shadow: 0 2px 8px rgba(57, 255, 20, 0.2);
}

.epk-media-card.active {
    border-color: var(--stageos-lime);
    box-shadow: 0 0 0 2px var(--stageos-lime);
}

.epk-media-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    background-color: var(--sos-black);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.epk-media-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Thumbnail Specific */
.video-thumbnail {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--sos-black);
    position: relative;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200"><rect width="300" height="200" fill="%23333333"/><text x="50%" y="50%" text-anchor="middle" dy=".3em" fill="%23ffffff" font-family="Arial" font-size="16">Video</text></svg>');
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.epk-media-card:hover .video-play-overlay {
    background-color: rgba(57, 255, 20, 0.2);
}

.video-play-icon {
    font-size: 3rem;
    color: var(--sos-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    font-style: normal;
    line-height: 1;
}

.epk-media-card:hover .video-play-icon {
    color: var(--stageos-lime);
    transform: scale(1.2);
}

/* Photo items in grid */
.photo-item,
.video-item {
    margin-bottom: 1rem;
}

/* Form control sizing within media cards */
.epk-media-card .form-control {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

.epk-media-card .btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

/* Modal styles - FIXES with higher z-index */
.modal-backdrop {
    z-index: 1055 !important;
    background-color: rgba(0, 0, 0, 0.75) !important;
}

.modal {
    z-index: 1060 !important;
}

.modal-dialog {
    z-index: 1065 !important;
    margin: 1.75rem auto;
}

.modal-content {
    background-color: var(--sos-black) !important;
    color: var(--sos-white) !important;
    border: 1px solid var(--stageos-lime) !important;
    border-radius: 4px;
    z-index: 1070 !important;
}

.modal-header {
    border-bottom: 1px solid var(--sos-gray) !important;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--sos-gray) !important;
    padding: 1rem 1.5rem;
}

.modal-title {
    color: var(--stageos-lime);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal .form-label {
    color: var(--sos-white);
    font-size: 0.9rem;
}

.modal .btn-close {
    filter: invert(1) brightness(2);
}

/* Ensure body can scroll with modal open */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

/* Make modal elements clickable */
.modal input,
.modal textarea,
.modal button,
.modal select,
.modal .form-control,
.modal-backdrop {
    position: relative;
}

/* Disabled input styling */
input:disabled,
input[disabled],
.form-control:disabled,
.form-control[disabled],
.disabled-input {
    background-color: #000000 !important;
    border-color: #555555 !important;
    color: #999999 !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

input:disabled::placeholder,
input[disabled]::placeholder,
.form-control:disabled::placeholder,
.form-control[disabled]::placeholder {
    color: #666666 !important;
    opacity: 1 !important;
}

/* Override all white backgrounds to black */
.bg-white {
    background-color: var(--sos-black) !important;
}

/* Panel/Card content backgrounds */
.panel {
    background-color: var(--sos-black);
}

/* Pricing page */
.stageos-pricing {
    --sp-bg: #0b0f17;
    --sp-panel: #0f1624;
    --sp-panel2: #0c1320;
    --sp-text: #e8eefc;
    --sp-muted: #a8b3cf;
    --sp-line: rgba(255, 255, 255, 0.1);
    --sp-brand: #7c5cff;
    --sp-brand2: #22d3ee;
    --sp-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
    --sp-radius: 18px;
    background:
        radial-gradient(1200px 600px at 20% 0%, rgba(124, 92, 255, 0.2), transparent 55%),
        radial-gradient(900px 500px at 80% 10%, rgba(34, 211, 238, 0.14), transparent 55%),
        var(--sp-bg);
    color: var(--sp-text);
    padding: 64px 16px;
}

.sp-wrap {
    max-width: 1120px;
    margin: 0 auto;
}

.sp-hero {
    text-align: center;
    margin-bottom: 28px;
}

.sp-eyebrow {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--sp-line);
    border-radius: 999px;
    color: var(--sp-muted);
    background: rgba(255, 255, 255, 0.03);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
}

.sp-hero h1,
.sp-faq-header h2 {
    color: var(--sp-text);
}

.sp-hero h1 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    line-height: 1.1;
    margin: 14px 0 10px;
}

.sp-sub {
    max-width: 720px;
    margin: 0 auto;
    color: var(--sp-muted);
    font-size: 16px;
}

.sp-toggle {
    margin: 18px auto 0;
    max-width: 520px;
    padding: 14px 14px 10px;
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    background: rgba(255, 255, 255, 0.03);
}

.sp-toggle-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sp-toggle-button {
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--sp-muted);
    font-weight: 600;
    padding: 10px 14px;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sp-toggle-button:hover,
.sp-toggle-button:focus-visible {
    border-color: rgba(124, 92, 255, 0.45);
    color: var(--sp-text);
    transform: translateY(-1px);
}

.sp-toggle-button em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.75);
}

.sp-toggle-button.sp-active {
    color: var(--sp-text);
    background: rgba(124, 92, 255, 0.12);
    border-color: rgba(124, 92, 255, 0.5);
}

.sp-toggle-pill {
    display: block;
    height: 2px;
    background: linear-gradient(90deg, var(--sp-brand), var(--sp-brand2));
    margin: 10px 0;
    border-radius: 999px;
    opacity: 0.9;
}

.sp-toggle-note,
.sp-price-sub,
.sp-fine,
.sp-muted {
    color: var(--sp-muted);
}

.sp-toggle-note {
    margin: 0;
    font-size: 12px;
}

.sp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.sp-card,
.sp-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
}

.sp-card {
    position: relative;
    padding: 22px;
    overflow: hidden;
}

.sp-card-featured {
    border-color: rgba(124, 92, 255, 0.55);
    background: linear-gradient(180deg, rgba(124, 92, 255, 0.16), rgba(255, 255, 255, 0.02));
    transform: translateY(-6px);
}

.sp-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.22);
    border: 1px solid rgba(124, 92, 255, 0.45);
    color: var(--sp-text);
}

.sp-card-top h2,
.sp-panel h2 {
    margin: 0 0 10px;
}

.sp-card-top h2 {
    font-size: 18px;
}

.sp-price {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sp-price-main {
    font-size: 34px;
    font-weight: 800;
}

.sp-price-unit {
    font-size: 14px;
    color: var(--sp-muted);
    margin-left: 6px;
    font-weight: 600;
}

.sp-price-sub,
.sp-fine {
    margin: 6px 0 0;
    font-size: 13px;
}

.sp-list,
.sp-steps {
    color: rgba(232, 238, 252, 0.92);
}

.sp-list {
    margin: 16px 0 0;
    padding-left: 18px;
}

.sp-list li,
.sp-steps li {
    margin: 10px 0;
}

.sp-list-compact li {
    margin: 8px 0;
    color: rgba(232, 238, 252, 0.88);
}

.sp-divider {
    height: 1px;
    background: var(--sp-line);
    margin: 18px 0;
}

.sp-minihead {
    margin: 0;
    font-size: 13px;
    color: var(--sp-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sp-btn {
    display: block;
    margin-top: 18px;
    text-align: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--sp-brand), var(--sp-brand2));
    color: #07101a;
    font-weight: 800;
    text-decoration: none;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sp-btn:hover,
.sp-btn:focus-visible {
    color: #07101a;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.18);
}

.sp-btn-ghost {
    background: transparent;
    color: var(--sp-text);
    border: 1px solid var(--sp-line);
}

.sp-btn-ghost:hover,
.sp-btn-ghost:focus-visible {
    color: var(--sp-text);
    box-shadow: none;
    border-color: rgba(124, 92, 255, 0.45);
}

.sp-fine {
    text-align: center;
}

.sp-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.sp-panel {
    padding: 18px;
}

.sp-panel h2 {
    font-size: 16px;
}

.sp-muted {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.sp-steps {
    margin: 0 0 14px;
    padding-left: 18px;
}

.sp-faq-panel {
    margin-top: 18px;
}

.sp-faq-header {
    margin-bottom: 16px;
}

.sp-accordion {
    display: grid;
    gap: 12px;
}

.sp-accordion-item {
    border: 1px solid var(--sp-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.sp-accordion-item summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 18px;
    font-weight: 700;
    color: var(--sp-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sp-accordion-item summary::-webkit-details-marker {
    display: none;
}

.sp-accordion-item summary::after {
    content: '\F282';
    font-family: 'bootstrap-icons';
    font-size: 1rem;
    color: var(--sp-brand2);
    transition: transform 0.2s ease;
}

.sp-accordion-item[open] summary::after {
    transform: rotate(180deg);
}

.sp-accordion-body {
    padding: 0 18px 18px;
    color: var(--sp-muted);
    line-height: 1.6;
}

.sp-footer {
    text-align: center;
    margin-top: 18px;
}

.sp-footer a {
    color: rgba(232, 238, 252, 0.92);
}

@media (max-width: 980px) {
    .sp-grid,
    .sp-sections {
        grid-template-columns: 1fr;
    }

    .sp-card-featured {
        transform: none;
    }
}

@media (max-width: 576px) {
    .sp-toggle-buttons {
        grid-template-columns: 1fr;
    }
}

/* Dashboard contrast fixes */
.dashboard-page-shell,
.dashboard-page-shell .card,
.dashboard-page-shell .card-body,
.dashboard-page-shell .list-group-item,
.dashboard-page-shell .table,
.dashboard-page-shell .table > :not(caption) > * > * {
    color: var(--sos-white);
}

.dashboard-page-shell .text-muted,
.dashboard-page-shell .card-text,
.dashboard-page-shell .lead,
.dashboard-page-shell small,
.dashboard-page-shell .table .text-muted,
.dashboard-page-shell .list-group-item .text-muted {
    color: rgba(245, 247, 251, 0.82) !important;
}

.dashboard-page-shell .table {
    --bs-table-color: var(--sos-white);
    --bs-table-bg: transparent;
    --bs-table-striped-color: var(--sos-white);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-color: var(--sos-white);
    --bs-table-hover-bg: rgba(57, 255, 20, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-page-shell .list-group-item {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.dashboard-page-shell .alert-info,
.dashboard-page-shell .alert-warning,
.dashboard-page-shell .alert-success {
    color: var(--sos-white);
}

.panel-body {
    background-color: var(--sos-black);
}

/* Any element with white background styling */
div[style*="background: white"],
div[style*="background: #fff"],
div[style*="background: #ffffff"],
div[style*="background-color: white"],
div[style*="background-color: #fff"],
div[style*="background-color: #ffffff"],
section[style*="background: white"],
section[style*="background: #fff"],
section[style*="background: #ffffff"],
span[style*="background: white"],
span[style*="background: #fff"],
span[style*="background: #ffffff"] {
    background-color: var(--sos-black) !important;
    background: var(--sos-black) !important;
}

/* Profile image box/container override */
.profile-image-box,
.image-box,
[class*="image"][class*="box"],
[id*="profile"][id*="image"] {
    background-color: var(--sos-black) !important;
}

/* Last resort: override common Bootstrap light classes */
.bg-light {
    background-color: var(--sos-black) !important;
}

.light-bg {
    background-color: var(--sos-black) !important;
}

/* Override light gray background in profile photo section */
div[style*="#f8f9fa"],
div[style*="background-color: #f8f9fa"] {
    background-color: var(--sos-black) !important;
}

/* Generic override for all light backgrounds */
[style*="background-color: #f"] {
    background-color: var(--sos-black) !important;
}

[style*="background-color: rgb(248"] {
    background-color: var(--sos-black) !important;
}

/* ============================================================
 * Phase 2 design sec 4.1: button (.btn-stageos)
 * Variants: --primary | --secondary | --ghost | --danger
 * Sizes:    --sm (36 px) | --md (44 px) | --lg (52 px)
 * Tokens:   --color-primary, --color-primary-muted,
 *           --color-primary-contrast, --color-secondary,
 *           --color-danger, --color-text, --color-border,
 *           --color-surface-2, --color-focus-ring,
 *           --space-*, --radius, --motion-fast, --font-sans
 * Anti-pattern banned: low-opacity-on-low-opacity inline styles
 * (was Views/Gig/Index.cshtml:206 before consolidation).
 * ============================================================ */
.btn-stageos {
    --btn-bg: var(--color-primary);
    --btn-fg: var(--color-primary-contrast);
    --btn-border: var(--color-primary);
    --btn-bg-hover: var(--color-primary-muted);

    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    border: 1px solid var(--btn-border);
    border-radius: var(--radius);
    padding: 0 var(--space-4);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition:
        background var(--motion-fast),
        border-color var(--motion-fast),
        color var(--motion-fast);
}
.btn-stageos:hover:not(:disabled):not([aria-disabled="true"]) {
    background: var(--btn-bg-hover);
}
.btn-stageos:focus-visible {
    outline: 2px solid var(--color-focus-ring);
    outline-offset: 2px;
}
.btn-stageos:disabled,
.btn-stageos[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-stageos--primary { /* token defaults already cover this */ }

.btn-stageos--secondary {
    --btn-bg: transparent;
    --btn-fg: var(--color-text);
    --btn-border: var(--color-border);
    --btn-bg-hover: var(--color-surface-2);
}

.btn-stageos--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--color-text);
    --btn-border: transparent;
    --btn-bg-hover: var(--color-surface-2);
}

.btn-stageos--danger {
    --btn-bg: var(--color-danger);
    --btn-fg: #ffffff;
    --btn-border: var(--color-danger);
    --btn-bg-hover: #c53030;
}

.btn-stageos--sm { height: 36px; font-size: var(--text-sm); }
.btn-stageos--md { height: 44px; font-size: var(--text-base); }
.btn-stageos--lg { height: 52px; font-size: var(--text-lg); padding: 0 var(--space-6); }

/* Loading state: spinner replaces label, button keeps its width */
.btn-stageos.is-loading .btn-stageos__label {
    visibility: hidden;
}
.btn-stageos__spinner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: btn-stageos-spin 0.6s linear infinite;
}
@keyframes btn-stageos-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .btn-stageos__spinner {
        animation-duration: 0s;
    }
    .btn-stageos {
        transition-duration: 0s;
    }
}

/* ============================================================
 * Global button sizing fix: prevent flex-wrap growth
 * Ensures buttons maintain consistent sizing when wrapped in
 * flex containers. Applies to Bootstrap .btn and custom buttons.
 * ============================================================ */
.btn,
[class*="btn-"] {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================================
 * Phase 2 design sec 4.3: status pill (.status-pill)
 * Always icon + label - never colour alone. Status palette is
 * colour-blind safe when paired with the icon glyph.
 * ============================================================ */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-2);
    border: 1px solid var(--pill-border, var(--color-border));
    border-radius: var(--radius-pill);
    background: var(--pill-bg, var(--color-surface-2));
    color: var(--pill-fg, var(--color-text));
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.status-pill__label { letter-spacing: 0.01em; }

.status-pill--success {
    --pill-bg: rgba(34, 197, 94, 0.15);
    --pill-fg: var(--color-success);
    --pill-border: var(--color-success);
}
.status-pill--warning {
    --pill-bg: rgba(245, 158, 11, 0.15);
    --pill-fg: var(--color-warning);
    --pill-border: var(--color-warning);
}
.status-pill--danger {
    --pill-bg: rgba(239, 68, 68, 0.15);
    --pill-fg: var(--color-danger);
    --pill-border: var(--color-danger);
}
.status-pill--info {
    --pill-bg: rgba(59, 130, 246, 0.15);
    --pill-fg: var(--color-info);
    --pill-border: var(--color-info);
}
.status-pill--primary {
    --pill-bg: rgba(57, 255, 20, 0.15);
    --pill-fg: var(--color-primary);
    --pill-border: var(--color-primary);
}
.status-pill--neutral {
    --pill-bg: var(--color-surface-2);
    --pill-fg: var(--color-text-muted);
    --pill-border: var(--color-border);
}

/* ============================================================
 * Phase 2 design sec 4.4: empty state (.empty-state)
 * Centred layout with one primary CTA - the next logical action,
 * not a generic "Learn more".
 * ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-12) var(--space-6);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text-muted);
}
.empty-state__icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}
.empty-state__title {
    margin: 0 0 var(--space-2);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: var(--leading-tight);
}
.empty-state__description {
    margin: 0 0 var(--space-6);
    max-width: 480px;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
}
.empty-state__cta {
    margin-top: var(--space-2);
}

/* ============================================================
 * Phase 2 design sec 4.2: form input (.form-field / .form-input)
 * Label + input + help + inline error. Required indicator is the
 * asterisk after the label PLUS aria-required. Help and error are
 * linked via aria-describedby in the partial.
 * ============================================================ */
.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
    font-family: var(--font-sans);
}
.form-field__label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}
.form-field__required {
    margin-left: 2px;
    color: var(--color-danger);
}
.form-input {
    width: 100%;
    height: 44px;
    padding: 0 var(--space-3);
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: var(--text-base);
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}
.form-input::placeholder {
    color: var(--color-text-muted);
}
.form-input:hover:not(:disabled):not([readonly]) {
    border-color: var(--color-text-muted);
}
.form-input:focus-visible {
    outline: 2px solid var(--color-focus-ring);
    outline-offset: 2px;
    border-color: var(--color-primary);
}
.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.form-input--error {
    border-color: var(--color-danger);
}
.form-input--error:focus-visible {
    outline-color: var(--color-danger);
}
.form-field__help {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}
.form-field__error {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin: 0;
    color: var(--color-danger);
    font-size: var(--text-xs);
    font-weight: 500;
}

/* ============================================================
 * Phase 2 design sec 4.2 sub: password meter polish
 * The existing /js/password-meter.js renders the bar + rules into
 * .password-meter-target. These rules give it Phase 2 styling
 * without rewriting the JS.
 * ============================================================ */
.password-meter-target {
    margin-top: var(--space-2);
}
.password-meter-bar {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--color-surface-2);
    overflow: hidden;
}
.password-meter-summary {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    margin-top: var(--space-1);
}
.password-meter-rules {
    margin: var(--space-1) 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}
.password-meter-rules li {
    line-height: var(--leading-normal);
}

/* ============================================================
 * Phase 2 design sec 4.2 sub: autocomplete (.autocomplete)
 * Skeleton structure - keyboard nav + fetch JS lands with first
 * applied caller (slice 1.42 booking pickers).
 * ============================================================ */
.autocomplete {
    position: relative;
}
.autocomplete__listbox {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + var(--space-1));
    margin: 0;
    padding: var(--space-1) 0;
    list-style: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-height: 320px;
    overflow-y: auto;
    z-index: var(--z-popover);
}
.autocomplete__listbox[hidden] {
    display: none;
}
.autocomplete__option {
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    color: var(--color-text);
    transition: background var(--motion-fast);
}
.autocomplete__option[aria-selected="true"],
.autocomplete__option:hover {
    background: var(--color-surface-2);
}
.autocomplete__option--create {
    border-top: 1px solid var(--color-border);
    color: var(--color-primary);
    font-weight: 600;
}

/* ============================================================
 * Phase 2 design sec 4.6: modal (.stageos-modal)
 * Layered on Bootstrap modal. Bootstrap handles focus trap,
 * Esc-to-close, focus restoration. We theme via tokens.
 * ============================================================ */
.stageos-modal .modal-content {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.stageos-modal .modal-header {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) var(--space-6);
}
.stageos-modal .modal-title {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}
.stageos-modal .modal-body {
    padding: var(--space-6);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: var(--leading-normal);
}
.stageos-modal .modal-footer {
    border-top: 1px solid var(--color-border);
    padding: var(--space-3) var(--space-6);
    gap: var(--space-2);
}
.stageos-modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(2);
}
.stageos-modal--confirm .modal-title {
    color: var(--color-danger);
}

/* ============================================================
 * Phase 2 design sec 2.3: app navbar (.app-navbar)
 * Token-driven; replaces inline style block in _Layout.cshtml.
 * Brand identity preserved: lime "OS" accent on the wordmark.
 * ============================================================ */
.app-navbar {
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-surface-2) 100%);
    border-bottom: 1px solid var(--color-border);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}
.app-navbar__brand {
    font-family: var(--font-sans);
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--color-text);
    text-decoration: none;
}
.app-navbar__brand-accent {
    color: var(--color-primary);
}
.app-navbar [data-app-nav-link="true"] {
    text-transform: uppercase;
    font-size: var(--text-sm);
    letter-spacing: 0.02em;
    color: var(--color-text);
    font-family: var(--font-sans);
}
.app-navbar__dropdown-menu {
    background: var(--color-surface);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius);
}
.app-navbar__dropdown-menu .dropdown-item {
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
}
.app-navbar__dropdown-menu .dropdown-item:hover,
.app-navbar__dropdown-menu .dropdown-item:focus-visible {
    background: var(--color-surface-2);
    color: var(--color-primary);
}
.app-navbar__dropdown-divider {
    border-color: var(--color-border);
    opacity: 1;
}
.app-navbar__user-info {
    text-align: right;
    border-right: 1px solid var(--color-border);
    padding-right: var(--space-4);
    font-family: var(--font-sans);
}
.app-navbar__user-name {
    color: var(--color-text);
    font-weight: 600;
    font-size: var(--text-sm);
    line-height: var(--leading-tight);
}
.app-navbar__user-role {
    color: var(--color-primary);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: var(--leading-tight);
}
.app-navbar__logout-btn {
    text-transform: uppercase;
    font-size: var(--text-xs);
    font-family: var(--font-sans);
    font-weight: 600;
}

/* ============================================================
 * Phase 2 design sec 5: app footer (.app-footer)
 * Surface bg, token border-top, brand wordmark in lime.
 * ============================================================ */
.app-footer {
    position: relative;
    z-index: var(--z-base, 0);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: var(--space-4) 0;
    margin-top: var(--space-8);
}
.app-footer__inner {
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
}
.app-footer__brand {
    font-weight: 600;
    color: var(--color-text);
}
.app-footer__brand-accent {
    color: var(--color-primary);
}
.app-footer__links a {
    color: #ffffff;
    text-decoration: none;
}
.app-footer__links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ============================================================
 * Phase 2 design sec 6.5: Manager dashboard stub (.manager-stub)
 * Honest "coming in v1.1" page that captures intent rather than
 * silently mis-routing Manager users to the Artist dashboard.
 * ============================================================ */
.manager-stub {
    max-width: 720px;
    margin: 0 auto;
    color: var(--color-text);
    font-family: var(--font-sans);
}
.manager-stub__hero {
    text-align: center;
    margin-bottom: var(--space-8);
}
.manager-stub__icon {
    font-size: 4rem;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}
.manager-stub__title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--space-3);
    line-height: var(--leading-tight);
}
.manager-stub__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    line-height: var(--leading-normal);
    margin: 0;
}
.manager-stub__notify {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-4) var(--space-6);
    background: var(--color-surface);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius);
    margin-bottom: var(--space-8);
    color: var(--color-text);
}
.manager-stub__notify i {
    font-size: var(--text-2xl);
    color: var(--color-primary);
    flex-shrink: 0;
}
.manager-stub__next-steps {
    margin-bottom: var(--space-8);
}
.manager-stub__next-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--space-3);
}
.manager-stub__next-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.manager-stub__next-list li {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding: var(--space-2) 0;
    color: var(--color-text-muted);
}
.manager-stub__next-list li i {
    color: var(--color-primary);
    font-size: var(--text-lg);
    flex-shrink: 0;
    margin-top: 2px;
}
.manager-stub__next-list a {
    color: var(--color-primary);
    text-decoration: underline;
}
.manager-stub__actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================================
 * Booking flow polish (Phase 2 design sec 6.8 + 6.9)
 * Token-based card surfaces for booking forms and details.
 * ============================================================ */
.booking-form,
.booking-details__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
}
.booking-details__card .card-header {
    background: var(--color-surface-2);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    padding: var(--space-3) var(--space-4);
}
.booking-details__card .card-body {
    padding: var(--space-4);
}
.booking-details__offer {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
}
