/* ============================================
   Cheque Management System - Main Stylesheet
   Theme: Blue & White Professional
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333333;
    background-color: #F5F5F5;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

table {
    border-collapse: collapse;
    width: 100%;
}

input,
select,
textarea,
button {
    font-family: inherit;
    font-size: inherit;
}

/* --- Color Variables (CSS Custom Properties) --- */
:root {
    --primary: #1565C0;
    --primary-light: #1E88E5;
    --primary-lightest: #E3F2FD;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray: #E0E0E0;
    --gray-medium: #BDBDBD;
    --text-primary: #333333;
    --text-secondary: #666666;
    --danger: #D32F2F;
    --danger-light: #FFEBEE;
    --success: #388E3C;
    --success-light: #E8F5E9;
    --info: #1565C0;
    --info-light: #E3F2FD;
    --warning: #F57F17;
    --warning-light: #FFF8E1;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --sidebar-width: 250px;
    --header-height: 60px;
    --transition: 0.2s ease;
}

/* ============================================
   LAYOUT: Sidebar
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--primary);
    color: var(--white);
    overflow-y: auto;
    z-index: 1000;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-title {
    padding-left: 0;
}

.sidebar-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--white);
    margin: 0;
}


.sidebar-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.sidebar-subtitle-sm {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin: 2px 0 0 0;
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-left-color: var(--white);
    font-weight: 600;
}

.sidebar-nav a i,
.sidebar-nav a .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-nav .nav-section {
    padding: 15px 20px 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* ============================================
   LAYOUT: Main Content Area
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    height: 100vh;
    background-color: var(--gray-light);
    overflow-y: auto;
    overflow-x: hidden;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 30px;
    background-color: var(--white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.top-header .page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.top-header .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-logout {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--danger);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color var(--transition);
}

.btn-logout:hover {
    background-color: #B71C1C;
    color: var(--white);
}

.top-header .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.top-header .user-info .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-lightest);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.content-wrapper {
    padding: 30px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .login-logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 10px;
    white-space: nowrap;
}

.login-card .login-logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

.login-card .login-logo .logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border-radius: 50%;
    background-color: var(--primary-lightest);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.login-card .form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.login-card .form-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.login-card .btn-login {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition);
}

.login-card .btn-login:hover {
    background-color: var(--primary-light);
}

.login-card .login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.login-card .login-footer a {
    color: var(--primary);
    font-weight: 500;
}

.login-card .login-footer a:hover {
    text-decoration: underline;
}

.login-error {
    background-color: var(--danger-light);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-left: 3px solid var(--danger);
}

/* ============================================
   DASHBOARD STAT CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border-top: 3px solid var(--primary);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background-color: var(--primary-lightest);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-card .stat-change {
    font-size: 0.8rem;
    margin-top: 8px;
}

.stat-card .stat-change.up {
    color: var(--success);
}

.stat-card .stat-change.down {
    color: var(--danger);
}

/* Color variants for stat card borders */
.stat-card.stat-success {
    border-top-color: var(--success);
}

.stat-card.stat-success .stat-icon {
    background-color: var(--success-light);
    color: var(--success);
}

.stat-card.stat-danger {
    border-top-color: var(--danger);
}

.stat-card.stat-danger .stat-icon {
    background-color: var(--danger-light);
    color: var(--danger);
}

.stat-card.stat-warning {
    border-top-color: var(--warning);
}

.stat-card.stat-warning .stat-icon {
    background-color: var(--warning-light);
    color: var(--warning);
}

.stat-card.stat-info {
    border-top-color: var(--info);
}

.stat-card.stat-info .stat-icon {
    background-color: var(--info-light);
    color: var(--info);
}

/* Recent Activity Section */
.recent-activity {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.recent-activity h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray);
    margin: 0;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray);
}

.table-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.table thead th:first-child {
    padding-left: 20px;
}

.table thead th:last-child {
    padding-right: 20px;
}

.table tbody td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid #f0f0f0;
}

.table tbody td:first-child {
    padding-left: 20px;
}

.table tbody td:last-child {
    padding-right: 20px;
}

.table tbody tr:nth-child(even) {
    background-color: #FAFAFA;
}

.table tbody tr:hover {
    background-color: var(--primary-lightest);
    transition: background-color var(--transition);
}

.table .actions {
    display: flex;
    gap: 8px;
}

/* Table search/filter bar */
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray);
    flex-wrap: wrap;
}

.table-toolbar .search-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 14px;
    border: 1px solid var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: border-color var(--transition);
}

.table-toolbar .search-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

/* Filter Section */
.filter-section {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.filter-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.filter-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.form-control::placeholder {
    color: var(--gray-medium);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--gray-light);
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
    appearance: auto;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-light);
}

.btn-secondary {
    background-color: #757575;
    color: var(--white);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #616161;
}

.btn-warning {
    background-color: var(--warning);
    color: var(--white);
}

.btn-warning:hover:not(:disabled) {
    background-color: #E65100;
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover:not(:disabled) {
    background-color: #C62828;
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-success:hover:not(:disabled) {
    background-color: #2E7D32;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--primary);
    color: var(--white);
}

.btn-outline-danger {
    background-color: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover:not(:disabled) {
    background-color: var(--danger);
    color: var(--white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-left: 4px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success);
    border-left-color: var(--success);
}

.alert-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border-left-color: var(--danger);
}

.alert-info {
    background-color: var(--info-light);
    color: var(--info);
    border-left-color: var(--info);
}

.alert-warning {
    background-color: var(--warning-light);
    color: var(--warning);
    border-left-color: var(--warning);
}

.alert .alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.alert .alert-close:hover {
    opacity: 1;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--gray);
    background-color: #FAFAFA;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 20px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all var(--transition);
}

.pagination a:hover {
    background-color: var(--primary-lightest);
    border-color: var(--primary-light);
    color: var(--primary);
}

.pagination .active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 0 20px 16px;
}

/* ============================================
   BADGES / STATUS LABELS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary {
    background-color: var(--primary-lightest);
    color: var(--primary);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

.badge-secondary {
    background-color: #EEEEEE;
    color: var(--text-secondary);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--gray);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary { color: var(--primary) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-bold { font-weight: 600; }
.text-sm { font-size: 0.85rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.p-0 { padding: 0; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.flex-wrap { flex-wrap: wrap; }

.w-100 { width: 100%; }
.overflow-hidden { overflow: hidden; }

/* ============================================
   LOADING / SPINNER
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   SIDEBAR TOGGLE (Mobile)
   ============================================ */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 4px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .content-wrapper {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .top-header {
        padding: 0 16px;
    }

    .content-wrapper {
        padding: 16px;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .modal {
        max-width: 100%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-card .stat-number {
        font-size: 1.6rem;
    }

    .login-card {
        padding: 28px 24px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .top-header,
    .sidebar-toggle,
    .btn,
    .table .actions,
    .pagination {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .table thead th {
        background-color: #eee !important;
        color: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}
