/* For content  */
.scroll-banner {
    width: 100%;
    overflow: hidden;
    background: var(--navy);
    padding: 8px 0;
    white-space: nowrap;
}

.scroll-banner-track {
    display: inline-flex;
    animation: scroll-left 22s linear infinite;
}

.scroll-banner-track span {
    display: inline-block;
    padding-right: 40px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.scroll-banner {
    width: 100%;
    overflow: hidden;
    background: var(--navy);
    padding: 8px 0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* html[data-theme="dark"] .scroll-banner-track span {
    color: var(--gold) !important;
} */

.scroll-banner:hover .scroll-banner-track {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 
Ligth and Dark mode 
 */html[data-theme="dark"] {
    --bg: #14181f;
    --surface: #1e232c;
    --text: #e6e9ef;
    --text-muted: #9aa4b2;
    --border: #2c333f;
    --navy: #3b6fd1;
    --navy-dark: #2a4fa0;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] body {
    background: var(--bg) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .card,
/* [data-theme="dark"] .container, */
[data-theme="dark"] .doc-feed,
[data-theme="dark"] .data-table,
[data-theme="dark"] .dropzone,
[data-theme="dark"] .upload-field,
[data-theme="dark"] table {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #262c37 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] label,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] td{
    color: var(--text) !important;
}

html[data-theme="dark"] .secondary-btn {
    background: rgba(59, 111, 209, 0.18);
    color: var(--gold);
    border: 1px solid var(--navy);
}

html[data-theme="dark"] .secondary-btn:hover {
    background: var(--navy);
    color: #ffffff;
}
html[data-theme="dark"] .delete-btn {
    background: rgba(214, 69, 69, 0.18);
    color: #ff8080;
    border: 1px solid rgba(214, 69, 69, 0.4);
}

html[data-theme="dark"] .delete-btn:hover {
    background: var(--danger);
    color: #ffffff;
}

/* Hardcoded surfaces that don't use variables — need explicit
   dark-mode overrides since they won't respond to the variable
   swap above on their own. */
html[data-theme="dark"] .dropzone,
html[data-theme="dark"] .dropzone.has-file,
html[data-theme="dark"] .dropzone:hover,
html[data-theme="dark"] .dropzone:focus-visible,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .doc-feed-item,
html[data-theme="dark"] .nav-dropdown,
html[data-theme="dark"] .share-menu,
html[data-theme="dark"] .doc-feed-share,
html[data-theme="dark"] .dropzone-remove {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] .data-table tbody tr:hover {
    background: #262c37;
}

html[data-theme="dark"] .dropzone-empty,
html[data-theme="dark"] .dropzone-hint {
    color: var(--text-muted);
}
/* 
Theme 
*/

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.theme-toggle-btn:hover {
    background: rgba(11, 61, 145, 0.08);
}

/* =========================================================
   COURTCONNECT NAVBAR
   RESPONSIVE + PROPER LOGO ALIGNMENT
   ========================================================= */

.navbar {
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    background: #0B3D91;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 16px;
    gap: 15px;
    margin: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    overflow: visible;
}

/* =========================================================
   BRAND
   ========================================================= */

.navbar .brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    height: 100%;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
    color: #ffffff;
    line-height: 1;
    white-space: nowrap;
}

/* =========================================================
   LOGO
   ========================================================= */

.navbar .brand-logo {
    display: block;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    flex: 0 0 36px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    object-fit: contain;
}

/* =========================================================
   BRAND TEXT
   ========================================================= */

.navbar .brand-text {
    display: block;
    margin: 0;
    padding: 0;
    color: #ffffff;
    font-size: 19px;
    font-weight: 600;
    line-height: 36px;
    height: 36px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.navbar .nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

/* =========================================================
   NAV RIGHT (hamburger + links + user menu, grouped so the
   user menu can stay visible while the links collapse)
   ========================================================= */

.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

/* =========================================================
   HAMBURGER TOGGLE (mobile only)
   ========================================================= */

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.12);
}

.nav-toggle-icon-close {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon-open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon-close {
    display: block;
}

/* =========================================================
   NAVIGATION ITEMS
   ========================================================= */

.navbar .nav-menu li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* =========================================================
   NAVIGATION LINKS
   ========================================================= */

.navbar .nav-menu li a {
    display: flex;
    align-items: center;
    min-height: 36px;
    box-sizing: border-box;
    padding: 0 10px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    border-radius: 5px;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.navbar .nav-menu li a:hover {
    color: #FFD166;
    background: rgba(255, 255, 255, 0.10);
}

.navbar .nav-menu li a.is-active {
    color: #FFD166;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 600;
}

/* =========================================================
   USER MENU (avatar + dropdown)
   ========================================================= */

.nav-user {
    position: relative;
    flex: 0 0 auto;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    box-sizing: border-box;
    padding: 0 10px 0 6px;
    background: none;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-user-btn:hover,
.nav-user-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.10);
    color: #FFD166;
}

.nav-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
}

.nav-user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-user-caret {
    transition: transform 0.2s ease;
}

.nav-user-btn[aria-expanded="true"] .nav-user-caret {
    transform: rotate(180deg);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #ffffff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 50;
}

.nav-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li {
    display: block;
    margin: 0;
    padding: 0;
}

.nav-dropdown li a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* .nav-dropdown li a:hover {
    background: rgba(11, 61, 145, 0.08);
    color: var(--navy);
    font-weight: 700;
} */

html[data-theme="dark"] .nav-dropdown li a:hover,
html[data-theme="dark"] .nav-dropdown li a:hover svg {
    color: var(--gold);
}

.nav-dropdown li a svg {
    flex: 0 0 auto;
    color: var(--text-muted);
}

/* .nav-dropdown li a:hover svg {
    color: var(--navy);
} */
.nav-dropdown li a:hover {
    background: rgba(11, 61, 145, 0.08) !important;
    color: var(--navy) !important;
    font-weight: 700;
}

.nav-dropdown li a:hover svg {
    color: var(--navy) !important;
}

html[data-theme="dark"] .nav-dropdown li a:hover {
    color: var(--gold) !important;
}

html[data-theme="dark"] .nav-dropdown li a:hover svg {
    color: var(--gold) !important;
}
.nav-dropdown-divider {
    height: 1px;
    margin: 4px 6px;
    background: var(--border);
}

@media (max-width: 768px) {
    .nav-user-name {
        max-width: 90px;
    }
}

@media (max-width: 480px) {
    .nav-user-name {
        display: none;
    }

    .nav-user-btn {
        padding: 0 6px;
        gap: 4px;
    }
}

/* =========================================================
   TABLET
   (still shows the full inline link row — only sizes shrink)
   ========================================================= */

@media (max-width: 900px) {
    .navbar {
        min-height: 54px;
        padding: 6px 12px;
        gap: 10px;
    }

    .navbar .brand {
        gap: 7px;
    }

    .navbar .brand-logo {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        max-width: 32px;
        max-height: 32px;
        flex-basis: 32px;
    }

    .navbar .brand-text {
        height: 32px;
        font-size: 17px;
        line-height: 32px;
    }

    .navbar .nav-menu {
        gap: 4px;
    }

    .navbar .nav-menu li a {
        min-height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }
}

/* =========================================================
   MOBILE
   Below this width the plain links collapse behind a
   hamburger toggle; the user avatar + dropdown stay visible
   in the bar at all times (no hover required, click/tap only).
   ========================================================= */

@media (max-width: 760px) {
    .navbar {
        min-height: 50px;
        padding: 5px 9px;
        gap: 8px;
        flex-wrap: nowrap;
        position: relative;
    }

    .navbar .brand {
        gap: 6px;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .navbar .brand-logo {
        width: 29px;
        height: 29px;
        min-width: 29px;
        min-height: 29px;
        max-width: 29px;
        max-height: 29px;
        flex: 0 0 29px;
    }

    .navbar .brand-text {
        height: 29px;
        font-size: 15px;
        line-height: 29px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-toggle {
        display: flex;
        order: -1;
    }

    .navbar .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin: 0;
        padding: 8px;
        background: var(--navy-dark);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.15s ease, visibility 0.15s ease;
        z-index: 60;
    }

    .navbar .nav-menu.is-open {
        max-height: 60vh;
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
    }

    .navbar .nav-menu li {
        width: 100%;
    }

    .navbar .nav-menu li a {
        width: 100%;
        min-height: 42px;
        padding: 0 12px;
        font-size: 14px;
        border-radius: 6px;
    }

    .nav-user-name {
        max-width: 70px;
    }
}

@media (max-width: 480px) {
    .navbar {
        min-height: 46px;
        padding: 5px 7px;
        gap: 6px;
    }

    .navbar .brand {
        gap: 5px;
    }

    .navbar .brand-logo {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        max-width: 26px;
        max-height: 26px;
        flex-basis: 26px;
    }

    .navbar .brand-text {
        height: 26px;
        font-size: 14px;
        line-height: 26px;
    }
}

@media (max-width: 360px) {
    .navbar {
        min-height: 44px;
        padding: 4px 6px;
        gap: 4px;
    }

    .navbar .brand {
        gap: 4px;
    }

    .navbar .brand-logo {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        max-width: 24px;
        max-height: 24px;
        flex-basis: 24px;
    }

    .navbar .brand-text {
        height: 24px;
        font-size: 13px;
        line-height: 24px;
    }
}

@media (max-width: 320px) {
    .navbar {
        min-height: 42px;
        padding: 4px 5px;
        gap: 3px;
    }

    .navbar .brand {
        gap: 3px;
    }

    .navbar .brand-logo {
        width: 22px;
        height: 22px;
        min-width: 22px;
        min-height: 22px;
        max-width: 22px;
        max-height: 22px;
        flex-basis: 22px;
    }

    .navbar .brand-text {
        height: 22px;
        font-size: 12px;
        line-height: 22px;
    }
}

/* =========================================================
   =========================================================
   GLOBAL / BASE
   (same navy + gold palette as the navbar above)
   ========================================================= */

:root {
    --navy: #0B3D91;
    --navy-dark: #082c69;
    --gold: #FFD166;
    --gold-dark: #e8b93f;
    --bg: #f2f5fb;
    --surface: #ffffff;
    --text: #1f2733;
    --text-muted: #64748b;
    --border: #e3e8f2;
    --success: #1b8a4b;
    --success-bg: #e8f7ee;
    --danger: #d64545;
    --danger-bg: #fdeaea;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 16px rgba(11, 61, 145, 0.08);
    --shadow-lg: 0 10px 30px rgba(11, 61, 145, 0.12);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   MESSAGES
   ========================================================= */

.success-message,
p.success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(27, 138, 75, 0.25);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 500;
}

p.error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(214, 69, 69, 0.25);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 500;
}

.password-hint {
    margin: -8px 0 12px;
    font-size: 12px;
    color: var(--text-muted, #6b7280);
}

.password-hint--weak {
    color: var(--danger);
    font-weight: 600;
}

.password-hint--strong {
    color: var(--success);
    font-weight: 600;
}

/* =========================================================
   CONTAINER / CARD
   ========================================================= */

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 16px 48px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 26px;
}

.card h2 {
    margin: 0 0 20px;
    color: var(--navy);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.settings-container {
    width: 100%;
    max-width: 460px;
    margin: 24px auto 0;
}

.settings-container .card h2 {
    text-align: center;
    margin: 0 0 4px;
}

.settings-container .card > p.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 22px;
}

.settings-container form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-container form input {
    margin: 0;
}

.settings-container form button {
    margin-top: 4px;
}

.settings-container .auth-links {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* =========================================================
   FORMS
   ========================================================= */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.2px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fbfcfe;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--navy);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.12);
}

/* =========================================================
   PASSWORD FIELD WITH SHOW/HIDE TOGGLE
   ========================================================= */

.password-field {
    position: relative;
}

.password-field input[type="password"],
.password-field input[type="text"] {
    padding-right: 42px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.toggle-password:hover {
    color: var(--navy);
    background: rgba(11, 61, 145, 0.08);
}

.toggle-password:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 1px;
}

.toggle-password .icon-eye-off {
    display: none;
}

.toggle-password.is-visible .icon-eye {
    display: none;
}

.toggle-password.is-visible .icon-eye-off {
    display: block;
}

#headerDate {
    max-width: 220px;
    margin-bottom: 8px;
}

.court-row,
#courtContainer > input {
    margin-bottom: 10px;
}

.court-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.court-row input {
    flex: 1 1 auto;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.submit-btn,
.secondary-btn,
.removeCourt,
button[name="login"],
button[name="register"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.05s ease, box-shadow 0.2s ease;
}

.submit-btn,
button[name="login"],
button[name="register"] {
    width: 100%;
    padding: 13px 18px;
    background: var(--navy);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(11, 61, 145, 0.25);
}

.submit-btn:hover,
button[name="login"]:hover,
button[name="register"]:hover {
    background: var(--navy-dark);
}

.submit-btn:active,
button[name="login"]:active,
button[name="register"]:active {
    transform: translateY(1px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-group {
    margin-top: 22px;
}

.secondary-btn {
    padding: 9px 14px;
    background: rgba(255, 209, 102, 0.25);
    color: var(--navy-dark);
    border: 1px solid var(--gold-dark);
}

.secondary-btn:hover {
    background: var(--gold);
}

.removeCourt {
    padding: 9px 14px;
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(214, 69, 69, 0.3);
    flex: 0 0 auto;
}

.removeCourt:hover {
    background: var(--danger);
    color: #ffffff;
}

.edit-btn,
.delete-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
}

.edit-btn {
    background: rgba(11, 61, 145, 0.1);
    color: var(--navy);
}

.edit-btn:hover {
    background: var(--navy);
    color: #ffffff;
}

.delete-btn {
    background: var(--danger-bg);
    color: var(--danger);
}

.delete-btn:hover {
    background: var(--danger);
    color: #ffffff;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================================================
   TABLE (DASHBOARD)
   ========================================================= */

.table-responsive {
    width: 100%;
    overflow-x: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead th {
    text-align: left;
    background: var(--navy);
    color: #ffffff;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table thead th:first-child {
    border-top-left-radius: var(--radius-sm);
}

.data-table thead th:last-child {
    border-top-right-radius: var(--radius-sm);
}

.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
    word-break: break-word;
}

.data-table tbody td:first-child {
    white-space: nowrap;
    word-break: normal;
}

.data-table tbody tr:hover {
    background: #f7f9fd;
}

.data-table a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

/* =========================================================
   FULL-SCREEN DASHBOARD LAYOUT
   (no page horizontal scroll, everything fits the viewport)
   ========================================================= */

body.dashboard-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

body.dashboard-page .container {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
    padding: 18px;
    display: flex;
}

body.dashboard-page .card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-height: 75vh;
}

body.dashboard-page .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* Stack the table into cards on narrow screens so nothing
   ever scrolls sideways */

@media (max-width: 700px) {
    body.dashboard-page .data-table thead {
        display: none;
    }

    body.dashboard-page .data-table,
    body.dashboard-page .data-table tbody,
    body.dashboard-page .data-table tr,
    body.dashboard-page .data-table td {
        display: block;
        width: 100%;
    }

    body.dashboard-page .data-table tr {
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        margin: 0 0 12px;
        padding: 6px 4px;
        background: var(--surface);
    }

    body.dashboard-page .data-table td {
        border-bottom: none;
        padding: 8px 12px;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        text-align: right;
    }

    body.dashboard-page .data-table td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 12px;
        color: var(--navy);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        text-align: left;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    body.dashboard-page .action-buttons {
        justify-content: flex-end;
    }
}

/* =========================================================
   LOGIN / REGISTER (AUTH PAGES)
   ========================================================= */

body.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 209, 102, 0.16), transparent 45%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 55%, #061f4d 100%);
}

/* =========================================================
   AUTH PAGES — professional polish + subtle motion
   ========================================================= */

body.auth-page {
    background-size: 200% 200%;
    animation: authGradientShift 14s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes authGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Soft floating light orbs drifting in the background */
body.auth-page::before,
body.auth-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

body.auth-page::before {
    width: 340px;
    height: 340px;
    background: rgba(255, 209, 102, 0.18);
    top: -80px;
    left: -80px;
    animation: floatOrb1 16s ease-in-out infinite;
}

body.auth-page::after {
    width: 420px;
    height: 420px;
    background: rgba(255, 255, 255, 0.08);
    bottom: -120px;
    right: -100px;
    animation: floatOrb2 18s ease-in-out infinite;
}

@keyframes floatOrb1 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(40px, 30px); }
}

@keyframes floatOrb2 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-30px, -40px); }
}

.login-container {
    position: relative;
    z-index: 1;
    animation: authCardEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes authCardEnter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-logo-badge {
    animation: logoPulse 3.5s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); }
    50%      { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 0 8px rgba(255, 209, 102, 0.12); }
}

.login-container input:focus,
.login-container select:focus,
.login-container textarea:focus {
    transform: translateY(-1px);
}

.login-container form button[type="submit"] {
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.login-container form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 61, 145, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    body.auth-page,
    body.auth-page::before,
    body.auth-page::after,
    .login-container,
    .auth-logo-badge {
        animation: none;
    }
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.auth-logo-badge {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    border: 3px solid rgba(255, 209, 102, 0.85);
}

.auth-logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-brand .brand-text {
    color: black;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

@media (max-width: 420px) {
    .auth-logo-badge {
        width: 88px;
        height: 88px;
    }
}

.login-container .card {
    box-shadow: var(--shadow-lg);
    padding: 34px 30px 28px;
}

.login-container h2 {
    text-align: center;
    margin: 0 0 4px;
    font-size: 22px;
}

.login-container .card > p.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 22px;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-container form input {
    margin: 0;
}

.login-container form button {
    margin-top: 4px;
}

.login-container .auth-links {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.login-container .auth-links a,
.login-container p a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.login-container .auth-links a:hover,
.login-container p a:hover {
    text-decoration: underline;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--navy);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.link-btn:hover {
    text-decoration: underline;
}

.login-container hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 22px 0 6px;
}



/* =========================================================
   NAVBAR — WELCOME TEXT
   ========================================================= */




@media (max-width: 768px) {
    .navbar .nav-menu li.nav-welcome {
        font-size: 11px;
    }
}

@media (max-width: 560px) {
    /* Keep the mobile navbar compact — the greeting takes a back seat
       to Dashboard/Logout, which are the actionable links */

    .navbar .nav-menu li.nav-welcome {
        display: none;
    }
}

/* =========================================================
   INLINE FORM STATUS
   (replaces browser alert() popups on the Submit & Share flow)
   ========================================================= */

.form-status {
    margin-top: 12px;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.25s ease, max-height 0.25s ease, padding 0.25s ease;
}

.form-status.is-visible {
    opacity: 1;
    max-height: 120px;
    padding: 10px 14px;
}

.form-status--success.is-visible {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(27, 138, 75, 0.25);
}

.form-status--error.is-visible {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(214, 69, 69, 0.25);
}

.form-status--info.is-visible {
    background: rgba(11, 61, 145, 0.08);
    color: var(--navy);
    border: 1px solid rgba(11, 61, 145, 0.2);
}

.auth-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(11, 61, 145, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

/* Small phones: tighten the auth card */

@media (max-width: 420px) {
    .login-container .card {
        padding: 26px 20px 22px;
    }
}

/* =========================================================
   =========================================================
   UPDATE COURT DOCUMENT — UPLOAD & SHARE PAGE
   ========================================================= */

.container--wide {
    max-width: 1120px;
}

.doc-share-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 22px;
    align-items: start;
}

.doc-share-card {
    padding: 28px 26px 26px;
}

.doc-share-card .subtitle {
    margin: -8px 0 20px;
    color: var(--text-muted);
    font-size: 13.5px;
}

.error-message {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(214, 69, 69, 0.25);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 500;
}

/* ---------------------------------------------------------
   UPLOAD GRID (image + pdf side by side)
--------------------------------------------------------- */

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.upload-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.2px;
}

.upload-label svg {
    flex: 0 0 auto;
    color: var(--navy);
}

.optional-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ---------------------------------------------------------
   DROPZONE
--------------------------------------------------------- */

.dropzone {
    position: relative;
    min-height: 160px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    background: #fbfcfe;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
    border-color: var(--navy);
    background: #ffffff;
}

.dropzone:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.12);
}

.dropzone.is-dragover {
    border-color: var(--navy);
    background: rgba(11, 61, 145, 0.05);
    box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.12);
}

.dropzone.has-file {
    border-style: solid;
    background: #ffffff;
}

.dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    color: var(--text-muted);
}

.dropzone-empty[hidden] {
    display: none;
}

.dropzone-empty svg {
    color: var(--navy);
    opacity: 0.55;
    margin-bottom: 2px;
}

.dropzone-empty p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text);
}

.dropzone-empty p strong {
    color: var(--navy);
}

.dropzone-hint {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* ---- preview state ---- */

.dropzone-preview {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.dropzone-preview[hidden] {
    display: none;
}

.dropzone-preview img {
    max-width: 100%;
    max-height: 100px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    object-fit: cover;
}

.dropzone-preview--file {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 12px;
    padding: 4px 34px 4px 4px;
}

.pdf-chip-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(11, 61, 145, 0.08);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropzone-file-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.dropzone-file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropzone-file-size {
    font-size: 11.5px;
    color: var(--text-muted);
}

.dropzone-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.15s ease, color 0.15s ease;
}

.dropzone-remove:hover {
    background: var(--danger);
    color: #ffffff;
}

.dropzone-preview--file .dropzone-remove {
    position: static;
    margin-left: auto;
    box-shadow: none;
}

/* ---------------------------------------------------------
   CAPTION
--------------------------------------------------------- */

.caption-group {
    position: relative;
    margin-bottom: 6px;
}

.caption-group textarea {
    resize: vertical;
    min-height: 76px;
}

.caption-counter {
    display: block;
    text-align: right;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

.share-form-warning {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--danger);
    font-weight: 500;
}

/* ---------------------------------------------------------
   RECENTLY SHARED FEED
--------------------------------------------------------- */

.doc-feed {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 20px;
    max-height: 640px;
    overflow-y: auto;
}

.doc-feed-title {
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.doc-feed-empty {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.doc-feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-feed-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fbfcfe;
}

.doc-feed-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: block;
}

.doc-feed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.doc-feed-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doc-feed-caption {
    margin: 0;
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
}

.doc-feed-pdf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--navy);
    background: rgba(11, 61, 145, 0.08);
    border-radius: 999px;
    padding: 4px 10px;
    text-decoration: none;
    max-width: 100%;
}

.doc-feed-pdf span,
.doc-feed-pdf {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-feed-pdf:hover {
    background: var(--navy);
    color: #ffffff;
}

.doc-feed-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---------------------------------------------------------
   ACTION BAR (Share + Delete)
--------------------------------------------------------- */

.doc-feed-actions {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex: 0 0 auto;
}

.share-menu-wrap {
    position: relative;
}

.doc-feed-share {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--navy);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.doc-feed-share:hover {
    background: rgba(11, 61, 145, 0.08);
    border-color: var(--navy);
}

.doc-feed-share:disabled {
    opacity: 0.6;
    cursor: default;
}

.share-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 168px;
    margin: 0;
    padding: 6px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 55;
}

.share-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-menu a,
.share-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.share-menu a:hover,
.share-menu button:hover {
    background: rgba(11, 61, 145, 0.08);
    color: var(--navy);
}

.share-menu svg {
    flex: 0 0 auto;
    color: var(--text-muted);
}

.share-menu a:hover svg,
.share-menu button:hover svg {
    color: var(--navy);
}

.doc-feed-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--text-muted);
    background: transparent;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.doc-feed-delete:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (max-width: 860px) {
    .doc-share-layout {
        grid-template-columns: 1fr;
    }

    .doc-feed {
        max-height: none;
    }
}

@media (max-width: 560px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }

    .dropzone-file-name {
        max-width: 140px;
    }
}

/* =========================================================
   SITE FOOTER
   ========================================================= */

.site-footer {
    background: var(--navy-dark);
    color: #cdd8ee;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 44px 24px 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.footer-col h4 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: #cdd8ee;
    text-decoration: none;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}

.footer-col a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.footer-col .ext-icon {
    flex: 0 0 auto;
    opacity: 0.75;
}

.footer-address,
.footer-updated {
    margin: 0 0 10px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #cdd8ee;
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.footer-socials a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background 0.15s ease, color 0.15s ease;
}

.footer-socials a:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 24px;
    text-align: center;
}

.footer-bottom p {
    margin: 0 0 4px;
    font-size: 12.5px;
    color: #a9b8d8;
}

.footer-bottom p:last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 24px;
    }
}

@media (max-width: 560px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 36px 20px 24px;
    }
}