/* Correction affichage calendrier */
.calendar-weekdays {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    margin-bottom: 4px !important;
    background: var(--black-light);
    border-radius: 8px;
    border: 1px solid var(--black-lighter);
}
.calendar-weekday {
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--gray) !important;
    padding: 10px 0 10px 0 !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid var(--black-lighter);
}
/* ==========================================
   KLEER APP — Complete Management System
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #0D0D0D;
    --black-light: #1a1a1a;
    --black-lighter: #252525;
    --white: #FAFAFA;
    --gray: #888;
    --gray-light: #aaa;
    --gray-dark: #444;
    --accent: #E8FF47;
    --accent-dim: rgba(232, 255, 71, 0.15);
    --danger: #ef4444;
    --danger-dim: rgba(239, 68, 68, 0.15);
    --success: #22c55e;
    --success-dim: rgba(34, 197, 94, 0.15);
    --warning: #f59e0b;
    --warning-dim: rgba(245, 158, 11, 0.15);
    --info: #3b82f6;
    --info-dim: rgba(59, 130, 246, 0.15);
    --font: 'Space Grotesk', sans-serif;
    --sidebar-width: 280px;
    --header-height: 70px;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-light: rgba(255, 255, 255, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--black);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Global SVG icon sizing */
svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ==========================================
   LOGIN SCREEN
   ========================================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--black);
}

.login-box {
    background: var(--black-light);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
}

.login-box h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.login-box > p {
    color: var(--gray);
    margin-bottom: 32px;
}

.login-box input {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--font);
    font-size: 15px;
    background: var(--black);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--white);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.login-box input:focus {
    outline: none;
    border-color: var(--accent);
}

.login-box input::placeholder {
    color: var(--gray);
}

.login-btn {
    width: 100%;
    padding: 16px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    background: var(--accent);
    color: var(--black);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(232, 255, 71, 0.2);
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    background: var(--danger-dim);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
}

.login-footer a {
    color: var(--gray);
    font-size: 14px;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: var(--accent);
}

/* ==========================================
   APP CONTAINER
   ========================================== */
.app-container {
    display: none;
    min-height: 100vh;
}

.app-container.active {
    display: flex;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--black-light);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 700;
}

.sidebar-badge {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 100px;
}

.sidebar-badge.client {
    background: var(--info-dim);
    color: var(--info);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    padding: 8px 12px;
    margin-bottom: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-light);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--black-lighter);
    color: var(--white);
}

.nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item .badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    background: var(--danger);
    color: var(--white);
    border-radius: 100px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 12px;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer .logout-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-footer .logout-btn svg {
    width: 18px;
    height: 18px;
}

.sidebar-footer .logout-btn:hover {
    background: var(--danger-dim);
    border-color: var(--danger);
    color: var(--danger);
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--black);
}

.page-header {
    padding: 32px 40px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
}

.page-subtitle {
    font-size: 14px;
    color: var(--gray);
    margin-top: 4px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

.page-content {
    padding: 32px 40px;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent);
    color: var(--black);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 255, 71, 0.25);
}

.btn-secondary {
    background: var(--black-lighter);
    color: var(--white);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--gray-dark);
}

.btn-danger {
    background: var(--danger-dim);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    justify-content: center;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
    background: var(--black-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

/* ==========================================
   STATS GRID
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--black-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 14px;
    color: var(--gray);
}

.stat-trend {
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.accent {
    background: var(--accent-dim);
    color: var(--accent);
}

.stat-icon.success {
    background: var(--success-dim);
    color: var(--success);
}

.stat-icon.warning {
    background: var(--warning-dim);
    color: var(--warning);
}

.stat-icon.info {
    background: var(--info-dim);
    color: var(--info);
}

/* ==========================================
   DATA TABLE
   ========================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
}

.data-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================
   STATUS BADGES
   ========================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 100px;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.new {
    background: var(--accent-dim);
    color: var(--accent);
}
.status-badge.new::before {
    background: var(--accent);
}

.status-badge.pending {
    background: var(--warning-dim);
    color: var(--warning);
}
.status-badge.pending::before {
    background: var(--warning);
}

.status-badge.progress {
    background: var(--info-dim);
    color: var(--info);
}
.status-badge.progress::before {
    background: var(--info);
}

.status-badge.completed {
    background: var(--success-dim);
    color: var(--success);
}
.status-badge.completed::before {
    background: var(--success);
}

.status-badge.cancelled {
    background: var(--danger-dim);
    color: var(--danger);
}
.status-badge.cancelled::before {
    background: var(--danger);
}

/* ==========================================
   PRIORITY BADGES
   ========================================== */
.priority-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
}

.priority-badge.high {
    background: var(--danger-dim);
    color: var(--danger);
}

.priority-badge.medium {
    background: var(--warning-dim);
    color: var(--warning);
}

.priority-badge.low {
    background: var(--success-dim);
    color: var(--success);
}

/* ==========================================
   FORMS
   ========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-light);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font);
    font-size: 15px;
    background: var(--black);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--white);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--gray);
}

.form-select {
    cursor: pointer;
    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='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--black-light);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
}

.modal-close {
    width: 40px;
    height: 40px;
    background: var(--black);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--white);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--danger-dim);
    border-color: var(--danger);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--black-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.warning {
    border-left: 3px solid var(--warning);
}

.toast.info {
    border-left: 3px solid var(--info);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 24px;
    height: 24px;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--gray);
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================
   EMPTY STATE
   ========================================== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--gray);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--white);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 300px;
    margin: 0 auto;
}

/* ==========================================
   LOADING
   ========================================== */
.loading {
    text-align: center;
    padding: 48px;
    color: var(--gray);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   TABS
   ========================================== */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--black);
    border-radius: 12px;
    margin-bottom: 24px;
}

.tab {
    padding: 10px 20px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab:hover {
    color: var(--white);
}

.tab.active {
    background: var(--black-lighter);
    color: var(--white);
}

/* ==========================================
   SEARCH
   ========================================== */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 18px 12px 44px;
    font-family: var(--font);
    font-size: 14px;
    background: var(--black);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--white);
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-box input::placeholder {
    color: var(--gray);
}

.search-box svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray);
}

/* ==========================================
   PROGRESS BAR
   ========================================== */
.progress-bar {
    height: 8px;
    background: var(--black);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 100px;
    transition: width 0.3s ease;
}

.progress-bar-fill.success {
    background: var(--success);
}

.progress-bar-fill.warning {
    background: var(--warning);
}

.progress-bar-fill.danger {
    background: var(--danger);
}

/* ==========================================
   TIMELINE
   ========================================== */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    position: relative;
}

.activity-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 48px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon svg {
    width: 16px;
    height: 16px;
}

.activity-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.activity-content p {
    font-size: 13px;
    color: var(--gray);
}

.activity-time {
    font-size: 12px;
    color: var(--gray);
    margin-top: 4px;
}

/* ==========================================
   AVATAR GROUP
   ========================================== */
.avatar-group {
    display: flex;
}

.avatar-group .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid var(--black-light);
    margin-left: -8px;
}

.avatar-group .avatar:first-child {
    margin-left: 0;
}

.avatar-group .avatar.more {
    background: var(--black-lighter);
    color: var(--gray);
}

/* ==========================================
   QUICK ACTIONS GRID
   ========================================== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.quick-action-card {
    background: var(--black-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.quick-action-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.quick-action-card svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
    margin-bottom: 12px;
}

.quick-action-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.quick-action-card p {
    font-size: 12px;
    color: var(--gray);
}

/* ==========================================
   MESSAGE THREAD
   ========================================== */
.message-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 16px;
    border-radius: 16px;
    background: var(--black);
    border: 1px solid var(--border-color);
}

.message.sent {
    align-self: flex-end;
    background: var(--accent-dim);
    border-color: transparent;
}

.message-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 6px;
}

.message-content {
    font-size: 14px;
    line-height: 1.6;
}

.message-time {
    font-size: 11px;
    color: var(--gray);
    margin-top: 8px;
}

.message-input-container {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--black-light);
}

.message-input-container input {
    flex: 1;
    padding: 14px 18px;
    font-family: var(--font);
    font-size: 14px;
    background: var(--black);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--white);
}

.message-input-container input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ==========================================
   FILE LIST
   ========================================== */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--black);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.file-item:hover {
    border-color: var(--border-color-light);
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon svg {
    width: 20px;
    height: 20px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 12px;
    color: var(--gray);
    margin-top: 2px;
}

.file-actions {
    display: flex;
    gap: 8px;
}

/* ==========================================
   CALENDAR
   ========================================== */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-title {
    font-size: 18px;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
}

.calendar-day {
    aspect-ratio: 1;
    padding: 8px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: var(--black-lighter);
}

.calendar-day.today {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

.calendar-day.has-event::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 4px;
}

.calendar-day.other-month {
    color: var(--gray-dark);
}

/* ==========================================
   KANBAN BOARD
   ========================================== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.kanban-column {
    background: var(--dark-gray);
    border-radius: 12px;
    padding: 16px;
    min-height: 400px;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.kanban-count {
    background: var(--black);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kanban-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--dark-gray);
}

.kanban-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.kanban-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

/* ==========================================
   TASKS
   ========================================== */
.tasks-container {
    display: grid;
    gap: 24px;
}

.task-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
}

.task-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
}

.task-section-title svg {
    width: 16px;
    height: 16px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--black);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-item:hover {
    background: var(--dark-gray);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-title {
    text-decoration: line-through;
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.task-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
    color: var(--black);
}

.task-checkbox svg {
    width: 14px;
    height: 14px;
}

.task-content {
    flex: 1;
}

.task-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.task-meta {
    font-size: 12px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-meta svg {
    width: 12px;
    height: 12px;
}

.task-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-item:hover .task-actions {
    opacity: 1;
}

/* ==========================================
   MESSAGES
   ========================================== */
.messages-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    height: calc(100vh - 200px);
}

.conversations-list {
    background: var(--card-bg);
    border-radius: 16px;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--dark-gray);
    transition: background 0.2s ease;
}

.conversation-item:hover {
    background: var(--dark-gray);
}

.conversation-item.unread {
    background: rgba(212, 255, 31, 0.05);
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.conversation-preview {
    font-size: 13px;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.conversation-time {
    font-size: 11px;
    color: var(--gray);
}

.unread-badge {
    background: var(--accent);
    color: var(--black);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.message-view {
    background: var(--card-bg);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--dark-gray);
}

.message-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
}

.message-bubble.incoming {
    background: var(--dark-gray);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-bubble.outgoing {
    background: var(--accent);
    color: var(--black);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-text {
    line-height: 1.5;
}

.message-time {
    font-size: 11px;
    color: var(--gray);
    margin-top: 4px;
}

.message-bubble.outgoing .message-time {
    color: rgba(0, 0, 0, 0.5);
}

.message-input {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--dark-gray);
}

.message-input input {
    flex: 1;
    background: var(--black);
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--white);
    font-size: 14px;
}

.message-input input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent);
}

/* ==========================================
   TIMELINE
   ========================================== */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--dark-gray);
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
}

.timeline-content h4 {
    margin: 0 0 4px;
}

/* ==========================================
   TOGGLE SWITCH
   ========================================== */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--dark-gray);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: var(--white);
    transition: 0.3s;
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background-color: var(--black);
}

/* ==========================================
   QUICK ACTIONS
   ========================================== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-action-card {
    background: var(--black);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.quick-action-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.quick-action-card svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
    margin-bottom: 8px;
}

.quick-action-card h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

/* ==========================================
   CLIENTS GRID
   ========================================== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.client-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.client-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .messages-container {
        grid-template-columns: 1fr;
    }
    
    .conversations-list {
        max-height: 300px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page-header {
        padding: 24px;
    }
    
    .page-content {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .login-box {
        padding: 32px 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
}
