/* ============================================================
   DIGITAL AGENCY CLIENT CABINET — DESIGN SYSTEM
   Gold + Emerald + Black — White Label Premium Theme
   ============================================================ */

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

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
  /* Brand Colors */
  --gold:           #C9A465;
  --gold-dark:      #A07840;
  --gold-light:     #E2C48A;
  --gold-glow:      rgba(201, 164, 101, 0.15);
  --gold-glow-strong: rgba(201, 164, 101, 0.30);
  --emerald:        #10B981;
  --emerald-dark:   #059669;
  --emerald-light:  #34D399;
  --emerald-glow:   rgba(16, 185, 129, 0.15);

  /* Backgrounds */
  --bg-base:        #F8F9FA;
  --bg-surface:     #FFFFFF;
  --bg-surface-2:   #F0F2F5;
  --bg-surface-3:   #E4E7EB;
  --bg-sidebar:     #FFFFFF;

  /* Borders */
  --border:         #E5E7EB;
  --border-light:   #D1D5DB;
  --border-gold:    rgba(201, 164, 101, 0.5);

  /* Text */
  --text-primary:   #111827;
  --text-secondary: #4B5563;
  --text-muted:     #9CA3AF;

  /* Status Colors */
  --status-pending:  #F59E0B;
  --status-inwork:   #3B82F6;
  --status-done:     #10B981;
  --status-danger:   #EF4444;

  /* Sizing */
  --sidebar-width:  260px;
  --sidebar-collapsed: 72px;
  --header-h:       64px;
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      24px;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.6);
  --shadow-gold:    0 4px 24px rgba(201, 164, 101, 0.2);

  /* Transitions */
  --transition:     0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

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

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

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

.page-wrapper {
  flex: 1;
  padding: 32px;
  max-width: 100%;
  width: 100%;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}

.sidebar-logo-icon svg {
  width: 20px;
  height: 20px;
  color: #000;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-logo-tagline {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 1px;
}

/* Client Info Block */
.sidebar-client {
  height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.sidebar-client-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.sidebar-client-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav-section {
  margin-bottom: 8px;
}

.sidebar-nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 8px 8px 4px;
  white-space: nowrap;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.sidebar-nav-item:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.sidebar-nav-item.active .nav-icon svg {
  color: var(--gold);
}

.sidebar-nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-nav-item .nav-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-nav-item .nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-nav-item .nav-badge.emerald {
  background: var(--emerald);
}

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

.sidebar-footer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.sidebar-footer-item:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.sidebar-footer-item.danger:hover {
  color: var(--status-danger);
}

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

.top-header-title {
  flex: 1;
}

.top-header-title h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.top-header-title p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

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

.header-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
}

.header-icon-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

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

#burgerBtn {
  display: none;
}

.header-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
  border: 1.5px solid var(--bg-surface);
}

.header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  border: 2px solid var(--border-gold);
  cursor: pointer;
  transition: all var(--transition);
}

.header-avatar:hover {
  box-shadow: var(--shadow-gold);
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--border-light);
}

.card-gold {
  border-color: var(--border-gold);
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(201,164,101,0.05) 100%);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

/* ─── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

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

.stat-card:hover::before {
  opacity: 1;
}

.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.gold { background: var(--gold-glow); color: var(--gold); }
.stat-icon.emerald { background: var(--emerald-glow); color: var(--emerald); }
.stat-icon.blue { background: rgba(59,130,246,0.15); color: #3B82F6; }
.stat-icon.purple { background: rgba(139,92,246,0.15); color: #8B5CF6; }

.stat-body { flex: 1; }

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-change {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 8px;
  display: inline-block;
}

.stat-change.up { background: rgba(16,185,129,0.15); color: var(--emerald); }
.stat-change.down { background: rgba(239,68,68,0.15); color: var(--status-danger); }

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.grid-main-aside {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  border-color: var(--gold-dark);
  box-shadow: 0 2px 12px rgba(201,164,101,0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 20px rgba(201,164,101,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  color: #000;
  border-color: var(--emerald-dark);
}

.btn-emerald:hover {
  box-shadow: 0 4px 16px rgba(16,185,129,0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-icon { padding: 10px; }

.btn-danger {
  background: rgba(239,68,68,0.1);
  color: var(--status-danger);
  border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.2);
}

/* ─── Badges & Status ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

.badge-gold    { background: var(--gold-glow-strong); color: var(--gold); border: 1px solid var(--border-gold); }
.badge-emerald { background: var(--emerald-glow); color: var(--emerald); }
.badge-blue    { background: rgba(59,130,246,0.15); color: #3B82F6; }
.badge-yellow  { background: rgba(245,158,11,0.15); color: var(--status-pending); }
.badge-red     { background: rgba(239,68,68,0.15); color: var(--status-danger); }
.badge-muted   { background: var(--bg-surface-3); color: var(--text-secondary); }

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

.status-dot.pending { background: var(--status-pending); }
.status-dot.inwork  { background: var(--status-inwork); animation: pulse-blue 2s infinite; }
.status-dot.done    { background: var(--status-done); }
.status-dot.danger  { background: var(--status-danger); }
.status-dot.online  { background: var(--emerald); animation: pulse-green 2s infinite; }

@keyframes pulse-blue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(59,130,246,0); }
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 101, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* Input with icon */
.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  pointer-events: none;
}

.input-icon i,
.input-icon svg {
  width: 16px;
  height: 16px;
}

.form-input.with-icon {
  padding-left: 40px;
}

.form-input.error { border-color: var(--status-danger); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A5A5A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

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

.table th {
  background: var(--bg-surface-2);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.table tr:last-child td { border-bottom: none; }

.table tbody tr:hover td {
  background: var(--bg-surface-2);
}

/* ─── Tabs ───────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid var(--border);
}

.tab-item {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.tab-item.active {
  background: var(--bg-surface-3);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.tab-count {
  font-size: 11px;
  background: var(--bg-surface-3);
  padding: 1px 6px;
  border-radius: 99px;
}

.tab-item.active .tab-count {
  background: var(--gold-glow-strong);
  color: var(--gold);
}

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

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted);
}

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

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

.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 300px;
  line-height: 1.6;
}

/* ─── Notifications Dropdown ─────────────────────────────── */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 320px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: all var(--transition);
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

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

.dropdown-header span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── Progress Bar ───────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--bg-surface-3);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 1s ease;
}

.progress-fill.emerald {
  background: linear-gradient(90deg, var(--emerald-dark), var(--emerald-light));
}

/* ─── Divider ────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ─── Tooltip ────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: var(--bg-surface-3);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 999;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ─── Loading Spinner ────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ─── Chart Container ────────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
}

/* ─── Notification Toast ─────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
}

.toast.success { border-left: 3px solid var(--emerald); }
.toast.warning { border-left: 3px solid var(--status-pending); }
.toast.error   { border-left: 3px solid var(--status-danger); }
.toast.info    { border-left: 3px solid var(--gold); }

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

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

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

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
}

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

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover { color: var(--text-primary); border-color: var(--border-light); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-main-aside { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-wrapper { padding: 20px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  
  #burgerBtn {
    display: flex;
  }
}

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeIn 0.3s ease forwards;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }

/* ─── Utilities ──────────────────────────────────────────── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4       { gap: 4px; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }
.gap-20      { gap: 20px; }
.gap-24      { gap: 24px; }
.mt-4        { margin-top: 4px; }
.mt-8        { margin-top: 8px; }
.mt-12       { margin-top: 12px; }
.mt-16       { margin-top: 16px; }
.mt-20       { margin-top: 20px; }
.mt-24       { margin-top: 24px; }
.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; }
.text-gold   { color: var(--gold); }
.text-emerald{ color: var(--emerald); }
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-600    { font-weight: 600; }
.font-700    { font-weight: 700; }
.font-800    { font-weight: 800; }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 12px; }
.text-lg     { font-size: 18px; }
.w-full      { width: 100%; }
.hidden      { display: none; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
