/* ============================================================
   RYTHM — Brand CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── Custom properties ───────────────────────────────────── */

:root {
    --gradient: linear-gradient(135deg, #FF8C42 0%, #E8589F 55%, #7B5BA6 100%);
    --color-orange:  #FF8C42;
    --color-pink:    #E8589F;
    --color-purple:  #7B5BA6;

    --color-bg:           #F5F7FA;
    --color-surface:      #ffffff;
    --color-surface-raised: #f3f4f6;
    --color-border:       #E8ECF4;
    --color-text:         #1B1F3B;
    --color-subtle:       #6B7280;

    --color-cancel-bg:   #FDE8F0;
    --color-cancel-text: #E8589F;
    --color-done-bg:     #E6F9F1;
    --color-done-text:   #27AE60;
    --color-danger:      #D32F2F;

    --color-status-ok-bg:        #f0fff4;
    --color-status-ok-text:      #276749;
    --color-status-warn-bg:      #fffbeb;
    --color-status-warn-text:    #92400e;
    --color-status-warn-alt:     #d69e2e;
    --color-status-error-bg:     #fff5f5;
    --color-status-error-text:   #c53030;
    --color-info-bg:             #e8f4fd;
    --color-info-text:           #1565c0;
    --color-unread:              #ef4444;
    --color-neutral-btn:         #4a5568;
    --color-info-btn:            #2b6cb0;
    --color-orange-subtle:       #fff7f0;

    --radius-card:   20px;
    --radius-btn:    12px;
    --radius-pill:   100px;
    --shadow-card:   0 4px 20px rgba(0,0,0,0.08);
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.06);
}

/* ── Dark mode overrides ─────────────────────────────────── */

[data-theme="dark"] {
    --color-bg:           #13151f;
    --color-surface:      #1e2130;
    --color-surface-raised: #2a2d3e;
    --color-border:       #2d3148;
    --color-text:         #e8ecf4;
    --color-subtle:       #8890a8;

    --color-cancel-bg:   #3d1a28;
    --color-cancel-text: #f472a8;
    --color-done-bg:     #0f2d1f;
    --color-done-text:   #4ade80;
    --color-danger:      #f87171;

    --color-status-ok-bg:        #0f2d1f;
    --color-status-ok-text:      #4ade80;
    --color-status-warn-bg:      #2d2000;
    --color-status-warn-text:    #fbbf24;
    --color-status-warn-alt:     #fbbf24;
    --color-status-error-bg:     #2d0f0f;
    --color-status-error-text:   #f87171;
    --color-info-bg:             #0d2340;
    --color-info-text:           #60a5fa;
    --color-unread:              #ef4444;
    --color-neutral-btn:         #5a6578;
    --color-info-btn:            #3b7dd8;
    --color-orange-subtle:       #2d1a0e;

    --shadow-card: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.3);
}

/* ── Reset & Base ─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--color-bg);
    margin: 0;
    padding: 0;
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-pink);
    font-weight: 500;
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ============================================================
   AUTH SCREENS
   ============================================================ */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
}

.auth-container { text-align: center; }

.auth-logo {
    width: 120px;
    margin-bottom: 25px;
}

.auth-card {
    display: inline-block;
    text-align: left;
    background: var(--color-surface);
    padding: 30px 35px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    min-width: 320px;
}

.auth-card h2 {
    margin-top: 0;
    font-weight: 600;
    font-size: 22px;
}

.auth-card input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-btn);
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s;
}
.auth-card input:focus { border-color: var(--color-pink); }

.auth-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border-radius: var(--radius-btn);
    background: var(--gradient);
    border: none;
    color: white;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}
.auth-btn:hover { opacity: 0.9; }

.auth-links {
    margin-top: 14px;
    font-size: 13px;
}
.auth-links a {
    display: block;
    margin-top: 5px;
    color: var(--color-pink);
}

.auth-error   { color: var(--color-danger); font-size: 14px; margin-bottom: 8px; }
.auth-success { color: var(--color-done-text); font-size: 14px; margin-bottom: 8px; }

/* ============================================================
   SITE BANNERS
   ============================================================ */

.site-banner {
    background: var(--color-purple);
    color: #fff;
    text-align: center;
    padding: 5px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 500;
}
.site-banner a { color: #fff; text-decoration: underline; }

.login-as-banner {
    background: #F59E0B;
    color: #1a1a1a;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 490;
    box-shadow: var(--shadow-sm);
}
.login-as-banner__btn {
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.body--login-as .app-header { top: 44px; }

.chat-badge {
    display: none;
    background: var(--color-unread);
    color: white;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
}

/* ============================================================
   APP HEADER
   ============================================================ */

.app-header {
    background: var(--color-surface);
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 400;
}

.app-logo { height: 38px; }

.app-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.app-user {
    font-weight: 500;
    font-size: 14px;
    color: var(--color-text);
}

.app-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--gradient);
    padding: 2px;
}
.app-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.app-avatar-menu {
    position: absolute;
    right: 0;
    top: 48px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 175px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 200;
}
.app-avatar-menu a {
    display: block;
    padding: 9px 16px;
    font-size: 14px;
    color: var(--color-text);
    white-space: nowrap;
}
.app-avatar-menu a:hover {
    background: var(--color-bg);
    text-decoration: none;
}
.app-avatar-menu hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin: 6px 0;
}
[data-theme="dark"] .app-avatar-menu hr {
    border-top-color: rgba(255,255,255,0.08);
}
.app-avatar-menu .menu-section {
    display: block;
    padding: 4px 16px 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--color-subtle);
}

.announcement-wrap {
    position: relative;
}
.announcement-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-subtle);
    padding: 4px;
    line-height: 0;
    border-radius: 8px;
    position: relative;
    transition: color 0.15s, background 0.15s;
}
.announcement-btn:hover {
    color: var(--color-orange, #FF8C42);
    background: var(--color-bg);
}
.announcement-btn--new {
    color: #FBBF24;
}
.announcement-btn--new svg {
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.55));
}
.announcement-new-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    background: #FBBF24;
    color: #1a1a1a;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.5;
    border: 1px solid rgba(0,0,0,0.18);
    pointer-events: none;
    white-space: nowrap;
}

.chat-bubble--new {
    background: linear-gradient(135deg, #FBBF24, #F59E0B) !important;
    box-shadow: 0 4px 20px rgba(251,191,36,0.45) !important;
}
.chat-bubble-new-label {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #FBBF24;
    color: #1a1a1a;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.5;
    border: 1px solid rgba(0,0,0,0.18);
    pointer-events: none;
    white-space: nowrap;
}

.admin-menu-wrap {
    position: relative;
}
.admin-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-subtle);
    padding: 6px;
    line-height: 0;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}
.admin-menu-btn:hover {
    color: var(--color-text);
    background: var(--color-bg);
}

.announcement-panel {
    position: absolute;
    right: 0;
    top: 48px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    border-radius: 14px;
    width: 320px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 200;
}
.announcement-panel-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--color-subtle);
    padding: 14px 16px 8px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
[data-theme="dark"] .announcement-panel-header {
    border-bottom-color: rgba(255,255,255,0.06);
}
.announcement-panel-body {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
}
.announcement-panel-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
}

/* On small screens: fixed position so the menu never clips off-screen */
@media (max-width: 480px) {
    .app-avatar-menu {
        position: fixed;
        right: 12px;
        top: 60px;
        min-width: 200px;
        max-height: calc(100vh - 80px);
        border-radius: 14px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.18);
        overflow-y: auto;
    }
    .app-avatar-menu a {
        padding: 10px 18px;
        font-size: 15px;
    }
    .app-avatar-menu .menu-section {
        padding: 6px 18px 3px;
    }
    .app-avatar-menu hr {
        margin: 8px 0;
    }
    .announcement-panel {
        position: fixed;
        right: 12px;
        top: 60px;
        width: calc(100vw - 24px);
        max-width: 360px;
    }
}

/* Notification bell */
.notif-wrap {
    position: relative;
}
.notif-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-subtle);
    padding: 4px;
    line-height: 0;
    border-radius: 8px;
    position: relative;
    transition: color 0.15s, background 0.15s;
}
.notif-btn:hover {
    color: var(--color-orange, #FF8C42);
    background: var(--color-bg);
}
.notif-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    background: var(--color-orange, #FF8C42);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 8px;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
    display: none;
}
.notif-panel {
    position: absolute;
    right: 0;
    top: 48px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    border-radius: 14px;
    width: 320px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 200;
}
.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
[data-theme="dark"] .notif-panel-header {
    border-bottom-color: rgba(255,255,255,0.06);
}
.notif-panel-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--color-subtle);
}
.notif-clear-all {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: var(--color-subtle);
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.notif-clear-all:hover {
    color: var(--color-text);
    background: var(--color-bg);
}
.notif-empty {
    padding: 20px 16px;
    font-size: 14px;
    color: var(--color-subtle);
    text-align: center;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.12s;
}
.notif-item:last-child {
    border-bottom: none;
}
.notif-item:hover {
    background: var(--color-bg);
}
[data-theme="dark"] .notif-item {
    border-bottom-color: rgba(255,255,255,0.04);
}
.notif-item-body {
    flex: 1;
    min-width: 0;
}
.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item-text {
    font-size: 12px;
    color: var(--color-subtle);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-item-text--expanded {
    display: block;
    overflow: visible;
}
.notif-expand-btn {
    background: none;
    border: none;
    padding: 0;
    margin-top: 3px;
    font-size: 11px;
    color: var(--color-pink);
    cursor: pointer;
    line-height: 1;
}
.notif-expand-btn:hover {
    text-decoration: underline;
}
.notif-item-time {
    font-size: 11px;
    color: var(--color-subtle);
    margin-top: 3px;
    white-space: nowrap;
}
.notif-item-del {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-subtle);
    font-size: 16px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.12s, background 0.12s;
}
.notif-item-del:hover {
    color: var(--color-danger, #e53e3e);
    background: var(--color-bg);
}
@media (max-width: 480px) {
    .notif-panel {
        position: fixed;
        right: 12px;
        top: 60px;
        width: calc(100vw - 24px);
        max-width: 360px;
    }
}

/* Mobile user cards (admin_users) */
.user-cards { display: none; }
@media (max-width: 600px) {
    .table-wrapper { display: none; }
    .user-cards    { display: flex; flex-direction: column; gap: 12px; }
}
.user-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.user-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.user-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
}
.user-card-meta {
    font-size: 12px;
    color: var(--color-subtle);
    margin-top: 2px;
}

/* ============================================================
   PAGE BANNER (gradient strip — tasks + future pages)
   ============================================================ */

.page-banner {
    background: var(--gradient);
    padding: 10px 20px 18px;
    text-align: center;
}

.page-banner-title {
    color: white;
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.page-banner-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin: 0 0 14px;
}

/* ── Campaign filter pills ───────────────────────────────── */

.campaign-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.campaign-pill {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.4);
    padding: 7px 20px;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.campaign-pill:hover,
.campaign-pill.active {
    background: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.8);
}

/* ============================================================
   LAYOUT + CARDS (general)
   ============================================================ */

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 540px;
    margin: 30px auto;
    padding: 0 16px;
}

.card {
    background: var(--color-surface);
    padding: 25px 30px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}
.card h2 {
    margin-top: 0;
    font-weight: 600;
    color: var(--color-text);
}

/* ── Hero card (dashboard) ───────────────────────────────── */

.hero-card {
    text-align: center;
    padding: 60px 30px;
    color: white;
    border-radius: var(--radius-card);
    background: var(--gradient);
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.15);
}
.hero-card > * { position: relative; z-index: 2; }

.hero-title    { margin: 0; font-size: 32px; font-weight: 700; }
.hero-subtitle { margin-top: 10px; font-size: 18px; opacity: 0.9; }

/* ============================================================
   BUTTONS (general)
   ============================================================ */

.btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

.btn.danger { background: var(--color-danger); }
.btn.danger:hover { opacity: 0.85; }

/* ============================================================
   CONTACT CARDS (tasks page)
   ============================================================ */

.contact-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 20px;
    margin-bottom: 16px;
    border: 1.5px solid rgba(0,0,0,0.05);
    transition: transform 0.15s;
    overflow: hidden;
}
.contact-card:active { transform: scale(0.99); }

/* Avatar + name row */
.contact-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.contact-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--color-cancel-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--color-pink);
    letter-spacing: 0.5px;
}
.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.contact-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* LinkedIn button */
.btn-linkedin {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-btn);
    background: var(--gradient);
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}
.btn-linkedin:hover { opacity: 0.88; text-decoration: none; color: white; }
.btn-linkedin.no-url {
    background: var(--color-border);
    color: var(--color-subtle);
    cursor: default;
}

/* Cancel + Complete row */
.contact-actions {
    display: flex;
    gap: 10px;
}

.btn-cancel,
.btn-complete {
    flex: 1;
    padding: 11px 10px;
    border-radius: var(--radius-btn);
    border: 1.5px dashed;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: opacity 0.2s, transform 0.1s;
}
.btn-cancel:hover,
.btn-complete:hover { opacity: 0.82; transform: scale(0.98); }

.btn-cancel {
    background: var(--color-cancel-bg);
    color: var(--color-cancel-text);
    border-color: var(--color-cancel-text);
}
.btn-complete {
    background: var(--color-done-bg);
    color: var(--color-done-text);
    border-color: var(--color-done-text);
}

.action-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px dashed currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}
.btn-complete .action-icon {
    border-style: solid;
    background: var(--color-done-text);
    color: white;
    font-size: 10px;
}

/* ── Card action animations ─────────────────────────────── */

@keyframes flash-complete {
    0%   { background: var(--color-surface); }
    40%  { background: var(--color-done-bg); border-color: var(--color-done-text); }
    100% { background: var(--color-done-bg); }
}
@keyframes flash-cancel {
    0%   { background: var(--color-surface); }
    40%  { background: var(--color-cancel-bg); border-color: var(--color-cancel-text); }
    100% { background: var(--color-cancel-bg); }
}

.card-completing { animation: flash-complete 0.45s ease forwards; }
.card-cancelling { animation: flash-cancel  0.45s ease forwards; }

/* ── Empty / celebration state ───────────────────────────── */

.tasks-empty {
    text-align: center;
    padding: 50px 20px;
}
.tasks-empty h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 6px;
}
.tasks-empty p {
    font-size: 18px;
    color: var(--color-subtle);
    margin: 0 0 24px;
}
.tasks-empty img {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    margin-bottom: 24px;
}

/* ── Last updated note ───────────────────────────────────── */

.tasks-meta {
    font-size: 13px;
    color: var(--color-subtle);
    text-align: center;
    margin-bottom: 20px;
}

/* ============================================================
   TABLES (admin pages)
   ============================================================ */

.table-wrapper { overflow-x: auto; width: 100%; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
th {
    background: var(--gradient);
    color: white;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}
td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    font-size: 14px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(123,91,166,0.08); }

/* ============================================================
   ADMIN SECTIONS
   ============================================================ */

.admin-section     { border-left: 4px solid var(--color-orange); }
.superadmin-section { border-left: 4px solid var(--color-danger); }

.logout-small { color: var(--color-danger); font-weight: 600; }

/* ============================================================
   ADMIN SECTION PILL NAV
   ============================================================ */

.section-nav-bar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 24px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.section-nav-bar::-webkit-scrollbar { display: none; }

.admin-section-nav {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    margin: 0;
}

.admin-section-pill {
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-subtle);
    text-decoration: none;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    display: inline-block;
}
.admin-section-pill:hover {
    color: var(--color-text);
    border-color: var(--color-subtle);
    text-decoration: none;
}
.admin-section-pill.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}
.admin-section-pill.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

/* Primary section links in the admin gear dropdown */
.app-avatar-menu .menu-primary-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text);
    padding: 10px 16px;
}
.app-avatar-menu .menu-primary-link svg {
    color: var(--color-subtle);
    flex-shrink: 0;
}
.app-avatar-menu .menu-primary-link:hover {
    background: var(--color-bg);
    text-decoration: none;
}

/* ============================================================
   FORMS (inputs used in app pages)
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="date"],
select {
    padding: 8px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 8px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--color-bg);
    color: var(--color-text);
}
input:focus, select:focus { border-color: var(--color-pink); }

/* ============================================================
   FILTER BAR  (admin analytics / report pages)
   ============================================================ */

.filter-bar {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 16px 24px;
    margin-bottom: 20px;
}
.filter-bar form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}
.fb-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fb-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-subtle);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1;
    white-space: nowrap;
}

/* Override global margin-bottom and force consistent 38px height */
.filter-bar input[type="date"],
.filter-bar input[type="text"],
.filter-bar select {
    margin-bottom: 0;
    height: 38px;
    padding: 0 10px;
    line-height: 38px;
    border-radius: var(--radius-btn);
}

/* Make .btn and .btn-outline the same height as the inputs */
.filter-bar .btn,
.filter-bar .btn-outline {
    height: 38px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    margin-bottom: 0;
}

.btn-outline {
    background: none;
    color: var(--color-subtle);
    border: 1.5px solid var(--color-border);
    padding: 10px 18px;
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: border-color 0.15s, color 0.15s;
}
.btn-outline:hover {
    border-color: var(--color-subtle);
    color: var(--color-text);
    text-decoration: none;
}

/* ============================================================
   ADMIN SECTION PILL NAV
   ============================================================ */

.admin-section-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-section-pill {
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-subtle);
    text-decoration: none;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.admin-section-pill:hover {
    color: var(--color-text);
    border-color: var(--color-subtle);
    text-decoration: none;
}
.admin-section-pill.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}
.admin-section-pill.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

/* Primary section links in the admin gear dropdown */
.app-avatar-menu .menu-primary-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text);
    padding: 10px 16px;
}
.app-avatar-menu .menu-primary-link svg {
    color: var(--color-subtle);
    flex-shrink: 0;
}
.app-avatar-menu .menu-primary-link:hover {
    background: var(--color-bg);
    text-decoration: none;
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {
    .auth-card {
        min-width: 280px;
        padding: 24px 20px;
    }

    .container, .container-narrow {
        padding: 0 12px;
        margin-top: 20px;
    }

    .app-header { padding: 10px 15px; }
    .app-user   { display: none; }

    .page-banner-title { font-size: 20px; }

    .contact-name { font-size: 17px; }

    .hero-title    { font-size: 24px; }
    .hero-subtitle { font-size: 15px; }
}
