/* ================================================================
   Phoenix Youth Support Services — Stylesheet
   Modern, clean, accessible design system
   ================================================================ */

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

:root {
    --primary: #c53030;
    --primary-dark: #9b2c2c;
    --primary-light: #fed7d7;
    --primary-bg: #fff5f5;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --gray-900: #171923;
    --white: #ffffff;
    --radius: 8px;
    --radius-lg: 12px;
    --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 rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --transition: 150ms ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
}

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

html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ── Auth Page ────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #1a202c 100%);
    padding: 20px;
}

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

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 40px 32px 24px;
    background: linear-gradient(135deg, var(--primary-bg), var(--white));
    border-bottom: 1px solid var(--primary-light);
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 4px;
}

.auth-form { padding: 32px; }

.auth-footer {
    text-align: center;
    color: var(--gray-400);
    font-size: 0.75rem;
    margin-top: 24px;
}

/* ── Alerts ───────────────────────────────────────────────── */

/* Auth card alert — sits between header and form, needs horizontal alignment */
.auth-card > .alert {
    margin: 16px 32px 0 32px;
    border-radius: var(--radius);
}
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 20px;
    animation: slideDown 0.2s ease;
}

.alert-error {
    background: #fff5f5;
    color: var(--primary-dark);
    border: 1px solid var(--primary-light);
}

.alert-success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #c6f6d5;
}

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

/* ── Form Elements ────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper svg {
    position: absolute;
    left: 12px;
    color: var(--gray-400);
    pointer-events: none;
}

.input-wrapper input {
    padding-left: 40px !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea { resize: vertical; min-height: 100px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400 !important;
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

.inline-form { display: inline; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

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

.btn-danger-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--gray-200);
}

.btn-danger-ghost:hover { background: var(--primary-bg); color: var(--primary-dark); border-color: var(--primary-light); }

.btn-sm { padding: 6px 12px; font-size: 0.8125rem; }

.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 0.9375rem; }

/* ── Admin Layout ─────────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--gray-900);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--gray-700);
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.brand-name { font-size: 1.125rem; font-weight: 700; line-height: 1.2; }
.brand-sub { font-size: 0.6875rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.05em; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--gray-400);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-item:hover { background: var(--gray-800); color: var(--white); }
.nav-item.active { background: var(--primary); color: var(--white); }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-700);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-name { font-size: 0.875rem; font-weight: 500; }
.user-role { font-size: 0.75rem; color: var(--gray-400); }

.logout-btn {
    display: block;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--gray-700);
    border-radius: var(--radius);
    color: var(--gray-400);
    font-size: 0.8125rem;
    transition: all var(--transition);
}

.logout-btn:hover { background: var(--gray-800); color: var(--white); }

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px 40px;
    min-width: 0;
}

/* ── Staff Layout ─────────────────────────────────────────── */
.staff-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 64px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--gray-900);
}

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

/* Staff hamburger — white bg needs dark color */
.staff-header .hamburger { color: var(--gray-500); }
.staff-header .hamburger:hover { color: var(--primary); }

.header-nav {
    display: flex;
    gap: 4px;
}

.header-nav a {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all var(--transition);
}

.header-nav a:hover { background: var(--gray-100); color: var(--gray-800); }
.header-nav a.active { background: var(--primary-bg); color: var(--primary); }

.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.staff-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px;
    min-width: 0;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.text-muted { color: var(--gray-500); font-size: 0.875rem; margin-top: 4px; }
.text-sm { font-size: 0.8125rem; }
.fw-500 { font-weight: 500; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    margin-bottom: 24px;
    min-width: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.card-header h2 { font-size: 1rem; font-weight: 600; color: var(--gray-800); }

.card-body {
    padding: 24px;
    min-width: 0;
    overflow-x: auto;
}

.form-card { max-width: 640px; }

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); line-height: 1.1; }
.stat-label { font-size: 0.8125rem; color: var(--gray-500); margin-top: 2px; }

/* ── Dashboard Grid ───────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ── Table ────────────────────────────────────────────────── */
.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

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

.table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-50);
    color: var(--gray-700);
}

.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr:last-child td { border-bottom: none; }

/* Dashboard cards use grid gap — no extra bottom margin */
.dashboard-grid .card {
    margin-bottom: 0;
}
.col-action { width: 120px; }
.col-status { width: 100px; }
.col-date   { width: 120px; }
.col-id     { width: 60px; }
.col-count  { width: 80px; }

/* ── Staff Name Cell ──────────────────────────────────────── */
.staff-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-submitted { background: #fefcbf; color: #975a16; }
.badge-active { background: #c6f6d5; color: #22543d; }
.badge-inactive { background: var(--gray-100); color: var(--gray-500); }

/* ── Actions Group ────────────────────────────────────────── */
.actions-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-500);
}

.empty-state p { margin: 12px 0 16px; font-size: 0.9375rem; }

/* ── Report Detail ────────────────────────────────────────── */
.report-meta-card { border-left: 4px solid var(--primary); }

.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.meta-value { font-size: 0.9375rem; color: var(--gray-800); }

.report-content {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--gray-700);
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ── Profile Grid ─────────────────────────────────────────── */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ── Hamburger Toggle ─────────────────────────────────────── */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: rgba(255,255,255,0.7);
    border-radius: var(--radius);
    transition: color var(--transition);
}

.hamburger:hover {
    background: none;
    color: var(--primary);
}

.hamburger svg { display: block; }

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

/* Mobile topbar (admin) — fixed at top */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--gray-900);
    color: var(--white);
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 150;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    color: var(--white);
}
.mobile-brand-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: var(--primary);
}
.mobile-brand-sub {
    font-weight: 500;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-400);
}

.mobile-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-topbar .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
}

.mobile-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    color: var(--gray-400);
    transition: all var(--transition);
}

.mobile-logout:hover {
    background: var(--gray-700);
    color: var(--white);
}

/* Staff mobile nav dropdown */
.staff-nav-mobile {
    display: none;
    flex-direction: column;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 8px 16px;
    box-shadow: var(--shadow-md);
}

.staff-nav-mobile.open { display: flex; }

.staff-nav-mobile a {
    padding: 12px 8px;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
}

.staff-nav-mobile a:hover { background: var(--gray-50); color: var(--gray-800); }
.staff-nav-mobile a.active { color: var(--primary); background: var(--primary-bg); }

/* ── Responsive: 1200px ───────────────────────────────────── */
@media (max-width: 1200px) {
    .main-content { padding: 28px 32px; }
}

/* ── Responsive: 1024px (Tablet Landscape) ────────────────── */
@media (max-width: 1024px) {

    .main-content { margin-left: 0; padding: 80px 20px 24px; }

    /* Sidebar hidden off-screen by default on tablet */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 200;
    }
    .sidebar.open { transform: translateX(0); }

    .sidebar-overlay.active { display: block; }

    .hamburger { display: inline-flex; }
    .mobile-topbar { display: flex; }

    /* Staff header */
    .staff-header .header-nav { display: none; }
    .staff-header .staff-nav-mobile { display: flex; }
}

/* ── Responsive: 768px (Tablet Portrait) ──────────────────── */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 20px;
    }

    .page-header h1 { font-size: 1.375rem; }

    .header-actions {
        flex-wrap: wrap;
    }

    .stats-grid { grid-template-columns: 1fr 1fr; margin-bottom: 20px; }

    .stat-card { padding: 16px; gap: 12px; }
    .stat-value { font-size: 1.375rem; }
    .stat-icon { width: 44px; height: 44px; }

    .profile-grid { grid-template-columns: 1fr; gap: 20px; }
    .meta-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    .form-row { grid-template-columns: 1fr; gap: 16px; }

    .form-card { max-width: 100%; }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px 20px;
    }

    .card-body { padding: 20px; }
    .card { margin-bottom: 20px; }

    /* Auth card */
    .auth-card { border-radius: var(--radius); }
    .auth-header { padding: 32px 24px 20px; }
    .auth-card > .alert { margin: 12px 24px 0 24px; }
    .auth-form { padding: 24px; }

    /* Staff layout */
    .staff-header { padding: 0 16px; height: 56px; }
    .staff-main { padding: 20px 16px; }

    .user-greeting { display: none; }
}

/* ── Responsive: 640px (Large Phone) ──────────────────────── */
@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; margin-bottom: 16px; }

    .meta-grid { grid-template-columns: 1fr; gap: 12px; }

    .form-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .form-actions .btn { width: 100%; justify-content: center; }

    .actions-group { gap: 2px; }
    .actions-group .btn { padding: 6px 8px; font-size: 0.75rem; }

    .header-brand span { display: none; }

    .page-header {
        margin-bottom: 20px;
    }
}

/* ── Responsive: 480px (Small Phone) ──────────────────────── */
@media (max-width: 480px) {
    .main-content { padding: 72px 12px 16px; }

    .page-header { margin-bottom: 16px; }
    .page-header h1 { font-size: 1.25rem; }

    .stat-card { padding: 14px; gap: 10px; }
    .stat-icon { width: 40px; height: 40px; }
    .stat-value { font-size: 1.25rem; }
    .stat-label { font-size: 0.75rem; }

    .card-header { padding: 14px 16px; }
    .card-body { padding: 16px; }
    .card { margin-bottom: 16px; }

    .auth-container { max-width: 100%; }
    .auth-card { border-radius: 0; }
    .auth-header { padding: 28px 20px 16px; }
    .auth-card > .alert { margin: 12px 20px 0 20px; }
    .auth-header h1 { font-size: 1.25rem; }
    .auth-form { padding: 20px; }

    .staff-main { padding: 16px 12px; }
    .staff-header { padding: 0 12px; }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px;  /* Prevents iOS zoom on focus */
    }
}

/* ── Responsive Tables ────────────────────────────────────── */
/* Allow tables to scroll horizontally within their container */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* ── Responsive Tables: Card Grid Pattern ─────────────────── */
/* On mobile, each row becomes a designed card with:
   [ Title (full width, bold)         ]
   [ Meta | Meta ]  ← 2-column grid
   [ Meta | Meta ]
   ───────────────────────────────────
   [ Action buttons                   ]
*/
@media (max-width: 640px) {
    /* Switch from scroll to card layout on mobile */
    .table-responsive { overflow-x: visible; }

    /* Reset table display */
    .table-responsive .table,
    .table-responsive .table thead,
    .table-responsive .table tbody,
    .table-responsive .table th,
    .table-responsive .table tr { display: block; }

    /* Hide table headers */
    .table-responsive .table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* Each row → card */
    .table-responsive .table tbody tr {
        display: flex;
        flex-direction: column;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 16px;
    }

    .table-responsive .table tbody tr:last-child { margin-bottom: 0; }

    /* All cells become blocks */
    .table-responsive .table td {
        padding: 0;
    }

    /* Title */
    .table-responsive .table td[data-card-title] {
        font-weight: 600;
        font-size: 0.9375rem;
        color: var(--gray-900);
        line-height: 1.35;
        padding-bottom: 4px;
    }

    .table-responsive .table td[data-card-title] .staff-name-cell {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

    .table-responsive .table td[data-card-title] .avatar-sm {
        width: 32px;
        height: 32px;
        font-size: 0.6875rem;
        margin-top: 2px;
    }

    .table-responsive .table td[data-card-title] .fw-500 {
        font-size: 0.9375rem;
        font-weight: 600;
    }

    .table-responsive .table td[data-card-title] .text-muted {
        font-size: 0.75rem;
        color: var(--gray-400);
    }

    /* Data cells — plain text, inline where consecutive */
    .table-responsive .table td.card-meta,
    .table-responsive .table td.card-meta-inline,
    .table-responsive .table td.card-status {
        font-size: 0.8125rem;
        color: var(--gray-500);
        line-height: 1.5;
        padding: 0;
    }

    .table-responsive .table td.card-meta-inline {
        display: inline !important;
    }
    .table-responsive .table td.card-meta-inline + td.card-meta-inline::before {
        content: ' · ';
        color: var(--gray-300);
    }

    /* Actions row */
    .table-responsive .table td:last-child {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--gray-100);
    }

    .table-responsive .table td:last-child .actions-group {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .table-responsive .table td:last-child .btn {
        font-size: 0.8125rem;
        padding: 6px 12px;
        border-radius: 6px;
    }

    .table-responsive .table td:last-child .inline-form {
        display: inline-flex;
    }
}

/* ── Utility ──────────────────────────────────────────────── */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all var(--transition);
}

.pagination-btn:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.pagination-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-info {
    font-size: 0.8125rem;
    color: var(--gray-500);
}
