/* =============================================
   SalesAI - Office / Administrative Theme
   Clean, professional, light UI
   ============================================= */

/* --- CSS Variables --- */
:root {
    --bg-body: #f0f2f5;
    --bg-white: #ffffff;
    --bg-sidebar: #1e293b;
    --bg-sidebar-hover: #334155;
    --bg-sidebar-active: #3b82f6;
    --bg-header: #ffffff;
    --bg-input: #f8fafc;
    --bg-input-focus: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-primary-light: #dbeafe;
    --accent-green: #16a34a;
    --accent-green-bg: #dcfce7;
    --accent-green-border: #86efac;
    --accent-amber: #d97706;
    --accent-amber-bg: #fef3c7;
    --accent-amber-border: #fcd34d;
    --accent-red: #dc2626;
    --accent-red-bg: #fee2e2;
    --accent-red-border: #fca5a5;
    --accent-blue: #2563eb;
    --accent-blue-bg: #dbeafe;
    --accent-teal: #0d9488;
    --accent-teal-bg: #ccfbf1;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 14px;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #1e40af 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(37, 99, 235, 0.15);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 4px;
}

.login-field {
    margin-bottom: 20px;
}

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

.login-field input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.login-field input:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-field input::placeholder {
    color: var(--text-muted);
}

.login-error {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
    border: 1px solid var(--accent-red-border);
}

/* =============================================
   MAIN APP LAYOUT
   ============================================= */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 56px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-primary);
}

.header-logo svg {
    color: var(--accent-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
}

/* --- App Body (sidebar + main) --- */
.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: 220px;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: calc(100vh - 56px);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
    gap: 2px;
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 14px 6px;
    user-select: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
}

.nav-item.active {
    background: var(--bg-sidebar-active);
    color: var(--text-white);
    font-weight: 600;
}

.nav-item svg {
    flex-shrink: 0;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    max-height: calc(100vh - 56px);
}

/* --- Page Header --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1.4;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-primary-hover);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--bg-body);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-body);
    border-color: #cbd5e1;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

.btn-text { display: inline; }
.btn-loading { display: none; align-items: center; }

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
}

.btn-icon.edit { color: var(--accent-blue); }
.btn-icon.edit:hover { background: var(--accent-blue-bg); }
.btn-icon.delete { color: var(--accent-red); }
.btn-icon.delete:hover { background: var(--accent-red-bg); }
.btn-icon.renew { color: #0d9488; }
.btn-icon.renew:hover { background: #f0fdfa; }

/* =============================================
   STATS ROW
   ============================================= */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    min-width: 0;
}

.stat-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.bg-blue { background: var(--accent-blue-bg); color: var(--accent-blue); }
.stat-icon.bg-green { background: var(--accent-green-bg); color: var(--accent-green); }
.stat-icon.bg-teal { background: var(--accent-teal-bg); color: var(--accent-teal); }
.stat-icon.bg-amber { background: var(--accent-amber-bg); color: var(--accent-amber); }
.stat-icon.bg-red { background: var(--accent-red-bg); color: var(--accent-red); }
.stat-icon.bg-purple { background: #ede9fe; color: #7c3aed; }

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* =============================================
   TOOLBAR / FILTERS
   ============================================= */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 240px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.875rem;
    transition: var(--transition);
    outline: none;
}

.search-box input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.select-field {
    padding: 9px 34px 9px 12px;
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.84rem;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.select-field:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.select-field option {
    background: var(--bg-white);
    color: var(--text-primary);
}

/* =============================================
   CARD / TABLE
   ============================================= */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    background: #f8fafc;
    white-space: nowrap;
    user-select: none;
}

.data-table thead th.sortable {
    cursor: pointer;
    transition: var(--transition);
}

.data-table thead th.sortable:hover {
    color: var(--accent-primary);
    background: #f1f5f9;
}

.data-table thead th.sort-asc::after,
.data-table thead th.sort-desc::after {
    margin-left: 4px;
    color: var(--accent-primary);
    font-size: 0.7rem;
}

.data-table thead th.sort-asc::after { content: '▲'; }
.data-table thead th.sort-desc::after { content: '▼'; }

.data-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    white-space: nowrap;
}

.customer-info {
    display: flex;
    flex-direction: column;
}

.customer-name {
    font-weight: 600;
    color: var(--text-primary);
}

.customer-contact {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* --- Account type badges --- */
.badge-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-type.gemini { background: #dbeafe; color: #1d4ed8; }
.badge-type.chatgpt { background: #dcfce7; color: #15803d; }
.badge-type.claude { background: #fef3c7; color: #b45309; }
.badge-type.antigravity { background: #ede9fe; color: #7c3aed; }
.badge-type.copilot { background: #e0f2fe; color: #0369a1; }
.badge-type.midjourney { background: #fce7f3; color: #be185d; }
.badge-type.other { background: #f1f5f9; color: #64748b; }

/* --- Status badges --- */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-status.active {
    background: var(--accent-green-bg);
    color: var(--accent-green);
}

.badge-status.active::before {
    background: var(--accent-green);
    box-shadow: 0 0 4px var(--accent-green);
}

.badge-status.expired {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.badge-status.expired::before { background: var(--accent-red); }

.badge-status.cancelled {
    background: #f1f5f9;
    color: var(--text-muted);
}

.badge-status.cancelled::before { background: var(--text-muted); }

.price-cell {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-green);
}

.actions-cell {
    display: flex;
    gap: 4px;
}

/* Loading & empty */
.loading-cell {
    text-align: center;
    padding: 48px 16px !important;
    color: var(--text-muted);
}

.loading-row td {
    text-align: center;
    padding: 48px 16px !important;
    color: var(--text-muted);
}

.loading-row td span {
    display: block;
    margin-top: 10px;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
}

.empty-state td {
    padding: 48px 16px !important;
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 8px;
    opacity: 0.4;
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
}

.pagination button {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover:not(.active):not(:disabled) {
    background: var(--accent-blue-bg);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.pagination button.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination .page-info {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0 8px;
}

/* =============================================
   MODALS
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 660px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.25s ease;
}

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

.modal-sm {
    max-width: 440px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* =============================================
   FORMS
   ============================================= */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.req {
    color: var(--accent-red);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 9px 12px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.875rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 34px;
}

.form-group select option {
    background: var(--bg-white);
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-row input[type="color"] {
    width: 40px;
    height: 36px;
    padding: 2px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-input);
}

.color-picker-row span {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-family: monospace;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
    accent-color: var(--accent-primary);
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    min-width: 280px;
    max-width: 400px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.35s ease;
    cursor: pointer;
    transition: var(--transition);
}

.toast:hover {
    transform: translateX(-3px);
}

.toast.success {
    background: var(--accent-green);
    color: white;
}

.toast.error {
    background: var(--accent-red);
    color: white;
}

.toast.info {
    background: var(--accent-blue);
    color: white;
}

.toast.fade-out {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* =============================================
   DELETE MODAL
   ============================================= */
.text-muted {
    color: var(--text-muted) !important;
    font-size: 0.84rem !important;
}

/* =============================================
   VIEW toggle
   ============================================= */
.view {
    display: block;
}

/* =============================================
   ROW ANIMATION
   ============================================= */
.data-table tbody tr {
    animation: row-enter 0.25s ease forwards;
}

@keyframes row-enter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 56px;
    }

    .sidebar .nav-item span,
    .sidebar .nav-section-label {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 10px;
    }

    .header {
        padding: 0 16px;
    }

    .main-content {
        padding: 16px;
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

    .search-box {
        min-width: unset;
    }

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

    .modal {
        width: 95%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        display: none;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 1.15rem;
    }
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
