/* BEAUTIX DESIGN SYSTEM v1.0 - Premium Dark Theme */

:root {
  --bg-primary: #0F0F10;
  --bg-secondary: #151515;
  --bg-card: #1B1B1B;
  --bg-elevated: #252525;
  --bg-hover: #2A2A2A;
  --border: #2A2A2A;
  --border-light: #3A3A3A;
  --border-focus: #8DFF2D;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --text-muted: #6B6B6B;
  --text-inverse: #0F0F10;
  --accent-green: #8DFF2D;
  --accent-green-hover: #7AEE20;
  --accent-green-light: rgba(141, 255, 45, 0.1);
  --accent-green-glow: rgba(141, 255, 45, 0.2);
  --accent-red: #E10600;
  --accent-red-hover: #B80000;
  --accent-red-light: rgba(225, 6, 0, 0.1);
  --status-success: #8DFF2D;
  --status-warning: #F59E0B;
  --status-error: #E10600;
  --status-info: #3B82F6;
  --shadow-sm: 0 2px 8px 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-glow: 0 0 20px rgba(141, 255, 45, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: 2rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.25rem; } h4 { font-size: 1.1rem; } h5 { font-size: 1rem; } h6 { font-size: 0.875rem; }
.text-accent { color: var(--accent-green); } .text-secondary { color: var(--text-secondary); } .text-muted { color: var(--text-muted); }
.text-error { color: var(--status-error); } .text-success { color: var(--status-success); } .text-warning { color: var(--status-warning); }
.text-sm { font-size: 0.875rem; } .text-xs { font-size: 0.75rem; } .text-lg { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; }
.font-semibold { font-weight: 600; } .font-bold { font-weight: 700; }

.app-shell { display: flex; min-height: 100vh; }
.main-content { flex: 1; margin-left: var(--sidebar-width); padding-top: var(--topbar-height); min-height: 100vh; }
.page-container { padding: 24px; max-width: 1400px; margin: 0 auto; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: all var(--transition); }
.card:hover { border-color: var(--border-light); box-shadow: var(--shadow-sm); }
.card-glass { background: rgba(27, 27, 27, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: var(--radius-lg); padding: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.card-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; }

.kpi-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: all var(--transition); position: relative; overflow: hidden; }
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent-green); opacity: 0; transition: opacity var(--transition); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-light); }
.kpi-card:hover::before { opacity: 1; }
.kpi-card .kpi-icon { width: 42px; height: 42px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 12px; background: var(--accent-green-light); color: var(--accent-green); }
.kpi-card .kpi-value { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.kpi-card .kpi-label { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 8px; }
.kpi-card .kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); }
.kpi-trend.up { color: var(--accent-green); background: var(--accent-green-light); }
.kpi-trend.down { color: var(--status-error); background: var(--accent-red-light); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border: none; border-radius: var(--radius-md); font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all var(--transition); text-decoration: none; white-space: nowrap; line-height: 1; }
.btn-primary { background: var(--accent-red); color: white; }
.btn-primary:hover { background: var(--accent-red-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(225, 6, 0, 0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-accent { background: var(--accent-green); color: var(--text-inverse); }
.btn-accent:hover { background: var(--accent-green-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(141, 255, 45, 0.3); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.btn-danger { background: transparent; color: var(--status-error); border: 1px solid var(--status-error); }
.btn-danger:hover { background: var(--status-error); color: white; }
.btn-sm { padding: 6px 12px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-md); }
.btn-icon:hover { background: var(--bg-hover); }

.input { width: 100%; padding: 10px 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-family: var(--font-sans); font-size: 0.875rem; transition: all var(--transition); outline: none; }
.input::placeholder { color: var(--text-muted); }
.input:focus { border-color: var(--accent-green); box-shadow: 0 0 0 3px var(--accent-green-light); background: var(--bg-card); }
.input-error { border-color: var(--status-error) !important; box-shadow: 0 0 0 3px var(--accent-red-light) !important; }
textarea.input { resize: vertical; min-height: 100px; }

.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; }
.table thead { background: var(--bg-secondary); }
.table th { padding: 12px 16px; text-align: left; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; font-size: 0.875rem; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody tr:last-child td { border-bottom: none; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; line-height: 1.4; }
.badge-success { background: var(--accent-green-light); color: var(--accent-green); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--status-warning); }
.badge-error { background: var(--accent-red-light); color: var(--status-error); }
.badge-info { background: var(--accent-green-light); color: var(--accent-green); }

.avatar { width: 36px; height: 36px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.875rem; color: var(--text-inverse); background: var(--accent-red); flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: 0.75rem; }
.avatar-lg { width: 44px; height: 44px; font-size: 1rem; }
.avatar-xl { width: 56px; height: 56px; font-size: 1.25rem; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: all var(--transition); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); width: 100%; max-width: 520px; max-height: 85vh; overflow-y: auto; transform: scale(0.95) translateY(10px); transition: transform var(--transition); }
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-body { padding: 24px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); min-width: 300px; max-width: 420px; animation: slideIn 0.3s ease; }
.toast.success { border-left: 3px solid var(--status-success); }
.toast.error { border-left: 3px solid var(--status-error); }
.toast.warning { border-left: 3px solid var(--status-warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.skeleton { background: var(--bg-hover); border-radius: var(--radius-md); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--accent-green); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 8px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.grid { display: grid; } .grid-cols-2 { grid-template-columns: repeat(2, 1fr); } .grid-cols-3 { grid-template-columns: repeat(3, 1fr); } .grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.w-full { width: 100%; } .h-full { height: 100%; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.p-4 { padding: 16px; } .p-6 { padding: 24px; }
.relative { position: relative; } .absolute { position: absolute; } .fixed { position: fixed; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 768px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .kpi-card .kpi-value { font-size: 1.5rem; }
}