/* ═══════════════════════════════════════════════════
   eCont-Digi — Contabilidade Digital
   Design System Premium
   ═══════════════════════════════════════════════════ */

:root {
  /* Brand */
  --primary: #0a2540;
  --primary-light: #112b45;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #0891b2;
  --info-light: #cffafe;

  /* Surfaces */
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #0a2540;
  --bg-sidebar-hover: #112b45;
  --bg-input: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #2563eb;

  /* Text */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-on-primary: #ffffff;
  --text-sidebar: #94a3b8;
  --text-sidebar-active: #ffffff;

  /* Spacing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

  /* Transitions */
  --transition: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ─── Reset ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; }

/* ─── LOGIN PAGE ───────────────────────────────── */
.login-page { background: var(--primary); min-height: 100vh; display: flex; align-items: center; justify-content: center; }

.login-wrapper { display: flex; width: 100%; max-width: 1200px; min-height: 600px; background: var(--bg-card); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-xl); margin: 1rem; }

.login-left { flex: 1; background: var(--primary); padding: 3rem; display: flex; flex-direction: column; color: white; position: relative; overflow: hidden; }
.login-left::before { content: ''; position: absolute; top: -50%; right: -50%; width: 100%; height: 100%; background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%); pointer-events: none; }

.login-brand { margin-bottom: 3rem; }
.logo-icon { margin-bottom: 1rem; }
.brand-name { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-accent { color: #60a5fa; }
.brand-tagline { font-size: 1.125rem; color: var(--text-sidebar); margin-top: 0.5rem; }

.login-features { display: flex; flex-direction: column; gap: 1.5rem; flex: 1; }
.feature-item { display: flex; align-items: center; gap: 1rem; }
.feature-icon { width: 48px; height: 48px; background: rgba(37,99,235,0.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.feature-text strong { display: block; font-size: 0.95rem; font-weight: 600; }
.feature-text span { display: block; font-size: 0.85rem; color: var(--text-sidebar); }

.login-footer-left { margin-top: auto; font-size: 0.8rem; color: var(--text-sidebar); }
.login-footer-left p { margin: 0.2rem 0; }

.login-right { flex: 1; padding: 3rem; display: flex; align-items: center; justify-content: center; }
.login-form-container { width: 100%; max-width: 380px; }
.login-form-container h2 { font-size: 1.75rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.login-subtitle { color: var(--text-secondary); margin-bottom: 2rem; }

.login-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.5rem; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 14px; color: var(--text-muted); pointer-events: none; }
.input-wrapper input { width: 100%; padding: 0.85rem 0.85rem 0.85rem 2.75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; background: var(--bg-input); transition: var(--transition); color: var(--text); }
.input-wrapper input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: white; }
.toggle-password { position: absolute; right: 12px; color: var(--text-muted); padding: 4px; }
.toggle-password:hover { color: var(--text-secondary); }

.btn-login { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.9rem; background: var(--accent); color: white; font-weight: 600; font-size: 1rem; border-radius: var(--radius-sm); border: none; transition: var(--transition); margin-top: 0.5rem; }
.btn-login:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-error { background: var(--danger-light); color: var(--danger); padding: 0.75rem 1rem; border-radius: var(--radius-xs); font-size: 0.85rem; margin-top: 0.5rem; border: 1px solid rgba(220,38,38,0.2); }

.login-demo-info { margin-top: 2rem; padding: 1.25rem; background: var(--bg-input); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.demo-title { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.75rem; }
.demo-credentials { display: flex; flex-direction: column; gap: 0.4rem; }
.demo-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; }
.demo-label { color: var(--text-muted); font-weight: 500; min-width: 70px; }
.demo-item code { background: var(--primary); color: var(--accent-light); padding: 2px 8px; border-radius: 4px; font-size: 0.78rem; }

/* ─── APP LAYOUT ──────────────────────────────── */
.app-page { background: var(--bg); }
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: var(--sidebar-width); background: var(--bg-sidebar); color: var(--text-sidebar); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; transition: width var(--transition-slow), transform var(--transition-slow); }
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .sidebar-brand, .sidebar.collapsed .nav-label, .sidebar.collapsed .nav-badge, .sidebar.collapsed .user-info, .sidebar.collapsed .btn-logout span { display: none; }
.sidebar.collapsed .sidebar-logo { justify-content: center; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0.75rem; }
.sidebar.collapsed .nav-icon { margin-right: 0; }
.sidebar.collapsed .user-card { justify-content: center; padding: 0.75rem; }
.sidebar.collapsed .sidebar-footer { flex-direction: column; align-items: center; }
.sidebar.collapsed .btn-logout { justify-content: center; padding: 0.75rem; }

.sidebar-header { padding: 1.25rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar-logo { display: flex; align-items: center; gap: 0.75rem; }
.sidebar-brand { font-size: 1.25rem; font-weight: 800; color: white; letter-spacing: -0.02em; }
.sidebar-brand .accent { color: #60a5fa; }
.sidebar-toggle { color: var(--text-sidebar); padding: 6px; border-radius: 6px; transition: var(--transition); }
.sidebar-toggle:hover { background: var(--bg-sidebar-hover); color: white; }

.sidebar-nav { flex: 1; padding: 0.75rem 0.5rem; overflow-y: auto; }
.nav-section { margin-bottom: 0.25rem; }
.nav-section-title { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding: 0.75rem 0.75rem 0.4rem; }
.nav-item { display: flex; align-items: center; gap: 0; padding: 0.65rem 0.75rem; border-radius: var(--radius-xs); color: var(--text-sidebar); font-size: 0.9rem; font-weight: 500; transition: var(--transition); cursor: pointer; position: relative; margin-bottom: 2px; }
.nav-item:hover { background: var(--bg-sidebar-hover); color: white; }
.nav-item.active { background: var(--accent); color: white; box-shadow: 0 2px 8px rgba(37,99,235,0.3); }
.nav-icon { width: 20px; height: 20px; margin-right: 12px; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-badge { background: var(--danger); color: white; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; line-height: 1.4; }

.sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; gap: 0.5rem; }
.user-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border-radius: var(--radius-xs); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.user-name { font-size: 0.85rem; font-weight: 600; color: white; display: block; }
.user-role { font-size: 0.75rem; color: var(--text-muted); display: block; }
.btn-logout { display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0.75rem; border-radius: var(--radius-xs); color: var(--text-muted); font-size: 0.85rem; transition: var(--transition); width: 100%; }
.btn-logout:hover { background: rgba(239,68,68,0.15); color: #f87171; }

/* Main Content */
.main-content { flex: 1; margin-left: var(--sidebar-width); transition: margin-left var(--transition-slow); min-height: 100vh; display: flex; flex-direction: column; }
.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }

.topbar { height: var(--topbar-height); background: white; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 1.5rem; position: sticky; top: 0; z-index: 50; gap: 1rem; }
.mobile-menu-btn { display: none; color: var(--text-secondary); padding: 6px; }
.topbar-title { font-size: 1.25rem; font-weight: 700; color: var(--text); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.notification-bell { position: relative; padding: 8px; border-radius: 50%; cursor: pointer; color: var(--text-secondary); transition: var(--transition); }
.notification-bell:hover { background: var(--bg-input); color: var(--text); }
.notif-badge { position: absolute; top: 2px; right: 2px; background: var(--danger); color: white; font-size: 0.65rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.notif-dropdown { position: absolute; top: 100%; right: 0; width: 360px; background: white; border-radius: var(--radius); box-shadow: var(--shadow-xl); border: 1px solid var(--border); z-index: 200; overflow: hidden; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); }
.notif-header span { font-weight: 600; font-size: 0.9rem; }
.notif-header button { font-size: 0.75rem; color: var(--accent); font-weight: 500; }
.notif-header button:hover { text-decoration: underline; }
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); display: flex; gap: 0.75rem; cursor: pointer; transition: var(--transition); }
.notif-item:hover { background: var(--bg-input); }
.notif-item.unread { background: var(--accent-light); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.notif-dot.info { background: var(--info); }
.notif-dot.alerta { background: var(--warning); }
.notif-dot.sucesso { background: var(--success); }
.notif-dot.erro { background: var(--danger); }
.notif-content { flex: 1; }
.notif-title { font-size: 0.85rem; font-weight: 600; }
.notif-msg { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.notif-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

.content-area { padding: 1.5rem; flex: 1; }

/* ─── CARDS & COMPONENTS ─────────────────────── */
.card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.5rem; transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-md); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title { font-size: 1rem; font-weight: 700; color: var(--text); }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.25rem; display: flex; align-items: flex-start; gap: 1rem; transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.stat-icon.blue { background: var(--accent-light); color: var(--accent); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.yellow { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan { background: var(--info-light); color: var(--info); }
.stat-info { flex: 1; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.stat-trend { font-size: 0.75rem; font-weight: 600; margin-top: 4px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* Tables */
.table-container { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); }
data-table { width: 100%; border-collapse: collapse; }
table { width: 100%; border-collapse: collapse; }
th { padding: 0.85rem 1rem; text-align: left; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg-input); }
td { padding: 0.85rem 1rem; font-size: 0.9rem; border-bottom: 1px solid var(--border); color: var(--text); }
tr:hover td { background: rgba(37,99,235,0.03); }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px; font-size: 0.75rem; font-weight: 600; gap: 4px; }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-neutral { background: var(--bg-input); color: var(--text-secondary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 1.2rem; border-radius: var(--radius-xs); font-size: 0.85rem; font-weight: 600; transition: var(--transition); border: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-success { background: var(--success-light); color: var(--success); }
.btn-success:hover { background: var(--success); color: white; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.78rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadeIn 0.2s; }
.modal { background: white; border-radius: var(--radius); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); animation: slideUp 0.3s; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close { color: var(--text-muted); padding: 6px; border-radius: 6px; transition: var(--transition); }
.modal-close:hover { background: var(--bg-input); color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; padding: 1rem 1.5rem; border-top: 1px solid var(--border); }

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

/* Form inside modal */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-row.full { grid-template-columns: 1fr; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.form-field input, .form-field select, .form-field textarea { padding: 0.65rem 0.85rem; border: 1.5px solid var(--border); border-radius: var(--radius-xs); font-size: 0.9rem; background: var(--bg-input); transition: var(--transition); color: var(--text); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: white; }
.form-field textarea { resize: vertical; min-height: 80px; }
.form-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 2.5rem; }

/* Chat */
.chat-container { display: flex; gap: 1rem; height: calc(100vh - var(--topbar-height) - 3rem); }
.chat-contacts { width: 280px; background: white; border-radius: var(--radius); border: 1px solid var(--border); overflow-y: auto; flex-shrink: 0; }
.chat-contacts-header { padding: 1rem; font-weight: 700; font-size: 0.95rem; border-bottom: 1px solid var(--border); }
.chat-contact-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; cursor: pointer; transition: var(--transition); border-bottom: 1px solid var(--border); }
.chat-contact-item:hover { background: var(--bg-input); }
.chat-contact-item.active { background: var(--accent-light); }
.contact-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; color: white; font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-preview { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-unread { background: var(--accent); color: white; font-size: 0.7rem; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

.chat-main { flex: 1; background: white; border-radius: var(--radius); border: 1px solid var(--border); display: flex; flex-direction: column; }
.chat-header-bar { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; align-items: center; gap: 0.75rem; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-bubble { max-width: 75%; padding: 0.65rem 1rem; border-radius: 16px; font-size: 0.9rem; line-height: 1.5; }
.chat-bubble.sent { align-self: flex-end; background: var(--accent); color: white; border-bottom-right-radius: 4px; }
.chat-bubble.received { align-self: flex-start; background: var(--bg-input); color: var(--text); border-bottom-left-radius: 4px; }
.chat-bubble-time { font-size: 0.7rem; opacity: 0.7; margin-top: 4px; }
.chat-bubble.sent .chat-bubble-time { text-align: right; }

.chat-input-area { padding: 0.85rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; }
.chat-input { flex: 1; padding: 0.65rem 1rem; border: 1.5px solid var(--border); border-radius: 100px; font-size: 0.9rem; outline: none; transition: var(--transition); }
.chat-input:focus { border-color: var(--accent); }
.chat-send { width: 40px; height: 40px; background: var(--accent); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: var(--transition); border: none; cursor: pointer; }
.chat-send:hover { background: var(--accent-hover); }
.chat-placeholder { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.95rem; }

/* Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; color: var(--text-muted); text-align: center; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-text { font-size: 1rem; margin-bottom: 0.5rem; }
.empty-sub { font-size: 0.85rem; }

/* Loading */
.loading-container { display: flex; align-items: center; justify-content: center; padding: 3rem; }
.loading-spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Toast */
.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; padding: 0.85rem 1.5rem; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 999; animation: slideUp 0.3s; display: flex; align-items: center; gap: 0.75rem; }
.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
.toast-info { background: var(--accent); color: white; }

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1024px) {
  .login-wrapper { flex-direction: column; max-width: 500px; }
  .login-left { padding: 2rem; }
  .login-features { display: none; }
  .login-footer-left { display: none; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; display: none; }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0 !important; }
  .mobile-menu-btn { display: block; }
  .topbar { padding: 0 1rem; }
  .content-area { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .chat-container { flex-direction: column; height: auto; }
  .chat-contacts { width: 100%; max-height: 200px; }
  .notif-dropdown { width: 300px; right: -50px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-right { padding: 2rem 1.5rem; }
}
