/* ==========================================================================
   AutoPost Hub - Main CSS Stylesheet (All-in-One Premium Light Mode)
   ========================================================================== */

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

:root {
    /* Primary Colors */
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-solid: #ffffff;
    --bg-input: #f1f5f9;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(99, 102, 241, 0.5);
    
    /* Text Colors */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-glow: rgba(15, 23, 42, 0.05);

    /* Accents & States */
    --primary: #4f46e5;         /* Indigo */
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.15);
    
    --success: #10b981;         /* Emerald */
    --success-glow: rgba(16, 185, 129, 0.15);
    
    --warning: #f59e0b;         /* Amber */
    --warning-glow: rgba(245, 158, 11, 0.15);
    
    --danger: #e11d48;          /* Rose */
    --danger-glow: rgba(225, 29, 72, 0.15);
    
    --info: #0284c7;            /* Sky Blue */
    --info-glow: rgba(2, 132, 199, 0.15);

    /* Excel / Spreadsheet Specific */
    --excel-header-bg: #f1f5f9;
    --excel-row-hover: rgba(241, 245, 249, 0.6);
    --excel-selected: rgba(79, 70, 229, 0.06);
    --excel-grid: rgba(0, 0, 0, 0.05);
    
    /* Mechanics */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition-speed: 0.2s;
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================================================
   AutoPost Hub - Header (Glassmorphic Top Navigation)
   ========================================================================== */

header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.header-logo i {
    font-size: 1.85rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary-glow));
    transition: transform 0.3s var(--transition-bounce);
}

.header-logo:hover i {
    transform: rotate(5deg) scale(1.08);
}

.header-logo h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #0f172a 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-indicator.online::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--success);
    animation: pulse 2s infinite;
}

.status-indicator.running {
    background-color: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.status-indicator.running::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--warning);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* ==========================================================================
   AutoPost Hub - Stats Bar (Dashboard KPI Cards)
   ========================================================================== */

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 2rem 0.5rem 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.01) 0%, transparent 70%);
    pointer-events: none;
    transition: transform 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
}

.stat-card:hover::before {
    transform: translate(5%, 5%);
}

.stat-info {
    z-index: 1;
}

.stat-info h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.stat-info p {
    font-size: 1.85rem;
    font-weight: 700;
    margin-top: 0.25rem;
    font-family: var(--font-mono);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 1;
    transition: transform 0.3s var(--transition-bounce);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(-5deg);
}

.stat-card.total-card {
    border-left: 4px solid var(--primary);
}
.stat-card.total-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.08);
}

.stat-card.pending-card {
    border-left: 4px solid var(--warning);
}
.stat-card.pending-card:hover {
    border-color: var(--warning);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.08);
}

.stat-card.success-card {
    border-left: 4px solid var(--success);
}
.stat-card.success-card:hover {
    border-color: var(--success);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.08);
}

.stat-card.failed-card {
    border-left: 4px solid var(--danger);
}
.stat-card.failed-card:hover {
    border-color: var(--danger);
    box-shadow: 0 8px 30px rgba(244, 63, 94, 0.08);
}

.stat-icon.total { background: rgba(99, 102, 241, 0.08); color: var(--primary); }
.stat-icon.pending { background: rgba(245, 158, 11, 0.08); color: var(--warning); }
.stat-icon.success { background: rgba(16, 185, 129, 0.08); color: var(--success); }
.stat-icon.failed { background: rgba(244, 63, 94, 0.08); color: var(--danger); }

/* ==========================================================================
   AutoPost Hub - Toolbar Controls (Search & Action Buttons)
   ========================================================================== */

.toolbar {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 420px;
}

.search-box input {
    width: 100%;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    padding: 0.7rem 1.2rem 0.7rem 2.8rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.9rem;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color var(--transition-speed);
}

.search-box input:focus + i {
    color: var(--primary);
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-bounce);
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn:hover {
    background: #f1f5f9;
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(1px);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-color: var(--success);
    color: white;
    box-shadow: 0 4px 12px var(--success-glow);
    position: relative;
}

.btn-success:hover {
    background: linear-gradient(135deg, #34d399 0%, var(--success) 100%);
    border-color: #34d399;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: rgba(225, 29, 72, 0.05);
    border-color: rgba(225, 29, 72, 0.15);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    box-shadow: 0 4px 12px var(--danger-glow);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   AutoPost Hub - Table Spreadsheet Grid (Excel Sheet UI)
   ========================================================================== */

.table-wrapper {
    flex: 1;
    margin: 0 2rem 2rem 2rem;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    position: relative;
    max-height: calc(100vh - 280px);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.825rem;
    color: var(--text-main);
}

th {
    background: var(--excel-header-bg);
    color: var(--text-main);
    font-weight: 600;
    text-align: left;
    padding: 0.8rem 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    user-select: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

th:last-child {
    border-right: none;
}

td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--excel-grid);
    border-right: 1px solid var(--excel-grid);
    color: var(--text-main);
    vertical-align: middle;
    position: relative;
    max-width: 280px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    transition: background var(--transition-speed);
}

td:last-child {
    border-right: none;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--excel-row-hover);
}

tr.selected td {
    background: var(--excel-selected);
}

.col-select { width: 45px; text-align: center; }
.col-id { width: 55px; text-align: center; font-family: var(--font-mono); }
.col-link { width: 180px; font-family: var(--font-mono); }
.col-time { width: 155px; }
.col-content { width: 280px; }
.col-source { width: 110px; }
.col-video { width: 90px; text-align: center; }
.col-image { width: 110px; text-align: center; }
.col-status { width: 130px; text-align: center; }
.col-log { width: 85px; text-align: center; }
.col-actions { width: 75px; text-align: center; }

.checkbox-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-input);
    display: inline-block;
    position: relative;
    transition: all var(--transition-speed);
}

.checkbox-container:hover .checkmark {
    border-color: var(--primary);
}

.checkbox-container input:checked + .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked + .checkmark:after {
    display: block;
}

.cell-editable {
    cursor: cell;
}

.cell-editable:hover {
    background: rgba(0, 0, 0, 0.01);
}

.cell-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    background: var(--bg-card-solid);
    color: var(--text-main);
    font-family: inherit;
    font-size: inherit;
    padding: 0.65rem 0.95rem;
    box-sizing: border-box;
    outline: none;
    z-index: 5;
    box-shadow: 0 0 8px var(--primary-glow);
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: var(--radius-full);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

.image-preview-container {
    display: inline-block;
    position: relative;
    cursor: pointer;
}

.img-thumbnail {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-speed);
}

.img-thumbnail:hover {
    transform: scale(1.15);
}

.image-popup {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    width: 150px;
    height: 150px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: var(--bg-card-solid);
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    transition: all 0.2s var(--transition-bounce);
}

.image-preview-container:hover .image-popup {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.725rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge i {
    font-size: 0.65rem;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: #059669; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge-danger { background: rgba(225, 29, 72, 0.1); color: #e11d48; }
.badge-info { background: rgba(2, 132, 199, 0.1); color: #0284c7; }

.select-status {
    background: transparent;
    color: inherit;
    border: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    outline: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
}

.select-status option {
    background: var(--bg-card-solid);
    color: var(--text-main);
    padding: 8px;
}

.btn-log {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.725rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
}

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

.action-icon {
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-speed);
    font-size: 0.9rem;
    padding: 0.25rem;
}

.action-icon:hover {
    color: var(--danger);
}

/* ==========================================================================
   AutoPost Hub - Modals & Toast Notifications
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 650px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s var(--transition-bounce);
    overflow: hidden;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-title i {
    color: var(--primary);
}

.modal-title i.terminal-icon {
    color: var(--success);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    transition: color var(--transition-speed);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.875rem;
    transition: all var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card-solid);
    box-shadow: 0 0 8px var(--primary-glow);
}

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

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.terminal-screen {
    font-family: var(--font-mono);
    font-size: 0.825rem;
    line-height: 1.6;
    color: #10b981; /* Keep terminal green neon */
    background: #030712; /* Keep terminal background dark */
    height: 320px;
    overflow-y: auto;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

.terminal-line {
    margin-bottom: 0.4rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-line .timestamp {
    color: #4b5563;
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

.terminal-line .prefix {
    color: #818cf8;
    margin-right: 0.25rem;
}

.terminal-line.error { color: #f43f5e; }
.terminal-line.warning { color: #fbbf24; }
.terminal-line.info { color: #38bdf8; }
.terminal-line.success-line { color: #34d399; }

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1100;
}

.toast {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    color: var(--text-main);
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 280px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

.toast i {
    font-size: 1.1rem;
}
.toast.success i { color: var(--success); }
.toast.warning i { color: var(--warning); }
.toast.danger i { color: var(--danger); }

/* ==========================================================================
   AutoPost Hub - Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1200px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .search-box {
        max-width: 100%;
    }

    .btn-group {
        justify-content: flex-start;
    }

    .table-wrapper {
        margin: 0 1rem 1rem 1rem;
        border-radius: var(--radius-md);
        max-height: calc(100vh - 340px);
    }
}

@media (max-width: 576px) {
    .stats-container {
        grid-template-columns: 1fr;
        padding: 1rem 1rem 0.5rem 1rem;
    }

    .modal-box {
        width: 95%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .toast {
        min-width: 0;
    }
}
