/* ============ FOX GRID V2 - Branded Theme ============ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --bg: #0a0a0f;
  --bg-surface: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-input: #0e0e15;
  --bg-elevated: #1e1e2a;
  --border: #252530;
  --border-subtle: #1e1e28;
  --border-focus: #E85A6E;
  --text: #f0f0f4;
  --text-secondary: #a0a0b0;
  --text-muted: #6a6a7a;
  --text-dim: #45455a;
  --rose: #E85A6E;
  --rose-hover: #d44d60;
  --rose-bg: rgba(232, 90, 110, 0.1);
  --rose-glow: rgba(232, 90, 110, 0.15);
  --coral: #FF8A6B;
  --coral-bg: rgba(255, 138, 107, 0.1);
  --pink: #F472B6;
  --pink-bg: rgba(244, 114, 182, 0.1);
  --purple: #9C1F6B;
  --green: #34D399;
  --green-bg: rgba(52, 211, 153, 0.08);
  --blue: #60A5FA;
  --blue-bg: rgba(96, 165, 250, 0.08);
  --yellow: #FBBF24;
  --yellow-bg: rgba(251, 191, 36, 0.08);
  --red: #F87171;
  --red-bg: rgba(248, 113, 113, 0.08);
  --gradient-brand: linear-gradient(135deg, #E85A6E 0%, #FF8A6B 50%, #F472B6 100%);
  --gradient-card: linear-gradient(180deg, rgba(232,90,110,0.03) 0%, transparent 100%);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(232,90,110,0.08) 0%, transparent 60%);
  --sidebar-w: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

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

::selection { background: var(--rose); color: white; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ============ LOGIN ============ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(232,90,110,0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 80%, rgba(255,138,107,0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(244,114,182,0.03) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
}
@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-0.5deg); }
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 120px rgba(232,90,110,0.05);
  position: relative;
  z-index: 1;
}

.login-brand {
  text-align: center;
  margin-bottom: 36px;
}
.login-logo { margin-bottom: 16px; }
.login-logo svg, .login-logo img { width: 60px; height: 60px; }
.login-brand h1 {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-brand p { color: var(--text-muted); font-size: 13px; margin-top: 4px; letter-spacing: 1px; text-transform: uppercase; }

.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.login-form input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}
.login-form input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-bg); }

.login-error {
  background: var(--red-bg);
  color: var(--red);
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(248,113,113,0.2);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 4px 16px rgba(232,90,110,0.25);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(232,90,110,0.35); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text); border-color: var(--text-dim); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248,113,113,0.15); }
.btn-danger:hover { background: var(--red); color: white; }
.btn-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(52,211,153,0.15); }
.btn-success:hover { background: var(--green); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 8px 12px; }
.btn-ghost:hover { color: var(--text); background: var(--bg-elevated); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 4px; }
.btn-full { width: 100%; justify-content: center; padding: 13px; font-size: 14px; }
.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.btn-icon:hover { color: var(--rose); background: var(--rose-bg); }
.btn-icon svg { width: 18px; height: 18px; }

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

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand svg, .sidebar-brand img { width: 36px; height: 36px; flex-shrink: 0; }
.sidebar-brand-text h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-brand-text span { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.5px; }

.sidebar-section-label {
  padding: 20px 20px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; stroke-width: 1.8; }
.nav-item:hover { background: var(--bg-card-hover); color: var(--text-secondary); }
.nav-item.active {
  background: var(--rose-bg);
  color: var(--rose);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--rose);
  border-radius: 0 3px 3px 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--rose);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 36px; height: 36px;
  background: var(--gradient-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: white;
}
.user-details { display: flex; flex-direction: column; }
.user-details .name { font-size: 13px; font-weight: 600; }
.user-details .role { font-size: 11px; color: var(--text-dim); }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 32px 40px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}
.main-content::before {
  content: '';
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: 300px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}
.main-content > * { position: relative; z-index: 1; }

/* ============ PAGE HEADER ============ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.page-header h1 .icon { margin-right: 12px; opacity: 0.7; }
.page-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.page-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ============ STATS GRID ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.3s;
}
.stat-card:hover { border-color: var(--rose); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,90,110,0.08); }
.stat-card:hover::before { opacity: 1; }

.stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.rose { background: var(--rose-bg); color: var(--rose); }
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.blue { background: var(--blue-bg); color: var(--blue); }
.stat-icon.coral { background: var(--coral-bg); color: var(--coral); }
.stat-icon.yellow { background: var(--yellow-bg); color: var(--yellow); }
.stat-icon.pink { background: var(--pink-bg); color: var(--pink); }
.stat-icon.red { background: var(--red-bg); color: var(--red); }

.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.stat-sub { font-size: 12px; color: var(--text-dim); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-value.rose { color: var(--rose); }
.stat-value.green { color: var(--green); }
.stat-value.blue { color: var(--blue); }
.stat-value.coral { color: var(--coral); }
.stat-value.yellow { color: var(--yellow); }
.stat-value.pink { color: var(--pink); }
.stat-value.red { color: var(--red); }

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-subtle); }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
}
.card-header .icon { margin-right: 8px; color: var(--rose); }
.card-body { padding: 24px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.mb-24 { margin-bottom: 24px; }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  white-space: nowrap;
}
tbody td {
  padding: 14px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--bg-card-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.2px;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-pending { background: var(--yellow-bg); color: var(--yellow); }
.badge-pending::before { background: var(--yellow); }
.badge-in_progress, .badge-in-progress { background: var(--blue-bg); color: var(--blue); }
.badge-in_progress::before, .badge-in-progress::before { background: var(--blue); }
.badge-completed, .badge-paid { background: var(--green-bg); color: var(--green); }
.badge-completed::before, .badge-paid::before { background: var(--green); }
.badge-cancelled { background: var(--red-bg); color: var(--red); }
.badge-cancelled::before { background: var(--red); }
.badge-draft { background: rgba(100,100,120,0.1); color: var(--text-muted); }
.badge-draft::before { background: var(--text-muted); }
.badge-sent { background: var(--pink-bg); color: var(--pink); }
.badge-sent::before { background: var(--pink); }
.badge-overdue { background: var(--red-bg); color: var(--red); }
.badge-overdue::before { background: var(--red); }
.badge-low { background: rgba(100,100,120,0.1); color: var(--text-muted); }
.badge-low::before { background: var(--text-muted); }
.badge-medium { background: var(--blue-bg); color: var(--blue); }
.badge-medium::before { background: var(--blue); }
.badge-high { background: var(--yellow-bg); color: var(--yellow); }
.badge-high::before { background: var(--yellow); }
.badge-urgent { background: var(--red-bg); color: var(--red); }
.badge-urgent::before { background: var(--red); }

/* ============ FORMS ============ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-bg); }
select.form-control { cursor: pointer; appearance: auto; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-hint { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============ FILTER TABS ============ */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.filter-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}
.filter-tab:hover { color: var(--text); background: var(--bg-card-hover); }
.filter-tab.active { background: var(--rose); color: white; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 50px 20px;
  overflow-y: auto;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 60px rgba(232,90,110,0.05);
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal.modal-lg { max-width: 800px; }
.modal.modal-xl { max-width: 960px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 700;
}
.modal-body { padding: 28px; }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  width: 64px; height: 64px;
  background: var(--bg-elevated);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.empty-state .empty-icon svg { width: 28px; height: 28px; color: var(--text-dim); }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; max-width: 300px; margin: 0 auto; }

/* ============ TASK LIST ============ */
.task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}
.task-item:last-child { border-bottom: none; }
.task-item:hover { background: var(--bg-card-hover); }
.task-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-check:hover { border-color: var(--rose); background: var(--rose-bg); }
.task-check.done { background: var(--green); border-color: var(--green); }
.task-check.done::after { content: '✓'; color: white; font-size: 12px; font-weight: 800; }
.task-title { flex: 1; font-size: 13px; font-weight: 500; }
.task-title.done { text-decoration: line-through; color: var(--text-dim); }

/* ============ COST/EXTRA LIST ============ */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  transition: background 0.15s;
  gap: 12px;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-card-hover); }
.list-item-main { flex: 1; min-width: 0; }
.list-item-label { font-weight: 600; }
.list-item-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.list-item-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* ============ PROJECT DETAIL ============ */
.project-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.project-detail-header h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.project-meta { display: flex; gap: 20px; margin-top: 10px; flex-wrap: wrap; }
.project-meta-item {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-meta-item svg { width: 14px; height: 14px; }

.project-financials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.financial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: var(--transition);
}
.financial-card:hover { border-color: var(--rose); }
.financial-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 600; }
.financial-value { font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: -0.5px; }

.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.detail-tab {
  padding: 14px 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  margin-bottom: -2px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-tab svg { width: 16px; height: 16px; }
.detail-tab:hover { color: var(--text); }
.detail-tab.active { color: var(--rose); border-bottom-color: var(--rose); }
.tab-count {
  font-size: 10px;
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--text-dim);
}
.detail-tab.active .tab-count { background: var(--rose-bg); color: var(--rose); }

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

/* ============ PROGRESS BAR ============ */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ HOSTING INFO ============ */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.info-item {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.info-value { font-size: 13px; font-weight: 500; font-family: 'SF Mono', 'Fira Code', monospace; }
.info-value.masked { color: var(--text-dim); letter-spacing: 2px; cursor: pointer; }
.info-value.masked:hover { color: var(--text); letter-spacing: 0; }

/* ============ ACTIVITY LOG ============ */
.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  margin-top: 6px;
  flex-shrink: 0;
}
.activity-dot.viewed { background: var(--blue); }
.activity-dot.created { background: var(--green); }
.activity-dot.updated { background: var(--yellow); }
.activity-dot.deleted { background: var(--red); }
.activity-dot.added { background: var(--coral); }
.activity-dot.login { background: var(--pink); }
.activity-content { flex: 1; }
.activity-text { color: var(--text-secondary); }
.activity-text strong { color: var(--text); font-weight: 600; }
.activity-time { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ============ CHART ============ */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  padding: 20px 0;
}
.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar-fill {
  width: 100%;
  max-width: 36px;
  background: var(--gradient-brand);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
}
.chart-bar:hover .chart-bar-fill { opacity: 1; }
.chart-bar-label { font-size: 10px; color: var(--text-dim); }
.chart-bar-value { font-size: 10px; color: var(--text-muted); font-weight: 600; }

/* ============ QUICK ACTIONS ============ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.quick-action {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
}
.quick-action:hover { border-color: var(--rose); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,90,110,0.1); }
.quick-action svg { width: 24px; height: 24px; color: var(--rose); }
.quick-action span { font-size: 12px; font-weight: 600; }

/* ============ WELCOME BANNER ============ */
.welcome-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
}
.welcome-banner h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.welcome-banner p { color: var(--text-muted); font-size: 14px; }
.welcome-stats {
  display: flex;
  gap: 32px;
  margin-top: 20px;
}
.welcome-stat { display: flex; flex-direction: column; }
.welcome-stat-value { font-size: 24px; font-weight: 800; }
.welcome-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ============ LAYOUT SWITCHER ============ */
.layout-switcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
}
.layout-switcher .btn {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  border: 1px solid var(--border);
}

/* ============ COPY BUTTON ============ */
.copy-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}
.copy-btn:hover { color: var(--rose); background: var(--rose-bg); }
.copy-btn svg { width: 14px; height: 14px; }
.copied { color: var(--green) !important; }

/* ============ SETTINGS / PROFILE ============ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
}
.profile-avatar:hover .profile-avatar-overlay { opacity: 1; }
.profile-avatar-overlay svg { width: 24px; height: 24px; color: white; }
.profile-info h2 { font-size: 22px; font-weight: 800; }
.profile-info p { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.profile-info .role-badge { margin-top: 8px; }

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
}
.settings-section { }
.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--rose);
}

/* User cards for user management */
.user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}
.user-card:last-child { border-bottom: none; }
.user-card:hover { background: var(--bg-card-hover); }
.user-card-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}
.user-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-card-info { flex: 1; min-width: 0; }
.user-card-name { font-weight: 600; font-size: 14px; }
.user-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.user-card-actions { display: flex; gap: 6px; flex-shrink: 0; }

.clickable { cursor: pointer; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .main-content { padding: 24px; }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 16px; }
  .main-content::before { left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .welcome-stats { flex-wrap: wrap; gap: 16px; }
}
