/* ============================================================
   Contrat - Styles principaux
   Thème moderne, responsive, professionnel
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --dark: #1e293b;
    --gray: #64748b;
    --gray-light: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--gray-light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--primary-dark); }

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

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--dark) 0%, #0f172a 100%);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo {
    font-size: 24px;
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.sidebar-header .subtitle {
    font-size: 0.7rem;
    color: var(--secondary);
    display: block;
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-nav .nav-section {
    padding: 10px 20px 5px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 1px;
    font-weight: 600;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #cbd5e1;
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border-left-color: var(--primary);
}

.sidebar-nav a .icon {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-user {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.2);
}

.sidebar-user .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.sidebar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.sidebar-user .user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-user .user-role {
    font-size: 0.7rem;
    color: var(--secondary);
}

/* Main content */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.topbar {
    background: var(--white);
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-left h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--secondary);
}

.breadcrumb a { color: var(--secondary); }
.breadcrumb a:hover { color: var(--primary); }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-menu-mobile {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* Notification bell */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--secondary);
    transition: var(--transition);
}

.notification-bell:hover { color: var(--primary); }

.notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 700;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown.show { display: block; }

.notification-dropdown .notif-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-dropdown .notif-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.notification-dropdown .notif-item:hover { background: var(--gray-light); }

.notification-dropdown .notif-item .notif-title {
    font-weight: 600;
    font-size: 0.85rem;
}

.notification-dropdown .notif-item .notif-message {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 3px;
}

.notification-dropdown .notif-item .notif-time {
    font-size: 0.7rem;
    color: var(--secondary);
    margin-top: 3px;
}

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

/* ============================================================
   Credit Counter / Progress Bar (prominent display)
   ============================================================ */
.credit-counter {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.credit-counter .credit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.credit-counter .credit-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

.credit-counter .credit-values {
    display: flex;
    gap: 20px;
    align-items: center;
}

.credit-counter .credit-value {
    text-align: center;
}

.credit-counter .credit-value .number {
    font-size: 1.5rem;
    font-weight: 700;
}

.credit-counter .credit-value .label {
    font-size: 0.75rem;
    color: var(--secondary);
}

.credit-counter .credit-value.remaining .number {
    color: var(--success);
}

.credit-counter .credit-value.remaining.danger .number {
    color: var(--danger);
}

.credit-counter .credit-value.consumed .number {
    color: var(--warning);
}

.progress-bar-container {
    background: var(--gray-light);
    border-radius: 10px;
    height: 14px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--success), var(--primary));
}

.progress-bar-fill.warning {
    background: linear-gradient(90deg, var(--warning), #f97316);
}

.progress-bar-fill.danger {
    background: linear-gradient(90deg, var(--danger), #dc2626);
}

.progress-bar-text {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 5px;
    text-align: right;
}

.debt-alert {
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 12px 15px;
    margin-top: 10px;
    color: var(--danger);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--gray-light);
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

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

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-icon.blue { background: var(--primary-light); }
.stat-card .stat-icon.green { background: var(--success-light); }
.stat-card .stat-icon.yellow { background: var(--warning-light); }
.stat-card .stat-icon.red { background: var(--danger-light); }

.stat-card .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--secondary);
}

/* ============================================================
   Tables
   ============================================================ */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    background: var(--gray-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tbody tr {
    transition: var(--transition);
}

table tbody tr:hover {
    background: var(--gray-light);
}

table td {
    font-size: 0.9rem;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: var(--font);
    line-height: 1.5;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }

.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #059669; color: var(--white); }

.btn-warning { background: var(--warning); color: var(--dark); }
.btn-warning:hover { background: #d97706; }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; color: var(--white); }

.btn-secondary { background: var(--gray-light); color: var(--dark); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }

.btn-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* ============================================================
   Forms
   ============================================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: var(--transition);
    background: var(--white);
    color: var(--dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================================
   Badges / Tags
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-info { background: var(--info-light); color: #1e40af; }
.badge-secondary { background: var(--gray-light); color: var(--secondary); }

.badge-status-a_faire { background: var(--info-light); color: #1e40af; }
.badge-status-en_cours { background: var(--warning-light); color: #92400e; }
.badge-status-terminee { background: var(--success-light); color: #065f46; }

.badge-priorite-basse { background: var(--gray-light); color: var(--secondary); }
.badge-priorite-normale { background: var(--info-light); color: #1e40af; }
.badge-priorite-haute { background: var(--warning-light); color: #92400e; }
.badge-priorite-urgente { background: var(--danger-light); color: #991b1b; }

/* ============================================================
   Alerts / Flash messages
   ============================================================ */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

.alert-success { background: var(--success-light); color: #065f46; border-left: 4px solid var(--success); }
.alert-error, .alert-danger { background: var(--danger-light); color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: #92400e; border-left: 4px solid var(--warning); }
.alert-info { background: var(--info-light); color: #1e40af; border-left: 4px solid var(--info); }

.alert .close-alert {
    margin-left: auto;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: var(--transition);
}

.alert .close-alert:hover { opacity: 1; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Timer
   ============================================================ */
.timer-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius);
    background: var(--dark);
    color: #10b981;
}

.timer-display.running {
    animation: timerPulse 2s infinite;
}

.timer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: blink 1s infinite;
}

@keyframes timerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.timer-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-timer-start {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-timer-start:hover { background: #059669; }

.btn-timer-stop {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-timer-stop:hover { background: #dc2626; }

/* ============================================================
   Task cards (list view)
   ============================================================ */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.task-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.task-item .task-info {
    flex: 1;
    min-width: 0;
}

.task-item .task-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-item .task-title a {
    color: var(--primary);
    text-decoration: none;
}

.task-item .task-title a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.task-item .task-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--secondary);
}

.task-item .task-time {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.task-item .task-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.task-item .task-timer-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Reportée indicator */
.task-item.reported {
    border-left: 3px solid var(--warning);
}

/* ============================================================
   Modals
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header h3 { font-size: 1.1rem; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
    transition: var(--transition);
}

.modal-close:hover { color: var(--danger); }

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ============================================================
   Filters bar
   ============================================================ */
.filters-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 0;
}

.filters-bar .form-control {
    width: auto;
    min-width: 150px;
}

.filters-bar input[type="search"] {
    min-width: 200px;
}

/* ============================================================
   Month navigator
   ============================================================ */
.month-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.month-nav .month-label {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
}

.month-nav .btn {
    padding: 6px 12px;
}

/* ============================================================
   Client selector (admin)
   ============================================================ */
.client-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.client-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--dark);
    display: block;
}

.client-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--dark);
}

.client-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.client-card .client-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
}

.client-card .client-stats {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--secondary);
}

.client-card .mini-progress {
    height: 4px;
    background: var(--gray-light);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.client-card .mini-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ============================================================
   History timeline
   ============================================================ */
.timeline {
    position: relative;
    padding-left: 25px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 15px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--white);
}

.timeline-item .timeline-time {
    font-size: 0.75rem;
    color: var(--secondary);
}

.timeline-item .timeline-content {
    font-size: 0.85rem;
    margin-top: 2px;
}

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

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

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

.login-card .login-header .logo-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.login-card .login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.login-card .login-header p {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .form-control {
    padding: 12px 16px;
    font-size: 1rem;
}

.login-card .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    justify-content: center;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    transition: var(--transition);
    color: var(--dark);
}

.pagination a:hover { background: var(--primary-light); border-color: var(--primary); }
.pagination .active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* ============================================================
   Utility classes
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.d-flex { display: flex; }
.gap-2 { gap: 12px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ============================================================
   Print styles
   ============================================================ */
@media print {
    .sidebar, .topbar, .btn, .filters-bar, .modal-overlay, .task-actions, .timer-controls {
        display: none !important;
    }
    .main-content { margin-left: 0; }
    .page-content { padding: 0; }
    body { background: white; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .btn-menu-mobile {
        display: block;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 15px;
    }
    .topbar {
        padding: 10px 15px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .credit-counter .credit-values {
        flex-wrap: wrap;
        gap: 10px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .task-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .task-item .task-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filters-bar .form-control {
        width: 100%;
    }
    .client-selector {
        grid-template-columns: 1fr;
    }
    .month-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px;
    }
    .modal {
        width: 95%;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}
