/* ============================================================
   MedStart — Brand CSS (global chrome)
   Colors: #001C2C (navy), #00ACE7 (teal blue), #64DFFF (sky blue), #FFFFFF (bg)
   Font: Poppins (loaded via Google Fonts in _Layout.cshtml)
   Per-feature CSS is loaded by individual views via @section Styles.
   ============================================================ */

/* ============================================================
   Utility Classes
   ============================================================ */
.d-none { display: none; }

/* ============================================================
   Preloader
   ============================================================ */
.preloader-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(242, 242, 242, 0.7);
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease;
    opacity: 0;
}

.preloader-overlay.active {
    display: flex;
    opacity: 1;
}

.preloader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-bg);
    border-top-color: var(--color-blue);
    border-radius: 50%;
    animation: preloader-spin 0.8s linear infinite;
}

@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

/* CSS Custom Properties */
:root {
    --font-primary:     'Poppins', sans-serif;

    --color-navy:       #001C2C;
    --color-blue:       #00ACE7;
    --color-sky:        #64DFFF;
    --color-bg:         #FFFFFF;
    --color-white:      #FFFFFF;
    --color-text:       #1a1a2e;
    --color-text-muted: #6b7280;
    --color-border:     #e0e0e0;
    --color-card-bg:    #FFFFFF;
    --color-error:      #e74c3c;
    --color-error-dark: #c0392b;
    --color-navy-deep:  #00111a;
    --color-navy-mid:   #003050;
    --color-navy-light: #005080;

    --color-danger:       #dc3545;
    --color-danger-dark:  #c82333;
    --color-danger-text:  #991b1b;
    --color-danger-bg:    #fee2e2;
    --color-danger-border:#fca5a5;
    --color-danger-alt:   #dc2626;

    --color-success:       #198754;
    --color-success-text:  #065f46;
    --color-success-bg:    #d1fae5;
    --color-success-border:#a7f3d0;
    --color-success-alt:   #16a34a;
    --color-success-bg-light: #e8f8ef;
    --color-success-text-alt: #1a7f37;
    --color-success-border-alt: #a3d9b1;

    --color-warning-bg:    #fff3cd;
    --color-warning-border:#ffc107;
    --color-warning-text:  #664d03;
    --color-warning-link:  #997404;
    --color-warning-alt-bg:   #fef3c7;
    --color-warning-alt-border:#f59e0b;
    --color-warning-alt-text: #92400e;

    --color-info:         #0992C2;
    --color-info-alt:     #0098cc;
    --color-blue-hover:   #006fa0;
    --color-blue-hover-alt:#007090;

    --color-muted:        #6c757d;
    --color-orange:       #e06b10;
    --color-link-blue:    #0d6efd;

    --color-gray-100:     #f8f9fa;
    --color-gray-200:     #f5f5f5;
    --color-gray-300:     #eee;
    --color-gray-400:     #e8e8e8;
    --color-gray-500:     #ccc;
    --color-gray-600:     #bbb;
    --color-gray-700:     #aaa;
    --color-gray-800:     #999;
    --color-gray-900:     #444;
    --color-text-dark:    #2a2a2a;
    --color-green-light:  #4ade80;

    --color-info-bg-light:  #f0f9ff;
    --color-info-bg:        #e6f4fd;
    --color-info-bg-alt:    #d8f0fa;
    --color-danger-bg-light:#fde8e8;
    --color-danger-bg-alt:  #fef2f2;
    --color-danger-bg-alt-border: #ef4444;
    --color-danger-rose-bg: #ffeef0;
    --color-danger-rose-text:#d1242f;
    --color-danger-rose-border:#f5c6cb;

    --navbar-height:    64px;
    --radius:           0.5rem;
    --shadow-sm:        0 1px 3px rgba(0, 28, 44, 0.08);
    --shadow-md:        0 4px 16px rgba(0, 28, 44, 0.12);
    --shadow-lg:        0 8px 32px rgba(0, 28, 44, 0.16);
}


/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

input, select, textarea, button {
    font-family: inherit;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--color-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-navy);
    text-decoration: underline;
}

/* ── Dropdown <option> brand styling ────────────────────── */
select option {
    background-color: var(--color-white);
    color: var(--color-navy);
    font-family: var(--font-primary);
}

select option:checked {
    background-color: var(--color-navy);
    color: var(--color-white);
}

select option:disabled,
select option[value=""] {
    color: var(--color-text-muted);
}

/* ============================================================
   Navbar
   ============================================================ */
.ms-navbar {
    background-color: var(--color-navy);
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 28, 44, 0.35);
}

.ms-navbar .navbar-inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    gap: 1rem;
}

/* Brand */
.ms-navbar .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.ms-navbar .brand-logo {
    width: 30px;
    background: linear-gradient(135deg, var(--color-sky), var(--color-blue));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-navy);
    letter-spacing: -0.5px;
}

.ms-navbar .brand-name {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-white);
    letter-spacing: -0.3px;
}

/* Navigation links */
.ms-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.ms-navbar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.ms-navbar .nav-link:hover {
    color: var(--color-blue);
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.ms-navbar .nav-link.active {
    color: var(--color-blue);
    font-weight: 600;
}

/* Compact navbar search */
.ms-navbar .nav-search {
    flex: 1;
    max-width: 360px;
    margin: 0 1rem;
    position: relative;
}

.ms-navbar .nav-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 2rem;
    overflow: hidden;
    transition: background 0.2s, border-color 0.2s;
}

.ms-navbar .nav-search-form:focus-within {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--color-sky);
}

.ms-navbar .nav-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.45rem 1rem;
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 0.85rem;
}

.ms-navbar .nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.ms-navbar .nav-search-btn {
    background: transparent;
    border: none;
    padding: 0.45rem 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.ms-navbar .nav-search-btn:hover {
    color: var(--color-white);
}

/* Clear (×) button — shown only when the input has a value (JS toggles .has-value on the form) */
.ms-navbar .nav-search-clear,
.ms-navbar-mobile .nav-search-clear {
    background: transparent;
    border: none;
    padding: 0 0.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.25rem;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.ms-navbar .nav-search-clear:hover,
.ms-navbar-mobile .nav-search-clear:hover {
    color: var(--color-white);
}

.nav-search-form.has-value .nav-search-clear {
    display: flex;
}

/* Search autocomplete dropdown */
.nav-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 28, 44, 0.15);
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
}

.nav-search-result {
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--color-bg);
}

.nav-search-result:last-child {
    border-bottom: none;
}

.nav-search-result:hover,
.nav-search-result.active {
    background: var(--color-bg);
}

.nav-search-result-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-navy);
    line-height: 1.3;
}

.nav-search-result-meta {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
    line-height: 1.3;
}

.nav-search-highlight {
    background: transparent;
    color: var(--color-blue);
    font-weight: 600;
}

.nav-search-loading,
.nav-search-no-results {
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    font-family: var(--font-primary);
}

/* Nav actions */
.ms-navbar .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.ms-navbar .btn-nav-ghost {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.38rem 0.9rem;
    border-radius: 2rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.ms-navbar .btn-nav-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.55);
    color: var(--color-white);
    text-decoration: none;
}

.ms-navbar .btn-nav-primary {
    background: var(--color-blue);
    border: 1.5px solid var(--color-blue);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.38rem 0.9rem;
    border-radius: 2rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    white-space: nowrap;
}

.ms-navbar .btn-nav-primary:hover {
    background: var(--color-sky);
    border-color: var(--color-sky);
    color: var(--color-navy);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Bell icon (notification placeholder) */
.ms-navbar .nav-bell {
    background: transparent;
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}

.ms-navbar .nav-bell:hover {
    color: var(--color-white);
    background: var(--color-sky);
}

/* Notification wrapper (bell + dropdown container) */
.notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Badge counter */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-error);
    color: var(--color-white);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Dropdown panel */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: -8px;
    width: 360px;
    max-height: 480px;
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--color-gray-300);
}

.notification-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-dark);
}

.notification-bulk-actions {
    display: flex;
    gap: 10px;
}

.notification-bulk-btn {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--color-blue);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: color 0.2s;
}

.notification-bulk-btn:hover {
    color: var(--color-sky);
}

.notification-bulk-btn-danger {
    color: var(--color-error);
}

.notification-bulk-btn-danger:hover {
    color: var(--color-error-dark);
}

/* Notification list */
.notification-list {
    overflow-y: auto;
    max-height: 340px;
    flex: 1;
}

/* Single notification item */
.notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 10px;
    border-bottom: 1px solid var(--color-gray-200);
    transition: background 0.15s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--color-gray-100);
}

.notification-item.unread {
    background: var(--color-info-bg-light);
}

.notification-item.unread:hover {
    background: var(--color-info-bg);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    font-size: 0.82rem;
    color: var(--color-gray-900);
    margin: 0 0 4px 0;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-item.unread .notification-message {
    font-weight: 600;
    color: var(--color-dark);
}

.notification-time {
    font-size: 0.72rem;
    color: var(--color-gray-800);
}

/* Action buttons on each item */
.notification-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: flex-start;
    padding-top: 2px;
}

.notification-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: var(--color-gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.notification-action-btn:hover {
    color: var(--color-blue);
    background: rgba(0, 172, 231, 0.08);
}

.notification-action-delete:hover {
    color: var(--color-error);
    background: rgba(231, 76, 60, 0.08);
}

/* Empty state */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    color: var(--color-gray-600);
}

.notification-empty svg {
    margin-bottom: 10px;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 0.85rem;
    margin: 0;
}

/* Loading spinner */
.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
}

.notification-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-gray-300);
    border-top-color: var(--color-blue);
    border-radius: 50%;
    animation: notif-spin 0.7s linear infinite;
}

@keyframes notif-spin {
    to { transform: rotate(360deg); }
}

/* Load more footer */
.notification-footer {
    padding: 8px 16px 12px;
    text-align: center;
    border-top: 1px solid var(--color-gray-300);
}

.notification-load-more {
    background: none;
    border: none;
    color: var(--color-blue);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 6px;
    font-family: inherit;
    transition: background 0.15s;
}

.notification-load-more:hover {
    background: rgba(0, 172, 231, 0.08);
}

/* Responsive: full-width dropdown on mobile */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed;
        top: 60px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
}

/* Profile avatar & dropdown */
.ms-navbar .nav-profile-wrapper {
    position: relative;
}

.ms-navbar .nav-avatar-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s;
}

.ms-navbar .nav-avatar-btn:hover {
    border-color: var(--color-sky);
}

.ms-navbar .nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ms-navbar .nav-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--color-white);
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 28, 44, 0.2);
    min-width: 200px;
    padding: 0.4rem 0;
    z-index: 1100;
    pointer-events: none;
}

.ms-navbar .nav-profile-wrapper.open .nav-dropdown {
    pointer-events: auto;
}

.ms-navbar .nav-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.55rem 1rem;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-dark);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

.ms-navbar .nav-dropdown-item:hover {
    background: var(--color-light);
    color: var(--color-blue);
}

.ms-navbar .nav-dropdown-divider {
    height: 1px;
    background: var(--color-gray-400);
    margin: 0.3rem 0;
}

.ms-navbar .nav-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
}

.ms-navbar .nav-dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ms-navbar .nav-dropdown-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ms-navbar .nav-dropdown-name {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-navbar .nav-dropdown-email {
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile toggle */
.ms-navbar .navbar-toggle {
    display: none;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: var(--color-white);
    padding: 0.35rem 0.55rem;
    cursor: pointer;
}

.ms-navbar .navbar-toggle svg {
    display: block;
}

/* Compact Sign Up button used in mobile header for guests */
.ms-navbar .btn-nav-compact {
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Desktop-only / mobile-only visibility toggles inside the navbar */
.ms-navbar .mobile-only {
    display: none;
}

/* Mobile search row — second header row, hidden on desktop */
.navbar-mobile-search {
    display: none;
}

/* Breakpoint: mobile layout */
@media (max-width: 768px) {
    .ms-navbar {
        height: auto;
        flex-direction: column;
        padding: 0;
        position: static;
        box-shadow: none;
        align-items: stretch;
    }

    .ms-navbar .navbar-inner {
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: var(--color-navy);
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0 1rem;
        height: var(--navbar-height);
        gap: 0.5rem;
        box-shadow: 0 2px 8px rgba(0, 28, 44, 0.35);
    }

    .ms-navbar .brand-name {
        font-size: 1.25rem;
    }

    .ms-navbar .nav-links,
    .ms-navbar .nav-search {
        display: none;
    }

    .ms-navbar .desktop-only {
        display: none !important;
    }

    .ms-navbar .mobile-only {
        display: inline-flex;
    }

    .ms-navbar .nav-actions {
        margin-left: auto;
        gap: 0.5rem;
    }

    .ms-navbar .navbar-toggle {
        display: flex;
        align-items: center;
    }

    .navbar-mobile-search {
        display: block;
        position: relative;
        background-color: var(--color-navy);
        padding: 0.6rem 1rem 0.8rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .navbar-mobile-search .nav-search-form {
        position: relative;
        background: rgba(255, 255, 255, 0.08);
        border: 1.5px solid rgba(255, 255, 255, 0.18);
        border-radius: 2rem;
        display: flex;
        overflow: hidden;
    }

    .navbar-mobile-search .nav-search-input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        padding: 0.55rem 1rem;
        color: var(--color-white);
        font-family: var(--font-primary);
        font-size: 0.9rem;
    }

    .navbar-mobile-search .nav-search-input::placeholder {
        color: rgba(255, 255, 255, 0.45);
    }

    .navbar-mobile-search .nav-search-btn,
    .navbar-mobile-search .nav-search-clear {
        background: transparent;
        border: none;
        padding: 0.5rem 0.75rem;
        color: rgba(255, 255, 255, 0.65);
        cursor: pointer;
    }

    .navbar-mobile-search .nav-search-dropdown {
        max-height: 250px;
    }
}

/* ============================================================
   Mobile Sidebar (slide-in from right)
   ============================================================ */
.ms-mobile-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(55vw, 320px);
    background-color: var(--color-navy);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 1200;
    padding: 3.5rem 1.25rem 1.5rem;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.35);
}

.ms-mobile-sidebar.open {
    transform: translateX(0);
}

.ms-mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1150;
}

.ms-mobile-sidebar-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mobile-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-sidebar-link {
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.75rem 0.75rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.mobile-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-sky);
    text-decoration: none;
}

.mobile-sidebar-link.active {
    color: var(--color-sky);
    background: rgba(100, 223, 255, 0.08);
    font-weight: 600;
}

.mobile-sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0.75rem 0;
}

.mobile-sidebar-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.65rem 1rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    color: var(--color-white);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.mobile-sidebar-cta:hover {
    background: rgba(100, 223, 255, 0.08);
    border-color: var(--color-sky);
    color: var(--color-sky);
    text-decoration: none;
}

/* ============================================================
   Main page wrapper
   ============================================================ */
.page-wrapper {
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
}

.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   Footer
   ============================================================ */
.ms-footer {
    background-color: var(--color-navy);
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    padding: 1.25rem 1.5rem;
    font-size: 0.82rem;
}

.ms-footer a {
    color: var(--color-sky);
    text-decoration: none;
    transition: color 0.2s;
}

.ms-footer a:hover {
    color: var(--color-white);
}

/* ============================================================
   Utility / Shared
   ============================================================ */
.container-page {
    width: 85vw;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus ring for accessibility */
:focus-visible {
    outline: 2px solid var(--color-sky);
    outline-offset: 2px;
}

/* TempData flash messages */
.alert-flash {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s ease;
}

.alert-flash.success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
    border: 1px solid var(--color-success-border);
}

.alert-flash.error {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
    border: 1px solid var(--color-danger-border);
}

.alert-flash-dismissible {
    position: relative;
}

.alert-flash-text {
    flex: 1;
}

.alert-flash-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.alert-flash-close:hover {
    opacity: 1;
}

/* Container with top padding for flash messages (_Layout) */
.container-page-flash {
    padding-top: 1rem;
}

/* Alert flash with extra bottom spacing (role layouts) */
.alert-flash-spaced {
    margin-bottom: 1.25rem;
}

/* Duration split field (used on Create/Edit Listing forms;
   kept global because the form control is very small) */
.cl-duration-row {
    display: flex;
    gap: 0.5rem;
}

.cl-duration-number {
    flex: 0 0 100px;
}

.cl-duration-unit {
    flex: 1;
}

/* ============================================================
   Global Smooth Transitions & Active Press Feedback
   ============================================================ */

/* Active (press) feedback for all interactive buttons */
.btn-primary:active,
.btn-cta:active,
.btn-search:active,
.btn-nav-primary:active,
.btn-nav-ghost:active,
.au-btn:active,
.au-page-btn:active:not(:disabled),
.au-btn-save:active,
.au-btn-cancel:active,
.au-btn-danger:active,
.au-modal-close:active,
.logout-modal-btn-yes:active,
.logout-modal-btn-no:active,
.nav-bell:active,
.nav-avatar-btn:active,
.nav-search-btn:active,
.navbar-toggle:active,
.admin-sidebar-toggle:active,
.au-tab:active,
.au-search-clear:active,
.alert-flash-close:active,
.cl-back-link:active {
    transform: scale(0.96);
}

/* Mobile nav ghost/primary buttons — add transitions */
.ms-navbar-mobile .btn-nav-ghost {
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.ms-navbar-mobile .btn-nav-primary {
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

/* Navbar toggle transition */
.ms-navbar .navbar-toggle {
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.ms-navbar .navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.55);
}

/* ============================================================
   Navbar Profile Dropdown — Animated (fade + slide)
   ============================================================ */
.ms-navbar .nav-dropdown {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.ms-navbar .nav-profile-wrapper.open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ============================================================
   Modal Primitives (shared chrome)
   Used by _Layout (accountDeactivatedModal), _Notifications (notifConfirmModal),
   and admin/poster pages. Base rules must load globally so invisible modals
   are taken out of flow (position: fixed) and don't push the footer down.
   ============================================================ */
.au-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 28, 44, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.au-modal {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 80vw;
    max-height: 90vh;
    overflow-y: auto;
}

.au-modal-sm {
    max-width: 420px;
}

.au-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.au-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-navy);
}

.au-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.au-modal-close:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.au-modal-body {
    padding: 1.25rem;
    text-align: center;
}

.au-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--color-border);
}

.au-modal-info {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: 0.75rem 0 0;
    padding: 0.6rem 0.75rem;
    background: var(--color-bg);
    border-radius: calc(var(--radius) - 2px);
}

.au-modal-lg {
    width: 70vw;
    max-width: 70vw;
    height: 80vh;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.au-modal-lg .au-modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* ============================================================
   Logout Confirmation Modal (rendered by _Navbar for all authenticated users)
   ============================================================ */
.logout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 28, 44, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.logout-modal-overlay.modal-visible {
    opacity: 1;
    visibility: visible;
}

.logout-modal-box {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem 2.5rem;
    max-width: 360px;
    width: 90%;
    text-align: center;
    font-family: var(--font-primary);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.2s;
}

.logout-modal-overlay.modal-visible .logout-modal-box {
    transform: translateY(0) scale(1);
}

.logout-modal-message {
    color: var(--color-navy);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
}

.logout-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.logout-modal-actions form {
    margin: 0;
}

.logout-modal-btn-yes {
    background: var(--color-blue);
    border: 1.5px solid var(--color-blue);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.logout-modal-btn-yes:hover {
    background: var(--color-sky);
    border-color: var(--color-sky);
    color: var(--color-navy);
}

.logout-modal-btn-no {
    background: transparent;
    border: 1.5px solid var(--color-navy);
    color: var(--color-navy);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.logout-modal-btn-no:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

/* ============================================================
   Modal Overlays — Animated (fade in/out)
   ============================================================ */
.au-modal-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.au-modal-overlay.modal-visible {
    opacity: 1;
    visibility: visible;
}

.au-modal-overlay .au-modal,
.au-modal-overlay .au-modal-lg,
.au-modal-overlay .au-modal-sm {
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s ease;
}

.au-modal-overlay.modal-visible .au-modal,
.au-modal-overlay.modal-visible .au-modal-lg,
.au-modal-overlay.modal-visible .au-modal-sm {
    transform: translateY(0) scale(1);
}

/* Modal close button positioned in top-right */
.modal-close-positioned {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* Loading state with extra padding (modals) */
.au-loading-padded {
    padding: 3rem 1rem;
}

/* ============================================================
   Account Deactivated Modal
   Rendered by _Layout.cshtml globally — kept in site.css
   ============================================================ */
.deactivated-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.25rem;
}

.deactivated-modal-message {
    text-align: center;
    font-family: var(--font-primary);
    color: var(--color-navy);
    font-size: 1rem;
    margin: 0;
}

/* ============================================================
   Pagination (shared across public programs, seeker dashboard,
   saved programs, admin / poster lists)
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-blue);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius);
    border: 1.5px solid var(--color-border);
    background: var(--color-white);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    text-decoration: none;
}

.pagination-btn:hover:not(.disabled) {
    border-color: var(--color-blue);
    background: rgba(0, 172, 231, 0.06);
    text-decoration: none;
    color: var(--color-blue);
}

.pagination-btn.disabled {
    color: var(--color-text-muted);
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text);
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    background: transparent;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    text-decoration: none;
}

.pagination-page:hover:not(.active) {
    border-color: var(--color-border);
    background: var(--color-white);
    text-decoration: none;
    color: var(--color-text);
}

.pagination-page.active {
    background: var(--color-blue);
    color: var(--color-white);
    border-color: var(--color-blue);
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

@media (max-width: 640px) {
    .pagination {
        gap: 0.35rem;
    }

    .pagination-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.78rem;
    }

    .pagination-page {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }
}

/* ============================================================
   404 Not Found page (rendered by Views/Shared/NotFound.cshtml
   which uses only shared chrome — kept global)
   ============================================================ */
.not-found-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
    padding: 2rem;
}

.not-found-code {
    font-size: 5rem;
    font-weight: 700;
    color: var(--color-blue);
    margin: 0;
    line-height: 1;
}

.not-found-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-navy);
    margin: 0.5rem 0 1rem;
}

.not-found-message {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 400px;
}

.not-found-btn {
    display: inline-block;
    background: var(--color-blue);
    color: var(--color-white);
    font-weight: 600;
    padding: 0.65rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.not-found-btn:hover {
    background: var(--color-sky);
}
