/* =====================================================
   Life Style Aqua — Admin Panel Stylesheet ("Depth Admin")
   Brand-aligned with the main site's deep teal + gold palette
   ===================================================== */

/* === CSS Variables === */
:root {
    --bg-dark: #0A2A34;
    --bg-main: #0D3440;
    --bg-card: rgba(255,255,255,0.05);
    --bg-card-hover: rgba(255,255,255,0.08);
    --bg-sidebar: #081E26;
    --bg-input: rgba(255,255,255,0.07);
    --fg: #E9F3F0;
    --fg-soft: #A9C6C6;
    --fg-muted: #6B9999;
    --gold: #E9C46A;
    --gold-dark: #C9A44A;
    --teal: #1B9AAA;
    --teal-light: #2BBAD0;
    --green: #4ECB71;
    --red: #FF6B6B;
    --red-dark: #E04545;
    --orange: #F4A261;
    --blue: #4CACEB;
    --line: rgba(255,255,255,0.08);
    --line-strong: rgba(255,255,255,0.14);
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --f-body: 'Hanken Grotesk', system-ui, sans-serif;
    --f-disp: 'Marcellus', Georgia, serif;
    --sidebar-w: 260px;
    --header-h: 64px;
    --ease: cubic-bezier(0.22, 0.8, 0.22, 1);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg-main);
    color: var(--fg);
    font: 400 14px/1.6 var(--f-body);
    overflow-x: hidden;
    min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; transition: color .3s; }
a:hover { color: var(--gold-dark); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* === Login Page === */
.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #061820 0%, #0D3440 50%, #1B4B58 100%);
    padding: 20px; position: relative; overflow: hidden;
}
.login-wrap::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(233,196,106,0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(27,154,170,0.06) 0%, transparent 50%);
    animation: loginPulse 12s ease-in-out infinite alternate;
}
@keyframes loginPulse { 0% { transform: scale(1) rotate(0deg); } 100% { transform: scale(1.05) rotate(2deg); } }

.login-box {
    position: relative; z-index: 1;
    background: rgba(255,255,255,0.04); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px; padding: 48px 40px; width: 100%; max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo img { height: 56px; margin: 0 auto 12px; }
.login-logo h1 { font: 400 26px var(--f-disp); color: var(--fg); }
.login-logo h1 b { color: var(--gold); }
.login-logo p { color: var(--fg-soft); font-size: 14px; margin-top: 4px; }

/* === Layout: Sidebar + Main === */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-w); background: var(--bg-sidebar);
    border-right: 1px solid var(--line); display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
    transition: transform .4s var(--ease), width .4s var(--ease);
    overflow-y: auto; overflow-x: hidden;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px; border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.sidebar-brand img { height: 36px; flex-shrink: 0; }
.sidebar-brand h2 { font: 400 18px var(--f-disp); color: var(--fg); }
.sidebar-brand h2 b { color: var(--gold); }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-label {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--fg-muted); padding: 16px 20px 6px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px; color: var(--fg-soft); font-size: 13.5px;
    font-weight: 400; border-left: 3px solid transparent;
    transition: all .25s var(--ease); cursor: pointer; text-decoration: none;
}
.nav-item:hover {
    background: rgba(255,255,255,0.04); color: var(--fg);
}
.nav-item.active {
    color: var(--gold); background: rgba(233,196,106,0.06);
    border-left-color: var(--gold); font-weight: 500;
}
.nav-item svg, .nav-item .nav-icon {
    width: 18px; height: 18px; flex-shrink: 0; opacity: .7;
}
.nav-item.active svg, .nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
    margin-left: auto; font-size: 11px; font-weight: 600;
    background: var(--red); color: #fff; padding: 1px 7px;
    border-radius: 10px; min-width: 20px; text-align: center;
}

.sidebar-footer {
    padding: 16px 20px; border-top: 1px solid var(--line);
    font-size: 12px; color: var(--fg-muted);
}

/* Main Content */
.main-content {
    flex: 1; margin-left: var(--sidebar-w);
    min-height: 100vh; display: flex; flex-direction: column;
    transition: margin-left .4s var(--ease);
}

/* Top Header */
.top-header {
    height: var(--header-h); display: flex; align-items: center;
    justify-content: space-between; padding: 0 28px;
    background: var(--bg-dark); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 100;
}
.top-header-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle {
    display: none; background: none; border: none; color: var(--fg-soft);
    padding: 8px; border-radius: var(--radius-xs);
}
.menu-toggle:hover { color: var(--fg); background: var(--bg-card); }
.menu-toggle svg { width: 22px; height: 22px; }

.page-title { font: 400 20px var(--f-disp); }
.breadcrumb { font-size: 12px; color: var(--fg-muted); }
.breadcrumb a { color: var(--fg-soft); }
.breadcrumb span { margin: 0 6px; }

.top-header-right { display: flex; align-items: center; gap: 16px; }
.user-info {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 14px; border-radius: 99px;
    background: var(--bg-card); font-size: 13px; color: var(--fg-soft);
}
.user-info .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--gold));
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 13px; color: var(--bg-dark);
}
.user-role {
    font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
    color: var(--gold); font-weight: 500;
}

/* Page Content */
.page-content { flex: 1; padding: 28px; }

/* === Cards === */
.card {
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    transition: border-color .3s;
}
.card:hover { border-color: var(--line-strong); }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--line);
    flex-wrap: wrap; gap: 12px;
}
.card-header h3 { font: 400 18px var(--f-disp); }
.card-body { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--line); }

/* === Stat Cards === */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 20px; position: relative;
    overflow: hidden; transition: all .3s var(--ease);
}
.stat-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::after {
    content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px;
    border-radius: 0 0 0 80px; opacity: .08;
}
.stat-card.gold::after { background: var(--gold); }
.stat-card.teal::after { background: var(--teal); }
.stat-card.green::after { background: var(--green); }
.stat-card.red::after { background: var(--red); }
.stat-card.orange::after { background: var(--orange); }
.stat-card.blue::after { background: var(--blue); }

.stat-label { font-size: 12px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.stat-value { font: 400 28px var(--f-disp); }
.stat-card.gold .stat-value { color: var(--gold); }
.stat-card.teal .stat-value { color: var(--teal-light); }
.stat-card.green .stat-value { color: var(--green); }
.stat-card.red .stat-value { color: var(--red); }
.stat-card.orange .stat-value { color: var(--orange); }
.stat-card.blue .stat-value { color: var(--blue); }
.stat-sub { font-size: 12px; color: var(--fg-soft); margin-top: 4px; }

/* === Forms === */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-label {
    display: block; font-size: 12px; font-weight: 500; color: var(--fg-soft);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px;
}
.form-label .req { color: var(--red); }
.form-control {
    width: 100%; padding: 10px 14px; background: var(--bg-input);
    border: 1px solid var(--line); border-radius: var(--radius-xs);
    color: var(--fg); font: 400 14px var(--f-body);
    transition: border-color .3s, box-shadow .3s;
}
.form-control:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(233,196,106,0.15);
}
.form-control::placeholder { color: var(--fg-muted); }
select.form-control { cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A9C6C6' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    padding-right: 36px;
}
textarea.form-control { resize: vertical; min-height: 80px; }
.form-text { font-size: 12px; color: var(--fg-muted); margin-top: 4px; }
.form-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }

.stock-display {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; background: rgba(78,203,113,0.1);
    border: 1px solid rgba(78,203,113,0.2); border-radius: var(--radius-xs);
    font-size: 14px; color: var(--green); font-weight: 500;
}
.stock-display.low {
    background: rgba(255,107,107,0.1); border-color: rgba(255,107,107,0.2);
    color: var(--red);
}

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 99px; font: 500 13px var(--f-body);
    border: 1.5px solid transparent; cursor: pointer;
    transition: all .3s var(--ease); text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--bg-dark); border-color: var(--gold); }
.btn-gold:hover { box-shadow: 0 8px 24px rgba(233,196,106,0.3); color: var(--bg-dark); }
.btn-teal { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-teal:hover { box-shadow: 0 8px 24px rgba(27,154,170,0.3); color: #fff; }
.btn-outline { background: transparent; color: var(--fg-soft); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--bg-card); color: var(--fg); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: var(--red-dark); box-shadow: 0 8px 24px rgba(255,107,107,0.3); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-icon { padding: 8px; border-radius: var(--radius-xs); min-width: 36px; justify-content: center; }
.btn svg { width: 16px; height: 16px; }

/* === Tables === */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th {
    text-align: left; padding: 12px 16px; font-size: 11px;
    font-weight: 600; text-transform: uppercase; letter-spacing: .7px;
    color: var(--fg-muted); background: rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td {
    padding: 12px 16px; border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.data-table tbody tr { transition: background .2s; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }
.data-table .text-nowrap { white-space: nowrap; }

/* === Status Badges === */
.badge {
    display: inline-flex; padding: 3px 10px; border-radius: 99px;
    font-size: 11px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase;
}
.badge-active, .badge-confirmed, .badge-paid, .badge-completed { background: rgba(78,203,113,0.15); color: var(--green); }
.badge-inactive, .badge-cancelled { background: rgba(255,107,107,0.15); color: var(--red); }
.badge-pending { background: rgba(233,196,106,0.15); color: var(--gold); }
.badge-partial { background: rgba(244,162,97,0.15); color: var(--orange); }
.badge-returned { background: rgba(76,172,235,0.15); color: var(--blue); }

/* Type badges for stock movements */
.badge-stock_in { background: rgba(78,203,113,0.15); color: var(--green); }
.badge-transfer_in { background: rgba(76,172,235,0.15); color: var(--blue); }
.badge-transfer_out { background: rgba(244,162,97,0.15); color: var(--orange); }
.badge-sale { background: rgba(233,196,106,0.15); color: var(--gold); }
.badge-mortality { background: rgba(255,107,107,0.15); color: var(--red); }
.badge-sale_return { background: rgba(76,172,235,0.15); color: var(--blue); }
.badge-adjustment { background: rgba(169,198,198,0.15); color: var(--fg-soft); }

/* === Pagination === */
.pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0; flex-wrap: wrap; gap: 12px;
}
.pg-info { font-size: 13px; color: var(--fg-muted); }
.pg-links { display: flex; gap: 4px; }
.pg-btn {
    padding: 6px 12px; border-radius: var(--radius-xs);
    font-size: 13px; color: var(--fg-soft); border: 1px solid var(--line);
    background: transparent; text-decoration: none;
    transition: all .2s;
}
.pg-btn:hover, .pg-btn.active {
    background: var(--gold); color: var(--bg-dark); border-color: var(--gold);
}

/* === Alerts / Flash Messages === */
.alert {
    padding: 14px 20px; border-radius: var(--radius-sm);
    margin-bottom: 20px; font-size: 14px; display: flex;
    align-items: center; gap: 10px; animation: alertIn .4s var(--ease);
}
@keyframes alertIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.alert-success { background: rgba(78,203,113,0.12); border: 1px solid rgba(78,203,113,0.25); color: var(--green); }
.alert-error { background: rgba(255,107,107,0.12); border: 1px solid rgba(255,107,107,0.25); color: var(--red); }
.alert-warning { background: rgba(233,196,106,0.12); border: 1px solid rgba(233,196,106,0.25); color: var(--gold); }
.alert-info { background: rgba(76,172,235,0.12); border: 1px solid rgba(76,172,235,0.25); color: var(--blue); }
.alert-close { margin-left: auto; background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; padding: 0 4px; }

/* === Modal === */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-main); border: 1px solid var(--line-strong);
    border-radius: var(--radius); width: 100%; max-width: 560px;
    box-shadow: var(--shadow-lg); animation: modalIn .3s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: none; } }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.modal-header h3 { font: 400 18px var(--f-disp); }
.modal-close { background: none; border: none; color: var(--fg-soft); font-size: 22px; cursor: pointer; padding: 4px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* === Confirmation Dialog === */
.confirm-dialog .modal { max-width: 400px; text-align: center; }
.confirm-dialog .modal-body p { color: var(--fg-soft); margin-bottom: 8px; }
.confirm-dialog .modal-body .warn { color: var(--red); font-size: 13px; }

/* === Filter Bar === */
.filter-bar {
    display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
    padding: 16px 22px; background: rgba(0,0,0,0.1);
    border-bottom: 1px solid var(--line);
}
.filter-bar .form-group { margin-bottom: 0; min-width: 160px; }
.filter-bar .form-label { margin-bottom: 4px; font-size: 11px; }
.filter-bar .form-control { padding: 8px 12px; font-size: 13px; }

/* === Empty State === */
.empty-state {
    text-align: center; padding: 48px 24px; color: var(--fg-muted);
}
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; opacity: .4; }
.empty-state h4 { font: 400 20px var(--f-disp); color: var(--fg-soft); margin-bottom: 8px; }
.empty-state p { max-width: 360px; margin: 0 auto 20px; font-size: 14px; }

/* === Print Invoice === */
@media print {
    .sidebar, .top-header, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
    body { background: #fff; color: #000; font-size: 12px; }
    .card { border: 1px solid #ddd; box-shadow: none; background: #fff; }
    .invoice-header { border-bottom: 2px solid #000; }
    .data-table th { background: #eee; color: #333; }
    .data-table td { border-color: #ddd; }
    .badge { border: 1px solid currentColor; }
}

/* === Invoice Styles === */
.invoice-wrap { max-width: 800px; margin: 0 auto; }
.invoice-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--line);
}
.invoice-header .company h2 { font: 400 24px var(--f-disp); }
.invoice-header .company p { color: var(--fg-soft); font-size: 13px; }
.invoice-details { text-align: right; font-size: 13px; }
.invoice-details h3 { font: 400 20px var(--f-disp); color: var(--gold); margin-bottom: 8px; }
.invoice-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; font-size: 13px; }
.invoice-meta dt { color: var(--fg-muted); font-size: 11px; text-transform: uppercase; }
.invoice-meta dd { margin-bottom: 8px; }
.invoice-total {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 6px; margin-top: 16px; font-size: 14px;
}
.invoice-total .grand-total { font: 400 22px var(--f-disp); color: var(--gold); }

/* === Low Stock Alert === */
.low-stock-list { list-style: none; }
.low-stock-list li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.low-stock-list .fish-name { font-weight: 500; }
.low-stock-list .stock-qty { color: var(--red); font-weight: 600; }

/* === Utilities === */
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-soft { color: var(--fg-soft); }
.text-muted { color: var(--fg-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.mt-0 { margin-top: 0; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* === Badges === */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 500; text-transform: capitalize;
    line-height: 1.5; letter-spacing: .3px;
}
.badge-active, .badge-completed, .badge-confirmed, .badge-paid,
.badge-stock_in, .badge-transfer_in, .badge-sale_return { background: rgba(78,203,113,.15); color: var(--green); }
.badge-inactive, .badge-cancelled { background: rgba(107,153,153,.15); color: var(--fg-muted); }
.badge-pending, .badge-opening, .badge-partial { background: rgba(233,196,106,.15); color: var(--gold); }
.badge-sale, .badge-mortality, .badge-transfer_out { background: rgba(255,107,107,.15); color: var(--red); }
.badge-purchase, .badge-adjustment { background: rgba(27,154,170,.15); color: var(--teal); }

/* === Filter Bar === */
.filter-bar {
    display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
    padding: 16px 22px; border-bottom: 1px solid var(--line);
    background: rgba(0,0,0,.1);
}
.filter-bar .form-group { margin-bottom: 0; min-width: 130px; }
.filter-bar .form-label { font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.form-inline { display: flex; align-items: flex-end; }

/* === Pagination === */
.pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 22px; border-top: 1px solid var(--line); font-size: 13px;
}
.pg-info { color: var(--fg-muted); }
.pg-links { display: flex; gap: 4px; }
.pg-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 8px;
    border-radius: var(--radius-xs); background: var(--bg-card);
    color: var(--fg-soft); font-size: 13px; transition: all .2s;
    border: 1px solid var(--line);
}
.pg-btn:hover { background: var(--bg-card-hover); color: var(--fg); }
.pg-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* === Button Group === */
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.btn-danger {
    background: var(--red); color: #fff; border: 1px solid var(--red-dark);
    padding: 6px 14px; border-radius: var(--radius-xs); cursor: pointer;
    font: 500 13px var(--f-body); transition: all .2s;
}
.btn-danger:hover { background: var(--red-dark); }

/* === Text Nowrap === */
.text-nowrap { white-space: nowrap; }
.req { color: var(--red); }
.form-text { font-size: 11px; color: var(--fg-muted); margin-top: 4px; }

/* === Responsive === */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: flex; }
    .sidebar-overlay {
        display: none; position: fixed; inset: 0;
        background: rgba(0,0,0,0.5); z-index: 199;
    }
    .sidebar-overlay.active { display: block; }
}
@media (max-width: 768px) {
    .page-content { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 22px; }
    .form-row { grid-template-columns: 1fr; }
    .card-header { padding: 14px 16px; }
    .card-body { padding: 16px; }
    .filter-bar { padding: 12px 16px; }
    .top-header { padding: 0 16px; }
    .invoice-header { flex-direction: column; gap: 16px; }
    .invoice-details { text-align: left; }
}
@media (max-width: 480px) {
    .btn-group { flex-direction: column; }
    .pagination { flex-direction: column; text-align: center; }
}
