/* ============================================================
   SISTEMA DE GESTIÓN DE SECCIÓN — main.css
   ============================================================ */

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

/* ============================================================
   CSS CUSTOM PROPERTIES — LIGHT THEME (default)
   ============================================================ */
:root {
  --bg:             #F0F2F5;
  --surface:        #FFFFFF;
  --surface-2:      #E8EFF8;
  --border:         #D0D8E4;
  --border-2:       #C8D0DA;
  --text:           #1A1A2E;
  --text-2:         #4A5568;
  --text-3:         #718096;
  --primary:        #002D62;
  --primary-hover:  #0A4A8F;
  --primary-light:  #E8EFF8;
  --danger:         #AD1519;
  --danger-hover:   #931013;
  --danger-light:   rgba(173,21,25,0.06);
  --success:        #1A7A3A;
  --success-light:  rgba(26,122,58,0.06);
  --warning:        #FFDB00;
  --warning-light:  rgba(255,219,0,0.08);
  --purple:         #8B5CF6;
  --purple-light:   #F5F3FF;

  /* priority colors */
  --prio-alta:      #AD1519;
  --prio-normal:    #0A4A8F;
  --prio-baja:      #1A7A3A;

  /* status colors */
  --st-pendiente:   #FFDB00;
  --st-encurso:     #0A4A8F;
  --st-completada:  #1A7A3A;
  --st-programada:  #8B5CF6;

  /* layout */
  --sidebar-w:      260px;
  --navbar-h:       64px;
  --radius:         0px;
  --radius-sm:      0px;
  --radius-lg:      0px;
  --radius-xl:      0px;
  --shadow:         0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg:      0 4px 16px rgba(0,0,0,0.12);
  --shadow-xl:      0 8px 32px rgba(0,0,0,0.2);
  --glass-bg:       #002D62;
  --glass-border:   rgba(255,255,255,0.15);
  --glass-blur:     none;

  /* transitions */
  --t-fast:   0.15s ease;
  --t-normal: 0.25s ease;
  --t-slow:   0.4s cubic-bezier(0.34,1.56,0.64,1);

  --font: 'Cabin', sans-serif;
}

/* ============================================================
   DARK THEME
   ============================================================ */
[data-theme="dark"] {
  --bg:             #F0F2F5;
  --surface:        #FFFFFF;
  --surface-2:      #E8EFF8;
  --border:         #D0D8E4;
  --border-2:       #C8D0DA;
  --text:           #1A1A2E;
  --text-2:         #4A5568;
  --text-3:         #718096;
  --primary:        #002D62;
  --primary-hover:  #0A4A8F;
  --primary-light:  #E8EFF8;
  --danger:         #AD1519;
  --danger-hover:   #931013;
  --danger-light:   rgba(173,21,25,0.06);
  --success:        #1A7A3A;
  --success-light:  rgba(26,122,58,0.06);
  --warning:        #FFDB00;
  --warning-light:  rgba(255,219,0,0.08);
  --purple:         #8B5CF6;
  --purple-light:   #F5F3FF;

  --shadow:         0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg:      0 4px 16px rgba(0,0,0,0.12);
  --shadow-xl:      0 8px 32px rgba(0,0,0,0.2);
  --glass-bg:       #002D62;
  --glass-border:   rgba(255,255,255,0.15);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--t-normal), color var(--t-normal);
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

ul, ol { list-style: none; }

h1,h2,h3,h4,h5,h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

p { color: var(--text-2); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding-top: var(--navbar-h);
  min-height: 100vh;
  transition: margin-left var(--t-normal);
}

.page-content {
  padding: 28px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--primary);
  border-right: 3px solid var(--warning);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--t-normal), background var(--t-normal);
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar-icon svg { width: 22px; height: 22px; color: #fff; }

.sidebar-title {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--warning);
  line-height: 1.2;
}

.sidebar-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  margin-top: 2px;
}

.sidebar-section-name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--warning);
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  overflow-y: auto;
}

.nav-group-label {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 16px 8px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-family: 'Cabin Condensed', sans-serif;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 2px;
  position: relative;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.nav-item.active {
  background: rgba(255,219,0,0.1);
  color: var(--warning);
  font-weight: 700;
}

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

.nav-item svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: color var(--t-fast);
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.4;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast);
}

.sidebar-user:hover { background: var(--primary-light); }

.sidebar-user-info { flex: 1; overflow: hidden; }

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-3);
  text-transform: capitalize;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  height: var(--navbar-h);
  background: var(--primary);
  border-bottom: 3px solid var(--warning);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 90;
  gap: 12px;
  transition: left var(--t-normal), background var(--t-normal);
}

.navbar-title {
  flex: 1;
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #fff;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-btn {
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: all var(--t-fast);
  color: rgba(255,255,255,0.8);
}

.navbar-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

.navbar-btn svg { width: 18px; height: 18px; }

/* Notification badge on bell */
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 18px; height: 18px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
  line-height: 1;
  animation: pulse 2s infinite;
}

.notif-badge.hidden { display: none; }

/* hamburger */
.hamburger-btn {
  display: none;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--warning);
  cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--warning);
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.hamburger-btn:hover {
  background: rgba(255, 219, 0, 0.1);
  color: #fff;
  border-color: #fff;
}

.hamburger-btn svg { width: 20px; height: 20px; }

/* User avatar button */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  cursor: pointer;
  transition: all var(--t-fast);
}

.user-menu-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

.user-menu-name {
  font-family: 'Cabin Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}

/* ============================================================
   DROPDOWN MENUS
   ============================================================ */
.dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  animation: fadeInDown 0.15s ease;
  display: none;
}

.dropdown-menu.open { display: block; }

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t-fast);
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-item svg { width: 16px; height: 16px; }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Notification dropdown */
.notif-dropdown {
  min-width: 320px;
  max-height: 400px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
}

.notif-item:hover { background: var(--surface-2); }
.notif-item:last-child { border-bottom: none; }

.notif-item.unread { background: var(--primary-light); }

.notif-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.notif-item-meta {
  font-size: 11px;
  color: var(--text-3);
}

.notif-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  user-select: none;
  text-transform: uppercase;
}

.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-xl { width: 64px; height: 64px; font-size: 22px; }

/* Avatar color palette */
.avatar-0  { background: linear-gradient(135deg,#3B82F6,#1D4ED8); }
.avatar-1  { background: linear-gradient(135deg,#8B5CF6,#6D28D9); }
.avatar-2  { background: linear-gradient(135deg,#EC4899,#BE185D); }
.avatar-3  { background: linear-gradient(135deg,#F59E0B,#D97706); }
.avatar-4  { background: linear-gradient(135deg,#10B981,#047857); }
.avatar-5  { background: linear-gradient(135deg,#EF4444,#B91C1C); }
.avatar-6  { background: linear-gradient(135deg,#06B6D4,#0E7490); }
.avatar-7  { background: linear-gradient(135deg,#84CC16,#4D7C0F); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--t-fast), transform var(--t-fast), background var(--t-normal);
}

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

.card-sm { padding: 16px; }
.card-lg { padding: 32px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  display: none;
}

.stat-card.blue   { border-left-color: var(--primary); }
.stat-card.amber  { border-left-color: var(--warning); }
.stat-card.green  { border-left-color: var(--success); }
.stat-card.red    { border-left-color: var(--danger); }
.stat-card.purple { border-left-color: var(--purple); }

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

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.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-icon.blue   { background: var(--primary-light); color: var(--primary); }
.stat-icon.amber  { background: var(--warning-light); color: var(--warning); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.red    { background: var(--danger-light);  color: var(--danger); }
.stat-icon.purple { background: var(--purple-light);  color: var(--purple); }

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

.stat-label {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}

.stat-change {
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--t-fast);
  white-space: nowrap;
  user-select: none;
  line-height: 1.4;
  text-decoration: none;
}

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

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.35);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,0.45); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,0.35);
}
.btn-danger:hover { background: var(--danger-hover); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); }

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34,197,94,0.35);
}
.btn-success:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-warning {
  background: var(--warning);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245,158,11,0.35);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Button with spinner */
.btn .spinner-sm {
  width: 14px; height: 14px;
  border-width: 2px;
}

/* ============================================================
   BADGES / CHIPS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Priority badges */
.badge-alta     { background: rgba(239,68,68,0.15);  color: #EF4444; }
.badge-normal   { background: rgba(59,130,246,0.15); color: #3B82F6; }
.badge-baja     { background: rgba(34,197,94,0.15);  color: #22C55E; }

/* Status badges */
.badge-pendiente  { background: rgba(245,158,11,0.15); color: #F59E0B; }
.badge-en_curso   { background: rgba(59,130,246,0.15); color: #3B82F6; }
.badge-completada { background: rgba(34,197,94,0.15);  color: #22C55E; }
.badge-programada { background: rgba(139,92,246,0.15); color: #8B5CF6; }

/* Role badges */
.badge-admin    { background: var(--purple-light);   color: var(--purple); }
.badge-usuario  { background: var(--primary-light);  color: var(--primary); }

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

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

.form-label.required::after {
  content: ' *';
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  transition: all var(--t-fast);
  outline: none;
  line-height: 1.5;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

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

.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}

.form-control.error { border-color: var(--danger); }
.form-control.error + .form-error { display: block; }

.form-hint {
  font-size: 12px;
  color: var(--text-3);
  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;
}

/* File upload */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
}

.file-upload:hover, .file-upload.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%; height: 100%;
}

.file-upload-icon { color: var(--text-3); margin-bottom: 8px; }
.file-upload-icon svg { width: 32px; height: 32px; }
.file-upload-text { font-size: 13px; color: var(--text-2); }
.file-upload-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* Search input */
.search-input-wrapper {
  position: relative;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search-input-wrapper .search-icon svg { width: 16px; height: 16px; }

.search-input-wrapper .form-control {
  padding-left: 40px;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.closing {
  animation: fadeOut 0.2s ease forwards;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.modal.closing {
  animation: slideDown 0.2s ease forwards;
}

.modal-sm  { max-width: 400px; }
.modal-lg  { max-width: 760px; }
.modal-xl  { max-width: 960px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

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

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: all var(--t-fast);
}

.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background: var(--surface-2);
}

/* ============================================================
   KANBAN
   ============================================================ */
.kanban-wrapper {
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-board {
  display: flex;
  gap: 16px;
  min-width: max-content;
  align-items: flex-start;
}

.kanban-column {
  width: 300px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.kanban-col-header {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-top: none;
  border-left: 4px solid transparent;
}

.kanban-col-header.pendiente  { border-left-color: var(--st-pendiente); }
.kanban-col-header.en_curso   { border-left-color: var(--st-encurso); }
.kanban-col-header.completada { border-left-color: var(--st-completada); }
.kanban-col-header.programada { border-left-color: var(--st-programada); }

.kanban-col-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.kanban-count {
  background: var(--border);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.kanban-cards {
  padding: 12px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background var(--t-fast);
}

.kanban-cards.drag-over {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: grab;
  transition: all var(--t-fast);
  box-shadow: var(--shadow);
  position: relative;
}

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

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

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

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

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-card-category {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.kanban-card-date {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 3px;
}

.kanban-card-date.overdue { color: var(--danger); font-weight: 600; }
.kanban-card-date svg { width: 12px; height: 12px; }

.kanban-add-btn {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 12px 12px;
  width: calc(100% - 24px);
  transition: all var(--t-fast);
}

.kanban-add-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================================
   TASK DETAIL — sections inside modal
   ============================================================ */
.detail-section {
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-meta-item {}
.detail-meta-label {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-meta-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

/* Subtasks */
.subtask-list { display: flex; flex-direction: column; gap: 6px; }

.subtask-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--t-fast);
}

.subtask-item:hover { background: var(--primary-light); }

.subtask-item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.subtask-item label {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.subtask-item input[type="checkbox"]:checked + label {
  text-decoration: line-through;
  color: var(--text-3);
}

.subtask-delete {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  transition: color var(--t-fast);
}

.subtask-delete:hover { color: var(--danger); }
.subtask-delete svg { width: 14px; height: 14px; }

/* Notes/actuaciones */
.notes-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

.note-item {
  display: flex;
  gap: 12px;
}

.note-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.note-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 4px;
}

.note-line-bar {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
  min-height: 20px;
}

.note-content {
  flex: 1;
  padding-bottom: 12px;
}

.note-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.note-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.note-time {
  font-size: 11px;
  color: var(--text-3);
}

.note-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* Attachments */
.attachments-list { display: flex; flex-direction: column; gap: 6px; }

.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--t-fast);
}

.attachment-item:hover { background: var(--primary-light); }

.attachment-icon { color: var(--primary); }
.attachment-icon svg { width: 18px; height: 18px; }

.attachment-name {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-size { font-size: 11px; color: var(--text-3); }

.attachment-download {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  transition: color var(--t-fast);
}

.attachment-download:hover { color: var(--primary-hover); }
.attachment-download svg { width: 14px; height: 14px; }

/* ============================================================
   CALENDAR
   ============================================================ */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.calendar-month-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-transform: capitalize;
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 4px;
}

.calendar-day-label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  padding: 8px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 100px;
  padding: 6px;
  transition: background var(--t-fast);
  position: relative;
  overflow: hidden;
}

.calendar-cell:hover { background: var(--surface-2); }

.calendar-cell.other-month { opacity: 0.4; }

.calendar-cell.today {
  border-color: var(--primary);
  background: var(--primary-light);
}

.calendar-day-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
}

.calendar-cell.today .calendar-day-num {
  background: var(--primary);
  color: #fff;
}

.calendar-task-chip {
  display: block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
}

.calendar-task-chip:hover { filter: brightness(1.15); }

.calendar-task-chip.alta     { background: rgba(239,68,68,0.2);  color: #EF4444; }
.calendar-task-chip.normal   { background: rgba(59,130,246,0.2); color: #3B82F6; }
.calendar-task-chip.baja     { background: rgba(34,197,94,0.2);  color: #22C55E; }

.calendar-more {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 600;
  cursor: pointer;
}

/* Calendar tooltip */
.cal-tooltip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  pointer-events: none;
  white-space: nowrap;
  min-width: 140px;
}

/* Upcoming tasks sidebar */
.upcoming-list { display: flex; flex-direction: column; gap: 8px; }

.upcoming-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border);
  transition: all var(--t-fast);
  cursor: pointer;
}

.upcoming-item:hover { transform: translateX(4px); border-left-color: var(--primary); }
.upcoming-item.alta  { border-left-color: var(--prio-alta); }
.upcoming-item.normal { border-left-color: var(--prio-normal); }
.upcoming-item.baja  { border-left-color: var(--prio-baja); }

.upcoming-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.upcoming-date { font-size: 11px; color: var(--text-3); }

/* ============================================================
   ACTIVITY FEED (Historial)
   ============================================================ */
.activity-feed { position: relative; padding-left: 24px; }

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

.activity-entry {
  position: relative;
  margin-bottom: 24px;
  animation: fadeIn 0.4s ease;
}

.activity-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary);
}

.activity-dot.success { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.activity-dot.danger  { background: var(--danger);  box-shadow: 0 0 0 2px var(--danger); }
.activity-dot.warning { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.activity-dot.purple  { background: var(--purple);  box-shadow: 0 0 0 2px var(--purple); }

.activity-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.activity-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.activity-text strong { color: var(--primary); }

.activity-task-link {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.activity-time {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.activity-time svg { width: 12px; height: 12px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

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

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--t-fast);
}

thead th:hover { color: var(--primary); }

thead th.sort-asc::after  { content: ' ↑'; color: var(--primary); }
thead th.sort-desc::after { content: ' ↓'; color: var(--primary); }

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

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

tbody tr:hover { background: var(--surface-2); }

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

tbody td:first-child { color: var(--text-3); font-weight: 600; }

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

.table-action-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: all var(--t-fast);
}

.table-action-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.table-action-btn.danger:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }
.table-action-btn svg { width: 14px; height: 14px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-3);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  min-width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
  padding: 0 8px;
}

.page-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn svg { width: 16px; height: 16px; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.filter-bar .form-control {
  width: auto;
  min-width: 140px;
}

.filter-bar .search-input-wrapper {
  flex: 1;
  min-width: 200px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  animation: slideInRight 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
}

.toast.toast-success::before { background: var(--success); }
.toast.toast-error::before   { background: var(--danger); }
.toast.toast-warning::before { background: var(--warning); }
.toast.toast-info::before    { background: var(--primary); }

.toast-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 1px;
}

.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-error   .toast-icon { color: var(--danger); }
.toast.toast-warning .toast-icon { color: var(--warning); }
.toast.toast-info    .toast-icon { color: var(--primary); }

.toast-icon svg { width: 20px; height: 20px; }

.toast-body { flex: 1; }

.toast-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.toast-message {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color var(--t-fast);
}

.toast-close:hover { color: var(--text); }
.toast-close svg { width: 16px; height: 16px; }

.toast.dismissing { animation: slideOutRight 0.25s ease forwards; }

/* Toast progress bar */
.toast-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--border-2);
  transition: width linear;
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--bg), 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 14px;
  flex-direction: column;
  color: var(--text-3);
  font-size: 14px;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--primary); }

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

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header-left {}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   SECTION DIVIDERS
   ============================================================ */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title svg { width: 18px; height: 18px; color: var(--primary); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}

.empty-state svg {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

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

.empty-state-text {
  font-size: 13px;
  color: var(--text-3);
}

/* ============================================================
   TASK CARD (list view)
   ============================================================ */
.task-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
  cursor: pointer;
  border-left: 3px solid transparent;
}

.task-card:hover {
  border-color: var(--border-2);
  border-left-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

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

.task-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.task-card-date {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 3px;
}

.task-card-date.overdue { color: var(--danger); }
.task-card-date svg { width: 12px; height: 12px; }

/* ============================================================
   CONFIRMATION DIALOG
   ============================================================ */
.confirm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

.confirm-icon.danger {
  background: var(--danger-light);
  color: var(--danger);
}

.confirm-icon svg { width: 28px; height: 28px; }

.confirm-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.confirm-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
}

/* ============================================================
   ADMIN — Chart containers
   ============================================================ */
.chart-container {
  position: relative;
  width: 100%;
}

.chart-container canvas {
  max-width: 100%;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #0F172A;
}

/* animated mesh background */
.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.login-bg::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  top: -200px; left: -200px;
  background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
  animation: floatOrb 8s ease-in-out infinite;
}

.login-bg::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  bottom: -150px; right: -150px;
  background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 70%);
  animation: floatOrb 10s ease-in-out infinite reverse;
}

.login-bg-orb {
  position: absolute;
  width: 400px; height: 400px;
  top: 50%; left: 60%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  animation: floatOrb 12s ease-in-out infinite 2s;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: rgba(30,41,59,0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(51,65,85,0.8);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: slideUp 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

.login-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #2563EB, #1e40af);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 32px rgba(37,99,235,0.5);
  animation: pulse 3s ease-in-out infinite;
}

.login-logo svg { width: 34px; height: 34px; color: #fff; }

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #F1F5F9;
  text-align: center;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13px;
  color: #94A3B8;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.5;
}

.login-error {
  display: none;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #FCA5A5;
  margin-bottom: 16px;
  text-align: center;
}

.login-error.visible { display: block; animation: shake 0.4s ease; }

.login-page .form-label { color: #94A3B8; }

.login-page .form-control {
  background: rgba(15,23,42,0.6);
  border-color: #334155;
  color: #F1F5F9;
}

.login-page .form-control:focus {
  border-color: #3B82F6;
  background: rgba(15,23,42,0.8);
}

.login-page .form-control::placeholder { color: #64748B; }

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(37,99,235,0.4);
}

.login-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(37,99,235,0.5); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: #475569;
}

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

/* ============================================================
   CALENDAR + SIDEBAR LAYOUT
   ============================================================ */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

/* ============================================================
   DRAG & DROP GHOST
   ============================================================ */
.drag-ghost {
  opacity: 0 !important;
}

/* ============================================================
   INLINE EDIT
   ============================================================ */
.inline-edit-input {
  background: var(--surface-2);
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: inherit;
  color: var(--text);
  font-family: var(--font);
  font-weight: inherit;
  width: 100%;
  outline: none;
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }
.gap-20      { gap: 20px; }
.mb-8        { margin-bottom: 8px; }
.mb-12       { margin-bottom: 12px; }
.mb-16       { margin-bottom: 16px; }
.mb-20       { margin-bottom: 20px; }
.mb-24       { margin-bottom: 24px; }
.mb-28       { margin-bottom: 28px; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mt-20       { margin-top: 20px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 12px; }
.text-muted  { color: var(--text-3); }
.font-bold   { font-weight: 700; }
.font-semibold { font-weight: 600; }
.w-full      { width: 100%; }
.truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden      { display: none !important; }
.invisible   { visibility: hidden; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Tag strip */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

/* Status indicator dot */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.active { background: var(--success); box-shadow: 0 0 0 2px var(--success-light); }
.status-dot.inactive { background: var(--text-3); }

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-2);
  border-radius: 999px;
  transition: background var(--t-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--t-fast);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

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

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

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(59,130,246,0); }
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

@keyframes urgentGlowPulse {
  0%, 100% {
    box-shadow: 0 0 4px rgba(173, 21, 25, 0.4);
    border-color: var(--danger);
  }
  50% {
    box-shadow: 0 0 16px rgba(173, 21, 25, 0.8), inset 0 0 8px rgba(173, 21, 25, 0.15);
    border-color: #EF4444;
  }
}

.urgent-glow {
  animation: urgentGlowPulse 2s infinite ease-in-out !important;
  border-left: 5px solid var(--danger) !important;
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--border-2) 50%, var(--border) 75%);
  background-size: 200% auto;
  animation: shimmer 1.4s linear infinite;
  border-radius: 4px;
}

/* ============================================================
   SIDEBAR OVERLAY (mobile)
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.visible { display: block; animation: fadeIn 0.2s ease; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .calendar-layout { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .main-content { margin-left: 0; }

  .navbar { left: 0; }

  .hamburger-btn { display: flex; }

  .kanban-board { padding-bottom: 16px; }

  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }

  .page-content { padding: 16px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .stat-cards { grid-template-columns: 1fr; }

  .modal { max-height: 100vh; border-radius: var(--radius); }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .form-control { min-width: auto; width: 100%; }
  .filter-bar .search-input-wrapper { min-width: auto; }

  .page-title { font-size: 20px; }

  .pagination { justify-content: center; }
  .pagination-info { width: 100%; text-align: center; }

  #toast-container { left: 16px; right: 16px; }
  .toast { min-width: auto; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .sidebar, .navbar, #toast-container, .modal-overlay { display: none !important; }
  .main-content { margin-left: 0; padding-top: 0; }
}

/* ============================================================
   SUPPLEMENTARY — Aliases & missing classes
   ============================================================ */

/* Alias: .stats-grid → same as .stat-cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 1024px) { .stats-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px)  { .stats-grid { grid-template-columns: 1fr; } }

/* Alias: .kanban-col → .kanban-column */
.kanban-col { flex: 1; min-width: 260px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--radius); }

/* Kanban colour borders (header) */
.kanban-col-pendiente  { border-left: 4px solid var(--st-pendiente); border-top: none !important; }
.kanban-col-en_curso   { border-left: 4px solid var(--st-encurso); border-top: none !important; }
.kanban-col-completada { border-left: 4px solid var(--st-completada); border-top: none !important; }
.kanban-col-programada { border-left: 4px solid var(--st-programada); border-top: none !important; }

/* Alias: .kanban-col-header also accepts compound classes */
.kanban-col-header.kanban-col-pendiente  { border-left: 4px solid var(--st-pendiente); border-top: none !important; }
.kanban-col-header.kanban-col-en_curso   { border-left: 4px solid var(--st-encurso); border-top: none !important; }
.kanban-col-header.kanban-col-completada { border-left: 4px solid var(--st-completada); border-top: none !important; }
.kanban-col-header.kanban-col-programada { border-left: 4px solid var(--st-programada); border-top: none !important; }

/* Avatar extra-small */
.avatar-xs { width: 22px; height: 22px; font-size: 9px; }

/* Dashboard 2-col grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* Filters row (horizontal filter bar) */
.filters-bar { padding: 16px; }
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filters-row .form-control { flex: 1; min-width: 140px; max-width: 200px; }
.filters-row input[type="date"] { min-width: 140px; max-width: 160px; }
.form-control-sm { padding: 7px 12px; font-size: 13px; }

/* Data table */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3);
  border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--primary); }
.data-table th.sort-asc::after { content: ' ↑'; color: var(--primary); }
.data-table th.sort-desc::after { content: ' ↓'; color: var(--primary); }
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr { transition: background var(--t-fast); }
.data-table tbody tr:hover { background: var(--primary-light); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Tag chip */
.tag {
  display: inline-flex; align-items: center; padding: 2px 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; font-size: 11px; color: var(--text-2); font-weight: 500;
}

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; color: var(--text-3); text-align: center;
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.6; }
.empty-state p { font-size: 14px; }

/* Loading shimmer */
.loading-shimmer {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
  min-height: 80px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Page title/subtitle */
.page-title  { font-size: 24px; font-weight: 700; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--text-3); margin-top: 2px; }

/* Tab system */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }

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

/* Timeline (historial) */
.timeline-list { padding: 8px 0; }
.timeline-item { display: flex; gap: 16px; padding: 12px 4px; }
.timeline-left { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; padding-top: 4px; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--primary); }
.timeline-line { flex: 1; width: 2px; background: var(--border); margin: 4px 0; min-height: 24px; }
.timeline-content { flex: 1; min-width: 0; padding-bottom: 4px; }
.timeline-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.timeline-actor { font-weight: 600; font-size: 14px; color: var(--text); }
.timeline-verb  { font-size: 13px; color: var(--text-2); }
.timeline-task-link { font-size: 13px; font-weight: 500; color: var(--primary); cursor: pointer; }
.timeline-task-link:hover { text-decoration: underline; }
.timeline-time  { font-size: 11px; color: var(--text-3); }
.timeline-detail { font-size: 12px; color: var(--text-3); margin-top: 4px; font-style: italic; }

/* Calendar day cells (grid) */
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 0;
  background: var(--border);
}
.calendar-weekday {
  background: var(--surface-2); padding: 8px; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em;
}
.calendar-day {
  background: var(--surface); padding: 6px; min-height: 80px;
  font-size: 12px; cursor: default; transition: background var(--t-fast);
  display: flex; flex-direction: column; gap: 2px;
}
.calendar-day-empty { background: var(--surface-2); }
.calendar-day.today { background: var(--primary-light); }
.calendar-day.today .calendar-day-num { color: var(--primary); font-weight: 700; }
.calendar-day-num { font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 2px; }
.calendar-task-chip {
  padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 500;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity var(--t-fast);
}
.calendar-task-chip:hover { opacity: 0.8; }
.chip-alta    { background: rgba(239,68,68,0.2);  color: #EF4444; }
.chip-normal  { background: rgba(59,130,246,0.2); color: #3B82F6; }
.chip-baja    { background: rgba(34,197,94,0.2);  color: #22C55E; }
.chip-programada { background: rgba(139,92,246,0.2); color: #8B5CF6; }

/* Calendar layout (main + sidebar) */
.calendar-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.calendar-main { padding: 0; }
.calendar-sidebar { padding: 0; }
@media (max-width: 900px) { .calendar-layout { grid-template-columns: 1fr; } }

/* Calendar nav */
.calendar-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.calendar-month-title { font-size: 16px; font-weight: 700; color: var(--text); }

/* Calendar legend */
.calendar-legend { display: flex; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.badge-alta    { background: #EF4444; }
.legend-dot.badge-normal  { background: #3B82F6; }
.legend-dot.badge-baja    { background: #22C55E; }

/* Detail modal sections */
.detail-section { margin-bottom: 20px; }
.detail-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 10px; }
.detail-meta-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media (max-width: 640px) { .detail-meta-grid { grid-template-columns: repeat(2,1fr); } }
.detail-meta-item {}
.detail-meta-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; font-weight: 600; }
.detail-meta-value { font-size: 14px; color: var(--text); font-weight: 500; }

/* Subtask list in modals */
.subtask-list { display: flex; flex-direction: column; gap: 6px; }
.subtask-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface-2); }
.subtask-item input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: var(--primary); }
.subtask-item label { font-size: 13px; color: var(--text-2); cursor: pointer; flex: 1; }
.subtask-item:has(input:checked) label { text-decoration: line-through; opacity: 0.6; }

/* Notes list */
.notes-list { display: flex; flex-direction: column; gap: 0; }
.note-item { display: flex; gap: 12px; }
.note-line { display: flex; flex-direction: column; align-items: center; }
.note-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.note-line-bar { width: 2px; flex: 1; background: var(--border); margin: 4px 0; min-height: 16px; }
.note-content { flex: 1; padding-bottom: 12px; }
.note-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.note-author { font-size: 13px; font-weight: 600; color: var(--text); }
.note-time { font-size: 11px; color: var(--text-3); }
.note-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* Attachments */
.attachments-list { display: flex; flex-direction: column; gap: 6px; }
.attachment-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.attachment-icon { color: var(--primary); flex-shrink: 0; }
.attachment-icon svg { width: 16px; height: 16px; }
.attachment-name { flex: 1; font-size: 13px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-size { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.attachment-download { color: var(--text-3); flex-shrink: 0; transition: color var(--t-fast); }
.attachment-download:hover { color: var(--primary); }
.attachment-download svg { width: 14px; height: 14px; }

/* Confirm dialog styles */
.confirm-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.confirm-icon.danger { background: var(--danger-light); color: var(--danger); }
.confirm-icon svg { width: 24px; height: 24px; }
.confirm-title { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.confirm-text { font-size: 14px; color: var(--text-2); text-align: center; }

/* main-content padding (override if needed) */
.main-content { padding: var(--navbar-h) 0 0 0; }
.main-content > * { padding: 24px 28px; }
.main-content > .page-header { padding-bottom: 0; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header > div { flex: 1; min-width: 0; }

/* Text utilities */
.text-muted { color: var(--text-3) !important; }
.text-sm    { font-size: 13px; }
.text-danger { color: var(--danger); }

