/* ==========================================================================
   STACQ.IO PORTAL — Design System & Styles
   Primary: #eb7b57 | Border Radius: 10px | Font: Inter
   ========================================================================== */

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #eb7b57;
    --primary-dark: #d4653e;
    --primary-light: #f5a689;
    --primary-bg: #fef3ef;
    --dark: #1a1a2e;
    --dark-2: #2d2d44;
    --gray-900: #111827;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --green: #10b981;
    --green-bg: #ecfdf5;
    --red: #ef4444;
    --red-bg: #fef2f2;
    --yellow: #f59e0b;
    --yellow-bg: #fffbeb;
    --blue: #3b82f6;
    --blue-bg: #eff6ff;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: 0.2s ease;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fafcfa;
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ----- Navigation ----- */
.main-nav {
    background: #fafcfa;
    border-bottom: 2px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    height: 28px;
    width: auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-900);
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--white);
}

.brand-icon-lg {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    border-radius: var(--radius);
}

.brand-text {
    color: var(--white);
}

.brand-dot {
    color: var(--primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.nav-link {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(235, 123, 87, 0.08);
}

.nav-logout {
    color: var(--primary);
}

/* ----- Flash Messages ----- */
.flash-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1.5rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.flash-success {
    background: var(--green-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-error {
    background: var(--red-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-info {
    background: var(--blue-bg);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.flash-warning {
    background: var(--yellow-bg);
    color: #92400e;
    border: 1px solid #fde68a;
}

.flash-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: inherit;
    opacity: 0.6;
    line-height: 1;
}

.flash-close:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Main Content ----- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* ----- Auth Pages ----- */
.auth-wrapper {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: #fafcfa;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    animation: fadeUp 0.4s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.auth-logo {
    height: 40px;
    width: auto;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-tab:hover {
    color: var(--primary-dark);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Dashboard ----- */
.dashboard {
    padding: 2rem 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.dashboard-subtitle {
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.back-link {
    display: inline-block;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary);
}

/* ----- Cards ----- */
.card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.4s ease;
    border: 1px solid var(--gray-200);
}

.card-compact {
    padding: 1rem 1.75rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.count-badge {
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
}

/* ----- Status Tracker ----- */
.status-tracker {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    padding: 1rem 0;
    gap: 0;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1;
}

.status-step.complete .step-dot {
    background: var(--primary);
    color: var(--white);
}

.status-step.current .step-dot {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px var(--primary-bg);
    animation: pulse 2s infinite;
}

.status-step.skipped .step-dot {
    background: var(--gray-300);
    color: var(--gray-500);
}

.step-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    max-width: 90px;
    line-height: 1.3;
    font-weight: 500;
}

.status-step.current .step-label {
    color: var(--primary);
    font-weight: 600;
}

.status-step.complete .step-label {
    color: var(--gray-700);
}

.step-date {
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.15rem;
}

.step-num {
    font-size: 0.7rem;
}

.step-skip {
    font-size: 1rem;
}

.step-line {
    flex: 1;
    height: 3px;
    background: var(--gray-200);
    min-width: 20px;
    margin: 17px 0 0 0;
    align-self: flex-start;
    transition: background 0.3s ease;
}

.step-line.complete {
    background: var(--primary);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px var(--primary-bg);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(235, 123, 87, 0.15);
    }
}

/* ----- Free Trial Banner ----- */
.trial-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.trial-info h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
}

.trial-info p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.trial-countdown {
    flex: 1;
    max-width: 300px;
}

.trial-progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: 99px;
    overflow: hidden;
}

.trial-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
    transition: width 0.5s ease;
}

.trial-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
    display: block;
    text-align: right;
}

.trial-warning .trial-bar {
    background: var(--yellow);
}

.trial-urgent .trial-bar {
    background: var(--red);
}

.trial-urgent .trial-info h3 {
    color: var(--red);
}

/* ----- Tables ----- */
.table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* ----- Badges & Pills ----- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-basic_human {
    background: var(--blue-bg);
    color: #1d4ed8;
}

.badge-basic_ai {
    background: #f0fdf4;
    color: #15803d;
}

.badge-advanced_ai {
    background: var(--yellow-bg);
    color: #b45309;
}

.badge-expert {
    background: var(--red-bg);
    color: #dc2626;
}

.status-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-active,
.status-open,
.status-deferred {
    background: var(--green-bg);
    color: #065f46;
}

.status-pending,
.status-in_progress {
    background: var(--yellow-bg);
    color: #92400e;
}

.status-resolved,
.status-completed,
.status-paid,
.status-invoiced {
    background: var(--blue-bg);
    color: #1e40af;
}

.status-revoked,
.status-declined,
.status-refunded {
    background: var(--red-bg);
    color: #991b1b;
}

/* ----- Forms ----- */
.form-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.form-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--gray-900);
    background: var(--white);
    transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(235, 123, 87, 0.15);
}

.form-group textarea {
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

/* ----- Waiver Section ----- */
.waiver-section {
    margin: 1rem 0;
}

.waiver-box {
    background: var(--yellow-bg);
    border: 1.5px solid #fde68a;
    border-radius: var(--radius);
    padding: 1.25rem;
}

.waiver-box h4 {
    font-size: 0.9rem;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.waiver-box p {
    font-size: 0.8rem;
    color: #78350f;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: var(--white);
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.btn-ghost {
    background: none;
    color: var(--gray-600);
    padding: 0.4rem 0.75rem;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    color: var(--white);
}

.btn-warning {
    background: var(--yellow);
    color: var(--white);
}

.btn-warning:hover {
    background: #d97706;
    color: var(--white);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

.btn-full {
    width: 100%;
}

/* ----- Tabs ----- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab {
    padding: 0.65rem 1.25rem;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab:hover {
    color: var(--primary-dark);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeUp 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* ----- Edit Pack Cards ----- */
.pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.pack-card {
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pack-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pack-featured {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.pack-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pack-minutes {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.pack-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.25rem 0;
}

.pack-desc {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

/* ----- Time Bank ----- */
.time-bank-display {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--white) 100%);
    border: 2px solid var(--primary-light);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.admin-time-bank {
    margin-bottom: 1.5rem;
}

.time-bank-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
    line-height: 1;
}

.time-bank-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ----- Billing Grid ----- */
.billing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.billing-item {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
}

.billing-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.billing-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

/* ----- Health Grid ----- */
.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.health-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.health-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.health-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.health-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.health-up {
    color: var(--green);
}

/* ----- Admin Status Bar ----- */
.admin-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.status-indicator {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
}

.status-signed {
    background: var(--green-bg);
    color: #065f46;
}

.status-unsigned {
    background: var(--red-bg);
    color: #991b1b;
}

.status-link {
    background: var(--blue-bg);
    color: #1e40af;
    cursor: pointer;
    transition: all var(--transition);
}

.status-link:hover {
    background: #dbeafe;
}

/* ----- Search ----- */
.search-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.search-input {
    font-size: 1rem !important;
    padding: 0.7rem 1rem !important;
}

/* ----- Inline Actions ----- */
.inline-action {
    display: inline-block;
}

.inline-form {
    margin-bottom: 1rem;
}

/* ----- Empty States ----- */
.empty-state {
    color: var(--gray-500);
    font-size: 0.875rem;
    text-align: center;
    padding: 2rem 0;
}

/* ----- Links ----- */
.link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
}

.link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ----- Utilities ----- */
.text-muted {
    color: var(--gray-500);
    font-size: 0.8rem;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .main-content {
        padding: 0 1rem 2rem;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
    }

    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }

    .status-tracker {
        padding: 0.5rem 0;
    }

    .status-step {
        min-width: 80px;
    }

    .step-label {
        font-size: 0.6rem;
        max-width: 70px;
    }

    .billing-grid {
        grid-template-columns: 1fr 1fr;
    }

    .health-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .nav-inner {
        padding: 0 1rem;
    }

    .nav-user {
        display: none;
    }

    .tabs {
        gap: 0;
    }

    .tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .trial-banner {
        flex-direction: column;
    }

    .trial-countdown {
        max-width: 100%;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form .form-group {
        width: 100%;
    }

    .admin-status-bar {
        flex-direction: column;
    }

    .pack-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Password Toggle ----- */
.pw-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity var(--transition);
}

.pw-toggle:hover {
    opacity: 1;
}

@media (max-width: 480px) {
    .dashboard-title {
        font-size: 1.35rem;
    }

    .billing-grid {
        grid-template-columns: 1fr;
    }

    .health-grid {
        grid-template-columns: 1fr;
    }

    .time-bank-value {
        font-size: 2.5rem;
    }
}

/* ==========================================================================
   SITE HEADER & FOOTER (matches stacq.io for login page)
   ========================================================================== */

/* ----- Site Header ----- */
.site-header {
    background: #fafcfa;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 200;
}

.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo img {
    height: 36px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.site-nav a,
.site-dropdown-btn {
    color: var(--gray-700);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    transition: color var(--transition);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.site-nav a:hover,
.site-dropdown-btn:hover {
    color: var(--primary);
}

.site-nav-active {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

.nav-sep {
    color: var(--gray-300);
    font-size: 0.75rem;
    user-select: none;
    padding: 0 0.1rem;
}

.dropdown-arrow {
    font-size: 0.65rem;
    margin-left: 0.1rem;
}

/* ----- Dropdown ----- */
.site-dropdown {
    position: relative;
    display: inline-flex;
}

.site-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 160px;
    padding: 0.5rem 0;
    z-index: 300;
}

.site-dropdown:hover .site-dropdown-menu {
    display: block;
}

.site-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--gray-700);
    white-space: nowrap;
}

.site-dropdown-menu a:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--gray-700);
    padding: 0.25rem;
}

/* ----- Site Footer ----- */
.site-footer {
    background: #fafcfa;
    border-top: 1px solid var(--gray-200);
    padding: 2.5rem 1.5rem 1.5rem;
    margin-top: 0;
}

.site-footer-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Footer heading */
.footer-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    color: var(--gray-800);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.heading-dot {
    color: var(--primary);
}

.footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem;
    margin-bottom: 1.25rem;
}

.footer-nav a,
.footer-nav .site-dropdown-btn {
    color: var(--gray-600);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    transition: color var(--transition);
    text-decoration: none;
}

.footer-nav a:hover,
.footer-nav .site-dropdown-btn:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.social-img {
    width: 40px;
    height: 40px;
    transition: transform var(--transition), opacity var(--transition);
}

.social-img:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

/* Footer bottom bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
    font-size: 0.7rem;
}

.footer-copy {
    color: var(--gray-400);
}

.footer-legal-links {
    color: var(--gray-400);
}

.footer-legal-links a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-legal-links a:hover {
    color: var(--primary);
}

/* Upward dropdown for footer */
.site-dropdown-menu-up {
    top: auto;
    bottom: 100%;
    margin-bottom: 0.25rem;
}

/* ----- Mobile Header ----- */
@media (max-width: 768px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        padding: 1rem;
        gap: 0.25rem;
        z-index: 300;
    }

    .site-nav.open {
        display: flex;
    }

    .nav-sep {
        display: none;
    }

    .site-nav a,
    .site-dropdown-btn {
        padding: 0.6rem 1rem;
        width: 100%;
        text-align: left;
    }

    .mobile-menu-btn {
        display: block;
    }

    .site-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }

    .site-dropdown:hover .site-dropdown-menu {
        display: block;
    }

    .footer-nav {
        flex-direction: column;
        gap: 0.25rem;
    }

    .footer-nav .nav-sep {
        display: none;
    }
}