/* ============================================================
   myDYCAST – Styles principaux
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary:       #4F46E5;
  --primary-dark:  #3730A3;
  --primary-light: #EEF2FF;
  --secondary:     #0EA5E9;
  --success:       #10B981;
  --warning:       #F59E0B;
  --danger:        #EF4444;
  --purple:        #8B5CF6;
  --pink:          #EC4899;
  --teal:          #14B8A6;
  --orange:        #F97316;

  --sidebar-w:     260px;
  --sidebar-bg:    #0F172A;
  --sidebar-text:  #94A3B8;
  --sidebar-hover: #1E293B;
  --sidebar-active:#4F46E5;

  --body-bg:       #F1F5F9;
  --card-bg:       #FFFFFF;
  --border:        #E2E8F0;
  --text:          #0F172A;
  --text-muted:    #64748B;
  --text-light:    #94A3B8;

  --topbar-h:      64px;
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
  --transition:    .2s ease;
}

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

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

img { max-width: 100%; display: block; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Layout Admin ───────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 16px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
}

.sidebar-logo-text span { color: var(--secondary); }

.sidebar-nav { padding: 16px 0; flex: 1; }

.sidebar-section {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  margin-top: 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
}

.sidebar-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-item.active {
  background: rgba(79,70,229,.2);
  color: #fff;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-item .icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: .8;
}

.sidebar-item.active .icon { opacity: 1; }

.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow);
}

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ── Timer Widget (topbar) ──────────────────────────────── */
.timer-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--body-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.timer-widget:hover { border-color: var(--primary); }

.timer-widget.running {
  background: var(--primary-light);
  border-color: var(--primary);
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79,70,229,.3); }
  50%       { box-shadow: 0 0 0 4px rgba(79,70,229,.1); }
}

.timer-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-light);
  flex-shrink: 0;
}

.timer-widget.running .timer-dot {
  background: var(--danger);
  animation: blink 1s infinite;
}

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

.timer-display {
  font-size: 13px;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  color: var(--text);
  min-width: 64px;
}

.timer-widget.running .timer-display { color: var(--primary); }

/* ── Notification Bell ──────────────────────────────────── */
.notif-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--body-bg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: background var(--transition);
}

.notif-btn:hover { background: var(--border); }

.notif-btn svg { width: 18px; height: 18px; color: var(--text-muted); }

.notif-count {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--card-bg);
}

/* ── User Menu ──────────────────────────────────────────── */
.user-menu { position: relative; }

.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.user-btn:hover { background: var(--body-bg); }

.user-btn .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.user-btn .chevron {
  width: 14px; height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.dropdown {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
  display: none;
}

.dropdown.open { display: block; animation: fadeDown .15s ease; }

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

.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}

.dropdown-item:hover { background: var(--body-bg); color: var(--text); }

.dropdown-item.danger:hover { background: #FEF2F2; color: var(--danger); }

.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Main Content ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.page-content {
  padding: 24px;
  flex: 1;
}

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

.page-header-left { display: flex; flex-direction: column; gap: 2px; }

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.5px;
}

.page-header .breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-light); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.card-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.card-body { padding: 20px; }

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

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: box-shadow var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); }

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

.stat-icon svg { width: 22px; height: 22px; }

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

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -1px;
}

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

.stat-change {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  display: flex; align-items: center; gap: 3px;
}

.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Grid ───────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Table ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  background: var(--body-bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:hover { background: #FAFBFC; }

tbody td {
  padding: 12px 14px;
  color: var(--text);
  vertical-align: middle;
}

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

.table-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-secondary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}
.btn-secondary:hover { background: #0284c7; color: #fff; }

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

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

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--body-bg); border-color: var(--text-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--body-bg); color: var(--text); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-icon { padding: 7px; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-blue   { background: #DBEAFE; color: #1D4ED8; }
.badge-green  { background: #D1FAE5; color: #065F46; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-yellow { background: #FEF3C7; color: #92400E; }
.badge-orange { background: #FFEDD5; color: #9A3412; }
.badge-purple { background: #EDE9FE; color: #5B21B6; }
.badge-indigo { background: #E0E7FF; color: #3730A3; }
.badge-teal   { background: #CCFBF1; color: #134E4A; }
.badge-pink   { background: #FCE7F3; color: #9D174D; }
.badge-slate  { background: #F1F5F9; color: #475569; }
.badge-gray   { background: #F3F4F6; color: #4B5563; }

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

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.form-label .req { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--card-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.form-control::placeholder { color: var(--text-light); }

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

select.form-control {
  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='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-check {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
}

.alert-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(.96);
  transition: transform var(--transition);
}

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

.modal-lg { max-width: 800px; }
.modal-sm { max-width: 400px; }

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

.modal-header h3 { font-size: 16px; font-weight: 600; color: var(--text); }

.modal-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--body-bg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition);
  font-size: 16px;
}

.modal-close:hover { background: var(--border); }

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

/* ── Avatar ─────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Progress ───────────────────────────────────────────── */
.progress-bar-wrap {
  height: 6px;
  background: var(--body-bg);
  border-radius: 3px;
  overflow: hidden;
  width: 100%;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s ease;
}

/* ── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 56px; height: 56px;
  color: var(--text-light);
  margin: 0 auto 16px;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state p { font-size: 13.5px; }

/* ── Search & Filters ───────────────────────────────────── */
.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.search-input {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.search-input svg {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-light);
  pointer-events: none;
}

.search-input input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.search-input input:focus { border-color: var(--primary); }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
  overflow-x: auto;
}

.tab {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color var(--transition);
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.pagination a, .pagination span {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.pagination a:hover { background: var(--body-bg); color: var(--text); border-color: var(--border); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Ticket Thread ──────────────────────────────────────── */
.message-thread { display: flex; flex-direction: column; gap: 16px; }

.message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.message.admin-msg { flex-direction: row-reverse; }

.message-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.7;
}

.message .message-bubble { background: var(--body-bg); border: 1px solid var(--border); border-radius: 2px 12px 12px 12px; }
.message.admin-msg .message-bubble { background: var(--primary-light); border: 1px solid rgba(79,70,229,.15); border-radius: 12px 2px 12px 12px; }
.message-bubble.internal { background: #FFFBEB; border-color: #FDE68A; }

.message-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex; gap: 6px; align-items: center;
}

/* ── Kanban ─────────────────────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
}

.kanban-col {
  min-width: 260px;
  width: 280px;
  flex-shrink: 0;
  background: var(--body-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
}

.kanban-col-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0;
}

.kanban-col[data-status="À faire"]    .kanban-col-header { border-top-color: var(--text-light); }
.kanban-col[data-status="En cours"]   .kanban-col-header { border-top-color: var(--secondary); }
.kanban-col[data-status="En revue"]   .kanban-col-header { border-top-color: var(--purple); }
.kanban-col[data-status="En attente"] .kanban-col-header { border-top-color: var(--warning); }
.kanban-col[data-status="Terminée"]   .kanban-col-header { border-top-color: var(--success); }
.kanban-col[data-status="Annulée"]    .kanban-col-header { border-top-color: var(--danger); }

.kanban-col-count {
  background: var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.kanban-col-body {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}

.kanban-col-body.drag-over { background: rgba(79,70,229,.05); border-radius: 0 0 var(--radius) var(--radius); }

.kanban-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.kanban-card.dragging {
  opacity: .5;
  cursor: grabbing;
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ── Activity Feed ──────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; }

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.activity-content { flex: 1; min-width: 0; }
.activity-title { font-size: 13.5px; font-weight: 500; color: var(--text); }
.activity-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Stars (satisfaction) ───────────────────────────────── */
.stars { display: flex; gap: 2px; }
.star { font-size: 16px; color: var(--text-light); cursor: pointer; transition: color var(--transition); }
.star.filled, .star:hover ~ .star-prev, .stars:hover .star { color: var(--warning); }
.star.filled { color: var(--warning); }

/* ── Toast ──────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}

.toast {
  background: var(--text);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  min-width: 280px;
  animation: slideInRight .2s ease;
  cursor: pointer;
}

.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); color: #fff; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Utilities ──────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.rounded { border-radius: var(--radius-sm); }
.rounded-full { border-radius: 50%; }

/* ── Login Page ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,.15), transparent 70%);
  top: -100px; right: -100px;
  border-radius: 50%;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(14,165,233,.1), transparent 70%);
  bottom: -50px; left: -50px;
  border-radius: 50%;
}

.login-card {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 80px rgba(0,0,0,.4);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 24px rgba(79,70,229,.4);
}

.login-logo h1 { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -1px; }
.login-logo p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }

  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .kanban-board { flex-direction: column; }
  .kanban-col { width: 100%; }
}

/* ── Notification Panel ─────────────────────────────────── */
.notif-panel {
  position: absolute;
  right: 0; top: calc(100% + 10px);
  width: 360px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: none;
  overflow: hidden;
}

.notif-panel.open { display: flex; flex-direction: column; animation: fadeDown .15s ease; }

.notif-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600;
}

.notif-list { max-height: 380px; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}

.notif-item:hover { background: var(--body-bg); }
.notif-item.unread { background: var(--primary-light); }
.notif-item.unread:hover { background: #e0e7ff; }

.notif-item-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 500; color: var(--text); }
.notif-item-msg { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.notif-item-time { font-size: 11px; color: var(--text-light); margin-top: 3px; }

.notif-panel-footer {
  padding: 10px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}

/* Timer Modal specifics */
.timer-modal-info {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.timer-modal-clock {
  font-size: 38px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--primary);
  letter-spacing: 2px;
}

.timer-modal-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
