/* =========================================================
   Sistema Abente — CSS Principal (Professional Minimalist)
   ========================================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Variables --- */
:root {
    /* Primary & Accent: Single professional color */
    --primary:       #1e40af;
    --primary-dark:  #1e3a8a;
    --primary-light: #3b82f6;

    /* Status colors - Minimal, professional tones */
    --success:       #059669;
    --warning:       #d97706;
    --danger:        #dc2626;
    --info:          #0891b2;

    /* Sidebar - Professional dark neutral */
    --sidebar-bg:    #1f2937;
    --sidebar-hover: #374151;
    --sidebar-active:#1e40af;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;

    --topbar-h:      64px;

    /* Neutral palette - 90% of design */
    --bg-body:       #f9fafb;
    --bg-card:       #ffffff;
    --bg-hover:      #f3f4f6;
    --bg-active:     #eff6ff;

    --text-primary:  #111827;
    --text-secondary:#4b5563;
    --text-muted:    #9ca3af;
    --border:        #e5e7eb;
    --border-light:  #f3f4f6;

    /* Spacing & Radius */
    --radius-sm:     6px;
    --radius:        8px;
    --radius-lg:     12px;
    --radius-xl:     16px;

    /* Shadows - Subtle, professional */
    --shadow-sm:     0 1px 2px rgba(0,0,0,.04);
    --shadow:        0 1px 3px rgba(0,0,0,.08);
    --shadow-lg:     0 4px 12px rgba(0,0,0,.1);
    --shadow-xl:     0 10px 30px rgba(0,0,0,.12);

    --transition:    .2s cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================================
   LAYOUT WRAPPER
   ========================================================= */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: width var(--transition);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    min-height: var(--topbar-h);
    overflow: hidden;
}
.sidebar-brand-icon {
    width: 40px; height: 40px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: white;
    box-shadow: 0 2px 8px rgba(30,64,175,.3);
}
.sidebar-brand-text {
    display: flex; flex-direction: column;
    transition: opacity var(--transition), width var(--transition);
    white-space: nowrap;
    overflow: hidden;
}
.collapsed .sidebar-brand-text { opacity: 0; width: 0; }
.sidebar-brand-name {
    font-size: 15px; font-weight: 700; color: #fff;
    letter-spacing: -.2px;
}
.sidebar-brand-sub {
    font-size: 11px; color: #d1d5db; font-weight: 400;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
    padding: 16px 12px 6px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition);
    font-weight: 600;
}
.collapsed .nav-section-title { opacity: 0; }

.nav-item { margin-bottom: 2px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: #d1d5db;
    font-weight: 500;
    font-size: 13.5px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.nav-link:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
}
.nav-link.active {
    background: var(--sidebar-active);
    color: #ffffff;
    box-shadow: 0 0 0 8px rgba(30,64,175,.1);
}
.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 70%;
    background: #bfdbfe;
    border-radius: 0 3px 3px 0;
}
.nav-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}
.nav-label {
    transition: opacity var(--transition), width var(--transition);
    overflow: hidden;
}
.collapsed .nav-label { opacity: 0; width: 0; }
.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    transition: opacity var(--transition);
}
.collapsed .nav-badge { opacity: 0; }

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
    overflow: hidden;
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.sidebar-user-info {
    flex: 1;
    overflow: hidden;
    transition: opacity var(--transition), width var(--transition);
    white-space: nowrap;
}
.collapsed .sidebar-user-info { opacity: 0; width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #f3f4f6; }
.sidebar-user-role { font-size: 11px; color: #9ca3af; }
.sidebar-logout-btn {
    color: #d1d5db;
    font-size: 16px;
    flex-shrink: 0;
    transition: color var(--transition), opacity var(--transition);
    background: none;
    border: none;
    cursor: pointer;
}
.collapsed .sidebar-logout-btn { opacity: 0; width: 0; overflow: hidden; }
.sidebar-logout-btn:hover { color: var(--danger); }

/* =========================================================
   MAIN CONTENT
   ========================================================= */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition);
}
.sidebar-collapsed-state .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}
.topbar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
    line-height: 1;
}
.topbar-toggle:hover { background: var(--bg-hover); color: var(--primary); }
.topbar-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -.3px;
}
.topbar-time {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.topbar-actions {
    display: flex; align-items: center; gap: 8px;
}
.topbar-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
    position: relative;
    line-height: 1;
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--primary); }
.topbar-notif-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.topbar-divider {
    width: 1px; height: 28px;
    background: var(--border);
}
.topbar-user {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius);
    transition: background var(--transition);
}
.topbar-user:hover { background: var(--bg-hover); }
.topbar-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 13px;
}
.topbar-user-name {
    font-size: 13px; font-weight: 600;
    color: var(--text-primary);
}
.topbar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* =========================================================
   PAGE CONTENT
   ========================================================= */
.page-content {
    flex: 1;
    padding: 32px 32px 40px;
}
.page-header {
    margin-bottom: 28px;
}
.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -.3px;
}
.page-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.5;
}
.page-header-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-muted);
    margin-top: 12px;
}
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--primary); font-weight: 600; }

/* =========================================================
   KPI CARDS - Minimalist Design
   ========================================================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: transform var(--transition), box-shadow var(--transition);
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.kpi-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 16px;
}
.kpi-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    background: var(--bg-hover);
    color: var(--primary);
}

.kpi-trend {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600;
    padding: 4px 8px;
    border-radius: 99px;
}
.kpi-trend.up   { color: var(--success); background: rgba(5,150,105,.08); }
.kpi-trend.down { color: var(--danger); background: rgba(220,38,38,.08); }
.kpi-trend.flat { color: var(--text-muted); background: var(--bg-hover); }

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -1px;
}
.kpi-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 12px;
}
.kpi-sub {
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* =========================================================
   CHART CARDS
   ========================================================= */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}
.charts-grid.single { grid-template-columns: 1fr; }
.charts-grid.two-one {
    grid-template-columns: 2fr 1fr;
}
@media (max-width: 900px) {
    .charts-grid, .charts-grid.two-one { grid-template-columns: 1fr; }
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.chart-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap; gap: 12px;
}
.chart-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.chart-card-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.chart-period-btns {
    display: flex; gap: 4px;
}
.chart-period-btn {
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.chart-period-btn.active,
.chart-period-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.chart-wrap {
    position: relative;
    height: 220px;
}
.chart-wrap.tall { height: 280px; }

/* =========================================================
   TABLES
   ========================================================= */
.table-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 24px;
}
.table-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap; gap: 10px;
}
.table-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.table-wrap { overflow-x: auto; }
table.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    background: var(--bg-hover);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-primary);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr {
    transition: background var(--transition);
}
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table .text-muted { color: var(--text-muted); font-size: 12px; }

/* =========================================================
   BADGES
   ========================================================= */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-primary { background: rgba(30,64,175,.1);  color: var(--primary); }
.badge-success { background: rgba(5,150,105,.1); color: var(--success); }
.badge-warning { background: rgba(217,119,6,.1); color: var(--warning); }
.badge-danger  { background: rgba(220,38,38,.1);  color: var(--danger); }
.badge-info    { background: rgba(8,145,178,.1);  color: var(--info); }
.badge-muted   { background: var(--bg-hover);       color: var(--text-muted); }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(30,64,175,.2);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(30,64,175,.3);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    background: none;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--bg-active); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: var(--radius); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-muted { background: var(--bg-hover); color: var(--text-secondary); }
.btn-muted:hover { background: var(--border); }

/* =========================================================
   LOGOUT FORM
   ========================================================= */
form.logout-form { display: inline; }
.logout-link {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
    display: flex; align-items: center; gap: 12px;
    width: 100%;
}

/* =========================================================
   ACTIVITY FEED
   ========================================================= */
.activity-list { padding: 8px 0; }
.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--bg-hover); }
.activity-dot {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: var(--bg-hover);
    color: var(--primary);
}
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.activity-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* =========================================================
   DONUT CENTER LABEL
   ========================================================= */
.donut-wrap {
    position: relative;
}
.donut-center-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}
.donut-center-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.donut-center-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content,
    .sidebar-collapsed-state .main-content { margin-left: 0; }
    .page-content { padding: 20px 16px; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .charts-grid { grid-template-columns: 1fr; }
    .topbar-user-name, .topbar-user-role { display: none; }
}
@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 20px; }
}

/* =========================================================
   MINI PROGRESS BAR
   ========================================================= */
.mini-bar {
    height: 6px;
    background: var(--bg-hover);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 10px;
}
.mini-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* =========================================================
   FORMS
   ========================================================= */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: -.2px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,64,175,.08);
}
.form-control.is-invalid {
    border-color: var(--danger);
}
.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
    font-weight: 500;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
textarea.form-control {
    resize: vertical;
    min-height: 70px;
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn .3s ease;
}
.alert-success {
    background: rgba(5,150,105,.08);
    color: var(--success);
    border: 1px solid rgba(5,150,105,.2);
}
.alert-danger {
    background: rgba(220,38,38,.08);
    color: var(--danger);
    border: 1px solid rgba(220,38,38,.2);
}

/* =========================================================
   BUDGET ITEMS (dynamic rows)
   ========================================================= */
.budget-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}
.budget-items-table th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.budget-items-table td {
    padding: 8px 10px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}
.budget-items-table .form-control {
    padding: 8px 10px;
    font-size: 13px;
}
.budget-items-table .btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 15px;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: background var(--transition);
}
.budget-items-table .btn-remove:hover {
    background: rgba(220,38,38,.1);
}

/* Delete confirmation */
.confirm-delete-text {
    text-align: center;
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.confirm-delete-text strong {
    color: var(--text-primary);
}
.confirm-delete-icon {
    font-size: 48px;
    color: var(--danger);
    display: block;
    text-align: center;
    margin-bottom: 16px;
    opacity: .6;
}

/* =========================================================
   PAGINATION STYLES
   ========================================================= */
.pagination-wrapper {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.pagination-info {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.pagination-btn.disabled,
.pagination-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-btn i {
    font-size: 12px;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.pagination-number:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.pagination-number.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}

.pagination-dots {
    color: var(--text-muted);
    padding: 0 2px;
    font-weight: 500;
}

/* =========================================================
   MODALS
   ========================================================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn .2s ease;
}
.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 95%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp .25s ease;
}
.modal-box.modal-lg { max-width: 780px; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}
.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-hover); color: var(--danger); }
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================================
   UTILITIES
   ========================================================= */
.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; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-primary-color { color: var(--primary); }
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mt-4 { margin-top: 4px; }
.mt-16 { margin-top: 16px; }
.p-4  { padding: 4px; }
.w-full { width: 100%; }
