/* ============================================
   HYCONE STORE - Global Stylesheet
   File: assets/css/style.css
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
    background: #f0f2f8;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---- Layout ---- */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo .logo-icon {
    width: 38px; height: 38px;
    background: #e94560;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800; color: white;
    flex-shrink: 0;
}

.sidebar-logo .logo-text h3 {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: white;
}

.sidebar-logo .logo-text p {
    font-size: 10px;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sidebar User Info */
.sidebar-user {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user .user-avatar {
    width: 36px; height: 36px;
    background: #e94560;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: white;
    flex-shrink: 0;
}

.sidebar-user .user-info h4 { font-size: 13px; font-weight: 600; color: white; }
.sidebar-user .user-info p  { font-size: 10px; opacity: 0.5; text-transform: uppercase; }

/* Sidebar Nav */
.sidebar-nav { padding: 14px 0; flex: 1; }

.sidebar-section-label {
    padding: 8px 20px 4px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.06);
    color: white;
    border-left-color: rgba(233,69,96,0.5);
}

.sidebar-nav a.active {
    background: rgba(233,69,96,0.12);
    color: white;
    border-left-color: #e94560;
    font-weight: 600;
}

.sidebar-nav a i { font-size: 14px; width: 18px; text-align: center; }

.sidebar-nav .nav-badge {
    margin-left: auto;
    background: #e94560;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    padding: 8px 0;
    transition: color 0.2s;
}
.sidebar-footer a:hover { color: #e94560; }

/* ---- Topbar ---- */
.topbar {
    position: fixed;
    top: 0; left: 250px; right: 0;
    height: 60px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 900;
    box-shadow: 0 1px 5px rgba(0,0,0,0.04);
}

.topbar-left { display: flex; align-items: center; gap: 14px; }

.topbar-toggle {
    display: none;
    background: none; border: none;
    font-size: 18px; color: #555; cursor: pointer;
}

.topbar-title { font-size: 16px; font-weight: 700; color: #1a1a2e; }

.topbar-right { display: flex; align-items: center; gap: 14px; }

.topbar-notif {
    position: relative;
    width: 36px; height: 36px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #555;
    cursor: pointer; transition: background 0.2s;
}
.topbar-notif:hover { background: #ffe0e5; color: #e94560; }

.notif-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: #e94560;
    border-radius: 50%;
    border: 2px solid white;
}

.topbar-user {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; padding: 4px 8px;
    border-radius: 8px; transition: background 0.2s;
}
.topbar-user:hover { background: #f5f5f5; }

.topbar-avatar {
    width: 32px; height: 32px;
    background: #e94560;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: white;
}

.topbar-user-info { line-height: 1.3; }
.topbar-user-info strong { display: block; font-size: 13px; color: #1a1a2e; }
.topbar-user-info small  { font-size: 11px; color: #aaa; }

/* ---- Main Content ---- */
.main-content {
    margin-left: 250px;
    margin-top: 60px;
    padding: 25px;
    min-height: calc(100vh - 60px);
}

/* ---- Page Header ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: white;
    padding: 20px 25px;
    border-radius: 14px;
    margin-bottom: 25px;
}
.page-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.page-header p  { font-size: 13px; opacity: 0.7; }

/* ---- Buttons ---- */
.btn-action {
    padding: 9px 18px;
    background: #e94560;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    transition: opacity 0.2s, transform 0.15s;
    cursor: pointer;
}
.btn-action:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-action.secondary { background: rgba(255,255,255,0.15); }
.btn-action.green  { background: #27ae60; }
.btn-action.blue   { background: #2980b9; }
.btn-action.orange { background: #e67e22; }

.btn-sm {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-sm:hover { opacity: 0.8; }
.btn-sm.green  { background: #eafaf1; color: #27ae60; }
.btn-sm.blue   { background: #ebf5fb; color: #2980b9; }
.btn-sm.red    { background: #fef0f0; color: #e94560; }
.btn-sm.orange { background: #fef9e7; color: #e67e22; }

/* ---- Badges ---- */
.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}
.badge.green  { background: #eafaf1; color: #27ae60; }
.badge.red    { background: #fef0f0; color: #e94560; }
.badge.blue   { background: #ebf5fb; color: #2980b9; }
.badge.orange { background: #fef9e7; color: #e67e22; }
.badge.teal   { background: #e8faf5; color: #16a085; }
.badge.purple { background: #f5eef8; color: #8e44ad; }
.badge.gray   { background: #f5f5f5; color: #888; }

/* ---- Alerts ---- */
.alert-success, .alert-error, .alert-warning, .alert-info {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #eafaf1; color: #27ae60; border: 1px solid #a9dfbf; }
.alert-error   { background: #fef0f0; color: #e94560; border: 1px solid #f5b7b1; }
.alert-warning { background: #fff8e1; color: #e67e22; border: 1px solid #ffe082; }
.alert-info    { background: #ebf5fb; color: #2980b9; border: 1px solid #aed6f1; }

/* Low Stock Alert Box */
.alert-box {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #f39c12;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 25px;
}
.alert-header {
    display: flex; align-items: center; gap: 10px;
    color: #e67e22; font-size: 14px; flex-wrap: wrap;
}
.alert-items { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.alert-item {
    background: white; border: 1px solid #ffe082;
    border-radius: 8px; padding: 7px 14px;
    display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.alert-product { font-weight: 600; color: #333; }
.alert-site    { color: #888; }
.alert-stock.low { color: #e67e22; font-weight: 700; }
.alert-stock.out { color: #e94560; font-weight: 700; }

/* ---- Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }

.stat-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: white; flex-shrink: 0;
}

.stat-card.blue   .stat-icon { background: linear-gradient(135deg,#3498db,#2980b9); }
.stat-card.green  .stat-icon { background: linear-gradient(135deg,#2ecc71,#27ae60); }
.stat-card.purple .stat-icon { background: linear-gradient(135deg,#9b59b6,#8e44ad); }
.stat-card.orange .stat-icon { background: linear-gradient(135deg,#e67e22,#d35400); }
.stat-card.teal   .stat-icon { background: linear-gradient(135deg,#1abc9c,#16a085); }
.stat-card.red    .stat-icon { background: linear-gradient(135deg,#e94560,#c0392b); }
.stat-card.indigo .stat-icon { background: linear-gradient(135deg,#5c6bc0,#3949ab); }
.stat-card.lime   .stat-icon { background: linear-gradient(135deg,#8bc34a,#689f38); }

.stat-info h3 { font-size: 26px; font-weight: 800; color: #1a1a2e; line-height: 1; margin-bottom: 4px; }
.stat-info p  { font-size: 12px; color: #888; font-weight: 500; }

/* Stats Row (small) */
.stats-row { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-mini {
    background: white; border-radius: 12px; padding: 16px 20px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); flex: 1; min-width: 160px;
    transition: transform 0.15s;
}
.stat-mini:hover { transform: translateY(-2px); }
.stat-mini-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: white;
}
.stat-mini.blue   .stat-mini-icon { background: linear-gradient(135deg,#3498db,#2980b9); }
.stat-mini.green  .stat-mini-icon { background: linear-gradient(135deg,#2ecc71,#27ae60); }
.stat-mini.orange .stat-mini-icon { background: linear-gradient(135deg,#e67e22,#d35400); }
.stat-mini.red    .stat-mini-icon { background: linear-gradient(135deg,#e94560,#c0392b); }
.stat-mini.teal   .stat-mini-icon { background: linear-gradient(135deg,#1abc9c,#16a085); }
.stat-mini.purple .stat-mini-icon { background: linear-gradient(135deg,#9b59b6,#8e44ad); }
.stat-mini h4 { font-size: 22px; font-weight: 800; color: #1a1a2e; margin-bottom: 2px; }
.stat-mini p  { font-size: 12px; color: #888; }

/* ---- Filter Card ---- */
.filter-card {
    background: white; border-radius: 14px; padding: 18px 22px;
    margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.filter-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 150px; }
.filter-group label { font-size: 12px; font-weight: 600; color: #666; }
.filter-actions { display: flex; gap: 8px; align-items: flex-end; }
.btn-filter {
    padding: 9px 18px; background: #e94560; color: white;
    border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.btn-filter:hover { opacity: 0.88; }
.btn-reset-filter {
    padding: 9px 14px; background: #f0f0f0; color: #666;
    border-radius: 8px; text-decoration: none; font-size: 13px;
    display: flex; align-items: center; gap: 5px;
}
.btn-reset-filter:hover { background: #e0e0e0; }

/* ---- Form Controls ---- */
.form-control {
    width: 100%; padding: 10px 14px;
    border: 1px solid #e0e0e0; border-radius: 8px;
    font-size: 14px; color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: white;
}
.form-control:focus {
    outline: none; border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233,69,96,0.08);
}
.form-control:disabled { background: #f5f5f5; color: #aaa; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; }
.req      { color: #e94560; }
.optional { color: #aaa; font-size: 11px; font-weight: 400; }
.form-hint { font-size: 11px; color: #aaa; margin-top: 4px; display: block; }

/* Form Card */
.form-card { background: white; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); overflow: hidden; }
.form-card-header { padding: 16px 22px; border-bottom: 1px solid #f0f0f0; background: #fafafa; }
.form-card-header h4 { font-size: 15px; font-weight: 700; color: #1a1a2e; display: flex; align-items: center; gap: 8px; }
.form-card-body { padding: 22px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.btn-submit {
    padding: 11px 24px; background: linear-gradient(135deg,#e94560,#c0392b);
    color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: opacity 0.2s;
}
.btn-submit:hover { opacity: 0.88; }
.btn-reset {
    padding: 11px 20px; background: #f0f0f0; color: #666;
    border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.btn-reset:hover { background: #e0e0e0; }

/* ---- Autosuggest ---- */
.autosuggest-wrapper { position: relative; }
.autosuggest-list {
    position: absolute; top: 100%; left: 0; right: 0;
    background: white; border: 1px solid #e0e0e0;
    border-top: none; border-radius: 0 0 8px 8px;
    max-height: 220px; overflow-y: auto;
    z-index: 999; display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.suggest-item { padding: 10px 14px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f5f5f5; transition: background 0.15s; }
.suggest-item:hover { background: #fef0f0; }
.suggest-item .s-name { font-weight: 600; color: #1a1a2e; }
.suggest-item .s-meta { font-size: 11px; color: #888; margin-top: 2px; }

/* Product Info Box */
.product-info-box {
    background: #f8f9ff; border: 1px solid #e0e7ff;
    border-radius: 8px; padding: 12px 16px;
    margin-top: 8px; margin-bottom: 4px;
}
.pinfo-row { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: #555; margin-bottom: 6px; }
.pinfo-row:last-child { margin-bottom: 0; }
.pinfo-row span { display: flex; align-items: center; gap: 5px; }
.stock-val { font-size: 15px; color: #27ae60; font-weight: 700; }
.stock-val.low { color: #e67e22; }
.stock-val.out { color: #e94560; }

/* ---- Table ---- */
.table-card { background: white; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); overflow: hidden; }
.table-card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 22px; border-bottom: 1px solid #f0f0f0; background: #fafafa;
}
.table-card-header h4 { font-size: 14px; font-weight: 700; color: #1a1a2e; display: flex; align-items: center; gap: 8px; }
.table-card-header a  { font-size: 12px; color: #e94560; text-decoration: none; font-weight: 600; }

.count-badge { background: #ebf5fb; color: #2980b9; font-size: 11px; padding: 2px 10px; border-radius: 20px; font-weight: 600; }

.btn-print {
    padding: 7px 14px; background: #f0f0f0; border: none; border-radius: 8px;
    font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 5px; color: #555;
}
.btn-print:hover { background: #e0e0e0; }

.table-responsive { overflow-x: auto; }
.main-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.main-table th {
    text-align: left; padding: 10px 14px; color: #888;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; border-bottom: 1px solid #f0f0f0; background: #fafafa;
}
.main-table td { padding: 11px 14px; border-bottom: 1px solid #f9f9f9; color: #444; }
.main-table tr:last-child td { border-bottom: none; }
.main-table tr:hover td { background: #fafafa; }
.no-data { text-align: center; color: #bbb; padding: 40px !important; font-size: 14px; }

.time-badge { font-size: 12px; color: #888; }

/* Dash Card (Dashboard) */
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dash-card { background: white; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.dash-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.dash-card-header h4 { font-size: 14px; font-weight: 700; color: #1a1a2e; display: flex; align-items: center; gap: 8px; }
.dash-card-header a  { font-size: 12px; color: #e94560; text-decoration: none; font-weight: 600; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { text-align: left; padding: 8px 10px; color: #888; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #f0f0f0; }
.dash-table td { padding: 10px; border-bottom: 1px solid #f9f9f9; color: #444; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: #fafafa; }

/* ---- Login Page ---- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 50%, #e94560 100%);
    padding: 20px;
}
.login-card {
    background: white; border-radius: 20px;
    padding: 40px; width: 100%; max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo .logo-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #e94560, #c0392b);
    border-radius: 16px; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 800; color: white;
}
.login-logo h2 { font-size: 22px; font-weight: 800; color: #1a1a2e; }
.login-logo p  { font-size: 13px; color: #888; margin-top: 4px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card label { font-size: 13px; font-weight: 600; color: #555; display: block; margin-bottom: 6px; }
.login-card .input-icon-wrap { position: relative; }
.login-card .input-icon-wrap i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #aaa; font-size: 14px; }
.login-card .input-icon-wrap .form-control { padding-left: 38px; }
.btn-login {
    width: 100%; padding: 13px;
    background: linear-gradient(135deg,#e94560,#c0392b);
    color: white; border: none; border-radius: 10px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    margin-top: 8px; transition: opacity 0.2s;
}
.btn-login:hover { opacity: 0.88; }

/* ---- Notification Dropdown ---- */
.notif-dropdown {
    position: absolute; top: 50px; right: 0;
    width: 320px; background: white;
    border-radius: 14px; box-shadow: 0 5px 30px rgba(0,0,0,0.15);
    z-index: 9999; display: none; overflow: hidden;
}
.notif-dropdown.show { display: block; }
.notif-dropdown-header {
    padding: 14px 18px; border-bottom: 1px solid #f0f0f0;
    display: flex; justify-content: space-between; align-items: center;
    background: #fafafa;
}
.notif-dropdown-header h4 { font-size: 13px; font-weight: 700; color: #1a1a2e; }
.notif-dropdown-header a  { font-size: 11px; color: #e94560; }
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item {
    padding: 12px 18px; border-bottom: 1px solid #f9f9f9;
    display: flex; gap: 10px; cursor: pointer; transition: background 0.15s;
}
.notif-item:hover { background: #fafafa; }
.notif-item.unread { background: #fff8f8; }
.notif-item-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}
.notif-item-icon.request   { background: #fef9e7; color: #e67e22; }
.notif-item-icon.low_stock { background: #fef0f0; color: #e94560; }
.notif-item-icon.general   { background: #ebf5fb; color: #2980b9; }
.notif-item-body strong { display: block; font-size: 12px; color: #333; }
.notif-item-body small  { font-size: 11px; color: #aaa; }
.notif-empty { text-align: center; padding: 24px; color: #bbb; font-size: 13px; }

/* ---- Footer ---- */
.footer {
    margin-left: 250px;
    padding: 14px 25px;
    background: white;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #aaa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .topbar { left: 0; }
    .topbar-toggle { display: block; }
    .footer { margin-left: 0; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .stats-grid   { grid-template-columns: repeat(2, 1fr); }
    .stats-row    { flex-wrap: wrap; }
    .filter-row   { flex-direction: column; }
    .page-header  { flex-direction: column; gap: 14px; align-items: flex-start; }
    .main-content { padding: 15px; }
    .topbar       { padding: 0 15px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Print ---- */
@media print {
    .sidebar, .topbar, .footer,
    .btn-print, .btn-action, .filter-card,
    .page-header .btn-action,
    .stats-row { display: none !important; }
    .main-content { margin: 0 !important; padding: 0 !important; }
    .table-card { box-shadow: none !important; border: 1px solid #ccc; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ---- Overlay (mobile sidebar) ---- */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.sidebar-overlay.show { display: block; }