@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --gold: #C9A84C;
  --gold-light: #E4C97A;
  --gold-dark: #8B6914;
  --gold-subtle: rgba(201,168,76,0.12);
  --gold-border: rgba(201,168,76,0.25);

  --sidebar-bg: #1A1612;
  --sidebar-hover: #25201A;
  --sidebar-active: #2E2518;
  --sidebar-text: #7A7268;
  --sidebar-text-hover: #C4B89E;
  --sidebar-text-active: #F5F0E8;

  --bg: #EEEAE4;
  --bg-card: #FFFFFF;
  --bg-input: #FAFAF8;

  --text-primary: #1A1612;
  --text-secondary: #5C5550;
  --text-muted: #9A9490;

  --border: #E5E0D8;
  --border-strong: #CCC8C0;

  --green: #16A34A; --green-bg: #DCFCE7; --green-text: #14532D;
  --amber: #D97706; --amber-bg: #FEF3C7; --amber-text: #78350F;
  --red: #DC2626; --red-bg: #FEE2E2; --red-text: #7F1D1D;
  --blue: #2563EB; --blue-bg: #DBEAFE; --blue-text: #1E3A8A;
  --purple: #7C3AED; --purple-bg: #EDE9FE; --purple-text: #3B0764;
  --gray: #6B7280; --gray-bg: #F3F4F6; --gray-text: #1F2937;

  --shadow-xs: 0 1px 2px rgba(26,22,18,0.06);
  --shadow-sm: 0 1px 4px rgba(26,22,18,0.08);
  --shadow: 0 4px 16px rgba(26,22,18,0.10);
  --shadow-lg: 0 8px 32px rgba(26,22,18,0.14);
  --shadow-xl: 0 20px 60px rgba(26,22,18,0.18);

  --sidebar-width: 260px;
  --header-height: 66px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --transition: 0.18s ease;
}

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

html { font-size: 15px; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  border-right: 1px solid rgba(201,168,76,0.08);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 8px;
}

.logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 16px;
  color: #1A1612;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.logo-text { flex: 1; }
.logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: #F5F0E8;
  text-transform: uppercase;
}
.logo-tagline {
  font-size: 10px;
  color: var(--sidebar-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.sidebar-nav { flex: 1; padding: 4px 12px; }

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sidebar-text);
  padding: 14px 8px 6px;
}

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

.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.75; transition: opacity var(--transition); }
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-hover); }
.nav-item:hover svg { opacity: 1; }

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #1A1612;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

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

.user-avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #1A1612;
  flex-shrink: 0;
}

.user-name-sm { font-size: 13px; font-weight: 600; color: var(--sidebar-text-active); }
.user-role-sm { font-size: 11px; color: var(--sidebar-text); }

.logout-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 4px;
  transition: all var(--transition);
}
.logout-link:hover { background: rgba(220,38,38,0.1); color: #F87171; }
.logout-link svg { width: 15px; height: 15px; }

/* ─── MAIN LAYOUT ─── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── HEADER ─── */
.main-header {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}

.header-title { flex: 1; }
.header-title h1 { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.header-title p { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }

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

.header-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.header-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-subtle); }
.header-btn svg { width: 16px; height: 16px; }

.header-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #1A1612;
  cursor: pointer;
}

/* ─── PAGE CONTENT ─── */
.page-content { padding: 28px; flex: 1; }

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

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

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.gold { background: var(--gold-subtle); color: var(--gold); }
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.blue { background: var(--blue-bg); color: var(--blue); }
.stat-icon.amber { background: var(--amber-bg); color: var(--amber); }
.stat-icon.red { background: var(--red-bg); color: var(--red); }
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }

.stat-body { flex: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.02em; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text-primary); line-height: 1.2; margin-top: 2px; }
.stat-change { font-size: 11.5px; color: var(--green); font-weight: 500; margin-top: 4px; }
.stat-change.down { color: var(--red); }

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

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

.card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.card-body { padding: 22px; }

/* ─── GRID LAYOUTS ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }

/* ─── TABLES ─── */
.table-wrapper { overflow-x: auto; }

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

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

tbody td {
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); cursor: pointer; }
tbody tr:hover { background: #FAFAF8; }

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

/* ─── BADGES / STATUS ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-green { background: var(--green-bg); color: var(--green-text); }
.badge-amber { background: var(--amber-bg); color: var(--amber-text); }
.badge-red { background: var(--red-bg); color: var(--red-text); }
.badge-blue { background: var(--blue-bg); color: var(--blue-text); }
.badge-purple { background: var(--purple-bg); color: var(--purple-text); }
.badge-gray { background: var(--gray-bg); color: var(--gray-text); }
.badge-gold { background: var(--gold-subtle); color: var(--gold-dark); border: 1px solid var(--gold-border); }

.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.7; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--gold);
  color: #1A1612;
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); box-shadow: 0 4px 12px rgba(201,168,76,0.35); }

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--bg-card); }

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

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

.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-sm svg { width: 13px; height: 13px; }

.btn-icon {
  width: 32px; height: 32px; padding: 0;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.btn-icon.btn-secondary { width: 32px; height: 32px; }

/* ─── FORM ELEMENTS ─── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.02em; }

.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  color: var(--text-primary);
  transition: all var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.12); background: #fff; }
.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

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

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,12,10,0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all 0.22s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-overlay.open .modal { transform: translateY(0) scale(1); opacity: 1; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

.modal-lg { max-width: 820px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg-card);
  z-index: 1;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.modal-close {
  width: 30px; height: 30px;
  border: none; background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--red-bg); color: var(--red); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 24px 26px; }

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

/* ─── PROGRESS BAR ─── */
.progress-bar-wrap {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transition: width 0.6s ease;
}
.progress-bar-fill.green { background: linear-gradient(90deg, #15803D, #22C55E); }
.progress-bar-fill.red { background: linear-gradient(90deg, #B91C1C, #EF4444); }

.progress-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.progress-label span { font-size: 12px; color: var(--text-muted); }
.progress-label strong { font-size: 12px; font-weight: 600; }

/* ─── TABS ─── */
.tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  padding-bottom: 0;
}
.tab-btn {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  font-family: 'Outfit', sans-serif;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--gold-dark); border-bottom-color: var(--gold); font-weight: 600; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── SEARCH / FILTER BAR ─── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-wrap svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13.5px;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
}
.search-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.12); }

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
}
.filter-select:focus { border-color: var(--gold); }

/* ─── KANBAN ─── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}

.kanban-col {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.kanban-col-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.kanban-count {
  background: var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}
.task-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.task-card-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.task-card-meta { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

/* ─── AVATAR ─── */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-subtle), var(--gold-border));
  color: var(--gold-dark);
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-md { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-xl { width: 64px; height: 64px; font-size: 22px; }

/* ─── ACTIVITY FEED ─── */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.activity-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ─── STEP CHECKLIST ─── */
.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.step-item:last-child { border-bottom: none; }

.step-checkbox {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.step-checkbox.done { background: var(--green); border-color: var(--green); }
.step-checkbox.done svg { color: white; }
.step-checkbox:hover:not(.done) { border-color: var(--gold); }
.step-checkbox svg { width: 11px; height: 11px; }

.step-label { font-size: 13.5px; color: var(--text-primary); flex: 1; }
.step-label.done { color: var(--text-muted); text-decoration: line-through; }

/* ─── UPLOAD ZONE ─── */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: var(--gold-subtle);
}
.upload-zone svg { width: 32px; height: 32px; color: var(--text-muted); margin-bottom: 10px; }
.upload-zone p { font-size: 13.5px; color: var(--text-muted); }
.upload-zone span { color: var(--gold); font-weight: 600; cursor: pointer; }

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

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--text-primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
  min-width: 280px;
  max-width: 380px;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.warning { background: var(--amber); color: #1A1612; }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }

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

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state svg { width: 48px; height: 48px; color: var(--text-muted); margin-bottom: 14px; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* ─── LOGIN PAGE ─── */
.login-page {
  width: 100%;
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(201,168,76,0.08) 0%, transparent 70%);
}
.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 60px,
    rgba(201,168,76,0.03) 60px, rgba(201,168,76,0.03) 61px
  ),
  repeating-linear-gradient(
    90deg, transparent, transparent 60px,
    rgba(201,168,76,0.03) 60px, rgba(201,168,76,0.03) 61px
  );
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius-xl);
  padding: 44px;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(10px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.4);
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}
.login-logo-mark {
  width: 54px; height: 54px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 22px;
  color: #1A1612;
  margin: 0 auto 14px;
}
.login-logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #F5F0E8;
  text-transform: uppercase;
}
.login-logo-sub {
  font-size: 11px;
  color: var(--sidebar-text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

.login-title {
  font-size: 17px;
  font-weight: 700;
  color: #F5F0E8;
  margin-bottom: 6px;
}
.login-sub {
  font-size: 13px;
  color: var(--sidebar-text);
  margin-bottom: 28px;
}

.login-form .form-label { color: var(--sidebar-text-hover); }
.login-form .form-control {
  background: rgba(255,255,255,0.05);
  border-color: rgba(201,168,76,0.2);
  color: #F5F0E8;
}
.login-form .form-control:focus { border-color: var(--gold); background: rgba(255,255,255,0.08); }
.login-form .form-control::placeholder { color: rgba(255,255,255,0.3); }

.login-error {
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #FCA5A5;
  margin-bottom: 16px;
  display: none;
}
.login-error.show { display: block; }

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1A1612;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  margin-top: 8px;
}
.btn-login:hover { opacity: 0.9; box-shadow: 0 6px 20px rgba(201,168,76,0.4); transform: translateY(-1px); }

/* ─── PIPELINE ITEM ─── */
.pipeline-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.pipeline-item:last-child { border-bottom: none; }
.pipeline-info { flex: 1; min-width: 0; }
.pipeline-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.pipeline-company { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.pipeline-progress { width: 140px; flex-shrink: 0; }

/* ─── INVOICE DETAIL ─── */
.invoice-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.invoice-line:last-child { border-bottom: none; }
.invoice-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 0;
  font-size: 16px;
  font-weight: 700;
}

/* ─── TEAM GRID ─── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition);
}
.team-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.team-card .avatar { margin: 0 auto 12px; }
.team-card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.team-card-role { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.team-card-actions { margin-top: 14px; display: flex; gap: 6px; justify-content: center; }

/* ─── DETAIL HEADER ─── */
.detail-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.detail-hero .avatar-xl { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #1A1612; }
.detail-hero-info h2 { font-size: 22px; font-weight: 700; }
.detail-hero-info p { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.detail-hero-badges { display: flex; gap: 6px; margin-top: 8px; }

/* ─── INFO GRID ─── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.info-item { }
.info-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 3px; }
.info-value { font-size: 13.5px; color: var(--text-primary); font-weight: 500; }

/* ─── DOC FILES ─── */
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.doc-item:hover { border-color: var(--gold-border); background: var(--gold-subtle); }
.doc-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-bg);
  color: var(--blue);
  flex-shrink: 0;
}
.doc-icon svg { width: 18px; height: 18px; }
.doc-icon.pdf { background: var(--red-bg); color: var(--red); }
.doc-icon.img { background: var(--green-bg); color: var(--green); }
.doc-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.doc-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.doc-actions { margin-left: auto; display: flex; gap: 6px; }

/* ─── NOTES ─── */
.note-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 80px;
  margin-bottom: 10px;
}

/* ─── SETTINGS ─── */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}
.settings-section-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg);
}
.settings-section-body { padding: 22px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .grid-2, .grid-2-1, .grid-1-2, .grid-3 { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .main-wrapper { margin-left: 0; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* ─── UTILITY ─── */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12.5px; }
.text-right { text-align: right; }
.font-mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(26,22,18,0.12);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
