/* ==========================================================================
   CHITTARA — COMPONENT LIBRARY
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard), background var(--dur-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-gold {
  background: var(--gradient-gold);
  color: var(--color-royal-purple);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover { box-shadow: 0 14px 34px rgba(212,175,55,0.28); }

.btn-primary {
  background: var(--color-royal-purple);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-premium-purple); }

.btn-outline {
  background: transparent;
  color: var(--color-royal-purple);
  border-color: var(--color-border);
}
.btn-outline:hover { border-color: var(--color-violet); color: var(--color-violet); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover { color: var(--color-royal-purple); }

.btn-sm { padding: 8px 16px; font-size: var(--fs-xs); }
.btn-block { width: 100%; }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-icon { padding: 10px; border-radius: 50%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0;
  z-index: var(--z-header);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-6);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); color: var(--color-royal-purple); }
.brand .logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gradient-hero);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-gold-bright); font-family: var(--font-display); font-weight: 700;
  box-shadow: var(--shadow-md);
}
.main-nav { display: flex; align-items: center; gap: var(--space-6); flex: 1; justify-content: center; }
.main-nav a { font-size: var(--fs-sm); font-weight: 500; color: var(--color-text-dark); position: relative; padding: 6px 2px; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gradient-gold); transition: width var(--dur-med) var(--ease-standard);
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.search-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--color-bg-soft); border: 1px solid var(--color-border);
  border-radius: var(--radius-pill); padding: 9px 16px; min-width: 220px;
}
.search-pill input { border: none; background: transparent; width: 100%; outline: none; color: var(--color-text-dark); }

/* ---------- Mobile nav toggle ---------- */
.nav-toggle { display: none; background: none; border: none; }
@media (max-width: 960px) {
  .main-nav, .search-pill { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--gradient-hero);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
  padding: var(--space-10) 0 var(--space-9);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(212,175,55,0.18), transparent 60%),
    radial-gradient(500px 400px at 10% 90%, rgba(108,39,184,0.35), transparent 60%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-8); align-items: center; position: relative; }
.hero h1 { color: var(--color-white); font-size: var(--fs-5xl); }
.hero p.lead { color: rgba(255,255,255,0.78); font-size: var(--fs-md); max-width: 520px; }
.hero-actions { display: flex; gap: var(--space-4); margin-top: var(--space-6); flex-wrap: wrap; }
.hero-visual {
  border-radius: var(--radius-xl);
  background: var(--gradient-glass);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow-inset-glass), var(--shadow-lg);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: var(--fs-3xl); }
}

/* ---------- Section ---------- */
.section { padding: var(--space-9) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: var(--space-6); gap: var(--space-4); flex-wrap: wrap; }
.section-head h2 { margin: var(--space-2) 0 0; }
.section-alt { background: var(--color-surface-alt); }

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-med) var(--ease-standard), transform var(--dur-med) var(--ease-standard);
}
.card:hover { box-shadow: var(--shadow-md); }

.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Artist Card ---------- */
.artist-card { overflow: hidden; display: flex; flex-direction: column; position: relative; }
.artist-card .thumb {
  aspect-ratio: 3/4; background: var(--gradient-panel);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.artist-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.artist-card .save-icon {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.88); display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border);
}
.artist-card .badge-verified {
  position: absolute; top: 12px; left: 12px;
  background: var(--color-royal-purple); color: var(--color-gold-bright);
  font-size: var(--fs-xs); font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: 4px;
}
.artist-card .body { padding: var(--space-4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.artist-card .name { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); color: var(--color-royal-purple); }
.artist-card .meta { font-size: var(--fs-xs); color: var(--color-text-muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.artist-card .rating { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--color-warning); }
.artist-card .price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--space-3); border-top: 1px dashed var(--color-border); }
.artist-card .price { font-weight: 700; color: var(--color-royal-purple); }
.artist-card .card-actions { display: flex; gap: 8px; margin-top: var(--space-3); }

/* ---------- Badges / status pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); }
.badge-gold { background: rgba(212,175,55,0.15); color: #8a6a12; }
.badge-success { background: rgba(22,138,91,0.12); color: var(--color-success); }
.badge-warning { background: rgba(214,138,16,0.12); color: var(--color-warning); }
.badge-danger { background: rgba(198,60,74,0.12); color: var(--color-danger); }
.badge-neutral { background: var(--color-bg-soft); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.badge-violet { background: rgba(108,39,184,0.12); color: var(--color-violet); }

/* ---------- Stat / KPI cards (dashboards) ---------- */
.stat-card { padding: var(--space-5); display: flex; flex-direction: column; gap: 6px; }
.stat-card .stat-label { font-size: var(--fs-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-card .stat-value { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--color-royal-purple); font-weight: 700; }
.stat-card .stat-delta { font-size: var(--fs-xs); font-weight: 600; }
.stat-delta.up { color: var(--color-success); }
.stat-delta.down { color: var(--color-danger); }

/* ---------- Filters bar ---------- */
.filters-bar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin-bottom: var(--space-6); }
.filter-select, .filter-input {
  border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 9px 12px;
  background: var(--color-surface-alt); font-size: var(--fs-sm); color: var(--color-text-dark);
}
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--color-border); font-size: var(--fs-xs); font-weight: 600; background: var(--color-surface); }
.chip.active { background: var(--color-royal-purple); color: var(--color-white); border-color: var(--color-royal-purple); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: var(--space-6); border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-6); overflow-x: auto; }
.tab { padding: 12px 2px; font-size: var(--fs-sm); font-weight: 600; color: var(--color-text-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--color-royal-purple); border-color: var(--color-gold-metallic); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.data-table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); padding: 14px 18px; border-bottom: 1px solid var(--color-border); background: var(--color-surface-alt); }
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--color-border); font-size: var(--fs-sm); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(108,39,184,0.03); }
.table-pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-size: var(--fs-xs); color: var(--color-text-muted); }

/* ---------- Dashboard shell ---------- */
.dash-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.dash-sidebar { background: var(--color-royal-purple); color: rgba(255,255,255,0.85); padding: var(--space-5) var(--space-4); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.dash-sidebar .brand { color: var(--color-white); margin-bottom: var(--space-6); }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: var(--fs-sm); margin-bottom: 2px; color: rgba(255,255,255,0.7); }
.dash-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.dash-nav a.active { background: var(--gradient-gold); color: var(--color-royal-purple); font-weight: 700; }
.dash-nav .nav-group-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,0.35); margin: var(--space-5) 12px 6px; }
.dash-main { padding: var(--space-6) var(--space-7); }
.dash-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-6); flex-wrap: wrap; gap: var(--space-3); }
.dash-topbar h1 { font-size: var(--fs-xl); margin: 0; }
@media (max-width: 960px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; height: auto; }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(22,0,37,0.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: var(--z-modal); padding: var(--space-5);
}
.modal-overlay.open { display: flex; }
.modal { background: var(--color-surface); border-radius: var(--radius-lg); max-width: 480px; width: 100%; padding: var(--space-6); box-shadow: var(--shadow-lg); position: relative; }
.modal .modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 20px; color: var(--color-text-muted); }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: var(--z-toast); }
.toast { background: var(--color-royal-purple); color: #fff; padding: 14px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-size: var(--fs-sm); display: flex; align-items: center; gap: 10px; min-width: 260px; animation: toast-in var(--dur-med) var(--ease-standard); }
.toast.success { background: var(--color-success); }
.toast.danger { background: var(--color-danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Forms ---------- */
.form-group { margin-bottom: var(--space-5); }
.form-group label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 6px; color: var(--color-text-dark); }
.form-control { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: var(--color-surface-alt); font-size: var(--fs-sm); }
.form-control:focus { outline: none; border-color: var(--color-violet); background: var(--color-surface); }
.form-hint { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 4px; }
.progress-bar { height: 6px; background: var(--color-border); border-radius: var(--radius-pill); overflow: hidden; }
.progress-bar .fill { height: 100%; background: var(--gradient-gold); }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: var(--space-4); overflow-x: auto; padding-bottom: var(--space-3); }
.kanban-col { flex: 0 0 280px; background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4); }
.kanban-col h4 { font-size: var(--fs-sm); display: flex; justify-content: space-between; }
.kanban-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3); margin-top: var(--space-3); box-shadow: var(--shadow-sm); font-size: var(--fs-sm); }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-royal-purple); color: rgba(255,255,255,0.65); padding: var(--space-9) 0 var(--space-6); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: var(--space-6); }
.footer-grid h5 { color: #fff; font-family: var(--font-body); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--space-3); }
.footer-grid a { display: block; font-size: var(--fs-sm); padding: 4px 0; color: rgba(255,255,255,0.6); }
.footer-grid a:hover { color: var(--color-gold-bright); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: var(--space-7); padding-top: var(--space-5); display: flex; justify-content: space-between; font-size: var(--fs-xs); flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2,1fr); } }

/* ---------- Login split screen ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-visual { background: var(--gradient-hero); color: #fff; padding: var(--space-8); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: var(--space-6); }
.auth-card { width: 100%; max-width: 400px; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pill { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 10px; font-size: var(--fs-xs); text-align: center; cursor: pointer; }
.role-pill.active { border-color: var(--color-gold-metallic); background: rgba(212,175,55,0.08); font-weight: 700; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-visual { display: none; } }
