/* ============================================
   LAND TITLE VERIFICATION SYSTEM
   Modern Dashboard — v2.0
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Brand */
    --primary:        #1e40af;
    --primary-hover:  #1e3a8a;
    --primary-light:  #3b82f6;
    --primary-subtle: #eff6ff;
    --accent:         #0891b2;
    --accent-light:   #e0f2fe;

    /* Semantic */
    --success:        #059669;
    --success-bg:     #ecfdf5;
    --success-border: #6ee7b7;
    --danger:         #dc2626;
    --danger-bg:      #fef2f2;
    --danger-border:  #fca5a5;
    --warning:        #d97706;
    --warning-bg:     #fffbeb;
    --warning-border: #fcd34d;
    --info:           #0284c7;
    --info-bg:        #f0f9ff;
    --info-border:    #7dd3fc;

    /* Neutrals */
    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Surface */
    --surface:        #ffffff;
    --surface-raised: #ffffff;
    --page-bg:        #f1f5f9;
    --border:         #e5e7eb;
    --border-focus:   #3b82f6;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.03);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 10px 10px -5px rgba(0,0,0,.03);
    --shadow-modal: 0 25px 50px -12px rgba(0,0,0,.2);

    /* Spacing */
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  14px;
    --radius-xl:  20px;
    --radius-full: 9999px;

    /* Type */
    --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--page-bg);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 1.875rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem;   letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color .2s;
}
a:hover { color: var(--primary); }

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: 64px;
}

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.01em;
}

.navbar-brand span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.navbar-menu a {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: all .2s;
    display: block;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary);
    background: var(--primary-subtle);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.navbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: box-shadow .2s, transform .2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

/* ============================================
   STAT CARDS (Dashboard)
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-light);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.stat-card.green::after  { background: var(--success); }
.stat-card.amber::after  { background: var(--warning); }
.stat-card.red::after    { background: var(--danger); }
.stat-card.cyan::after   { background: var(--accent); }

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-subtle);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-label {
    font-size: 0.825rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-delta {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-delta.up   { color: var(--success); }
.stat-delta.down { color: var(--danger); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    line-height: 1.4;
    text-decoration: none;
    transition: all .15s ease;
    white-space: nowrap;
    outline: none;
    user-select: none;
}

.btn:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary */
.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(59,130,246,.2);
    color: white;
}

/* Secondary */
.btn-secondary {
    background: var(--surface);
    color: var(--gray-700);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

/* Success */
.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}
.btn-success:hover {
    background: #047857;
    box-shadow: 0 0 0 3px rgba(5,150,105,.2);
    color: white;
}

/* Danger */
.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}
.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 0 0 3px rgba(220,38,38,.2);
    color: white;
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--primary-light);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--primary-subtle);
    color: var(--primary);
}

/* Sizes */
.btn-xs  { padding: 0.3rem 0.7rem;  font-size: 0.78rem; }
.btn-sm  { padding: 0.42rem 0.9rem; font-size: 0.825rem; }
.btn-lg  { padding: 0.7rem 1.6rem;  font-size: 1rem; }
.btn-xl  { padding: 0.85rem 2rem;   font-size: 1.05rem; }

/* Icon-only */
.btn-icon {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
    line-height: 1.5;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--gray-300);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 0.3rem;
}

.form-error {
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table thead {
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
}

.table th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
    white-space: nowrap;
}

.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}

.table tbody tr {
    transition: background .12s;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table strong {
    color: var(--gray-900);
    font-weight: 600;
}

/* ============================================
   MODALS  ← fully reworked
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    overflow-y: auto;
    padding: 1.5rem;
}

.modal.is-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    animation: modalBackdropIn .2s ease;
}

@keyframes modalBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-modal);
    border: 1px solid var(--border);
    animation: modalSlideIn .22s cubic-bezier(.16,1,.3,1);
    margin: auto;
    overflow: hidden;             /* clip children to border-radius */
}

@keyframes modalSlideIn {
    from { transform: translateY(-16px) scale(.98); opacity: 0; }
    to   { transform: translateY(0)     scale(1);   opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--gray-50);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-header h2 .modal-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--primary-subtle);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.modal-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray-400);
    font-size: 1.1rem;
    line-height: 1;
    transition: all .15s;
    border: none;
    background: none;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* scrollable body — this is the key part */
.modal-body {
    overflow-y: auto;
    padding: 1.5rem;
    flex: 1;
    overscroll-behavior: contain;
}

/* sticky footer inside modal */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.1rem 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--gray-50);
}

/* Section dividers inside modal body */
.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-400);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    animation: alertSlideIn .2s ease;
    margin-bottom: 1rem;
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: #065f46;
}

.alert-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: #7f1d1d;
}

.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: #78350f;
}

.alert-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: #075985;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.badge-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid var(--success-border);
}

.badge-danger {
    background: var(--danger-bg);
    color: #991b1b;
    border: 1px solid var(--danger-border);
}

.badge-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid var(--warning-border);
}

.badge-info {
    background: var(--info-bg);
    color: #075985;
    border: 1px solid var(--info-border);
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.badge-primary {
    background: var(--primary-subtle);
    color: var(--primary);
    border: 1px solid #bfdbfe;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.page-header-left h1 {
    margin: 0 0 0.3rem 0;
    font-size: 1.6rem;
}

.page-header-left p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin: 0;
}

.page-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.825rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    list-style: none;
}

.breadcrumb li + li::before {
    content: '/';
    opacity: .5;
}

.breadcrumb a {
    color: var(--gray-500);
}

.breadcrumb a:hover { color: var(--primary); }

/* ============================================
   SEARCH & FILTER BAR
   ============================================ */
.search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrap input {
    width: 100%;
    padding: 0.6rem 0.85rem 0.6rem 2.4rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
    color: var(--gray-800);
}

.search-input-wrap input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.search-input-wrap .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.9rem;
    pointer-events: none;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: .5;
}

.empty-state h3 {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: all .15s;
    background: var(--surface);
}

.pagination a:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination .disabled {
    opacity: .4;
    pointer-events: none;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--gray-500);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.85rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-muted   { color: var(--gray-500); }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.78rem; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.font-mono    { font-family: var(--font-mono); }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 0.75rem; }
.gap-3 { gap: 1rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container { padding: 1.25rem 1rem; }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .navbar .container {
        flex-direction: column;
        height: auto;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.2rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table th,
    .table td {
        padding: 0.7rem 0.75rem;
    }

    .modal {
        padding: 0.75rem;
    }

    .modal-content {
        max-height: calc(100vh - 1.5rem);
        border-radius: var(--radius-lg);
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .btn:not(.btn-icon):not(.btn-sm):not(.btn-xs) {
        width: 100%;
        justify-content: center;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-input-wrap {
        width: 100%;
    }
}