/**
 * Model Pulse Blue - Complete Design System
 * Exact replica of OnlyAppFront design
 */

/* ==============================
   🔤 Typography - Poppins + Nunito Sans
============================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Nunito+Sans:wght@400;600;700&display=swap');

/* ==============================
   🎨 CSS Variables - Light Mode
============================== */
:root {
  /* Background colors */
  --bg: #f7f8fa;
  --bg-page: #f6f7fb;
  
  /* Text colors */
  --text: #1a1a1a;
  --muted: #5f6368;
  
  /* Surface colors */
  --secondary: #ffffff;
  --backgroundCard: #ffffff;
  --card: #ffffff;
  --card-hover: #f1f2f6;
  --border: rgba(0, 0, 0, 0.06);
  
  /* Primary - Purple corporate (#6d28e7 lightened 8%) */
  --primary: #7c3aed;
  --primary-hover: #6d28e7;
  --primary-light: rgba(124, 58, 237, 0.1);
  --accent: #9b7aff;
  
  /* Status colors */
  --success: #22c55e;
  --success-light: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-light: rgba(59, 130, 246, 0.1);
  
  /* Grey scale */
  --grey: #c2c2c2;
  --grey-light: #e5e7eb;
  
  /* Sidebar */
  --sidebar-bg: #ffffff;
  --sidebar-option-bg: #f0f0ff;
  --sidebar-width: 260px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ==============================
   🌙 Dark Mode Variables
============================== */
.dark {
  --bg: #0e0e11;
  --bg-page: #0f0f12;
  --text: #eaeaea;
  --muted: #a0a0a0;
  --secondary: #18181c;
  --backgroundCard: #1a1a1f;
  --card: #1b1b21;
  --card-hover: #24242c;
  --border: rgba(255, 255, 255, 0.08);
  --primary: #8b5cf6;
  --primary-hover: #a78bfa;
  --primary-light: rgba(139, 92, 246, 0.15);
  --sidebar-bg: #18181c;
  --sidebar-option-bg: rgba(139, 92, 246, 0.15);
  --grey: #4a4a4a;
  --grey-light: #2d2d2d;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

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

html, body {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==============================
   📝 Typography Classes
============================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* ==============================
   🔘 Buttons - Model Pulse Style
============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--card-hover);
  border-color: var(--primary);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary-light);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #16a34a;
  transform: translateY(-1px);
}

.btn-danger, .btn-destructive {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--warning);
  color: white;
}

.btn-warning:hover:not(:disabled) {
  background: #d97706;
  transform: translateY(-1px);
}

.btn-info {
  background: var(--info);
  color: white;
}

.btn-info:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--card-hover);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--primary);
  border: none;
}

.btn-icon:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
}

/* ==============================
   📦 Cards - Model Pulse Style
============================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
}

/* ==============================
   📝 Forms & Inputs - Model Pulse Style
============================== */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--backgroundCard);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:hover,
input:hover,
select:hover,
textarea:hover {
  border-color: var(--primary);
}

.form-input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Select */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%235f6368'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* ==============================
   📊 Tables - Model Pulse Style
============================== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

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

thead {
  background: var(--bg-page);
}

th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--card-hover);
}

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

/* ==============================
   🏷️ Badges & Status - Model Pulse Style
============================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

.badge-muted {
  background: var(--grey-light);
  color: var(--muted);
}

/* Status dot */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  cursor: help;
}

.status-dot.active {
  background: var(--success);
  box-shadow: 0 0 7px var(--success);
}

.status-dot.inactive {
  background: var(--danger);
  box-shadow: 0 0 7px var(--danger);
}

/* Status labels */
.status-label {
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  text-transform: capitalize;
  font-size: 0.85rem;
}

.status-label.status-pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ff9800;
}

.status-label.status-progress {
  background: rgba(33, 150, 243, 0.15);
  color: #1976d2;
}

.status-label.status-delivered {
  background: rgba(0, 200, 83, 0.15);
  color: #2e7d32;
}

.status-label.status-approved {
  background: rgba(156, 39, 176, 0.15);
  color: #8e24aa;
}

.status-label.status-rejected {
  background: rgba(244, 67, 54, 0.15);
  color: #d32f2f;
}

.status-label.status-canceled {
  background: rgba(158, 158, 158, 0.15);
  color: #616161;
}

/* ==============================
   🗂️ Layout - Login Page - Model Pulse Style
============================== */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  padding: 1rem;
}

.login-card {
  width: min(420px, 92vw);
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.25rem;
  box-shadow: var(--shadow-lg);
}

.login-card .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.login-card .logo-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card .logo-icon i {
  font-size: 1.5rem;
  color: var(--primary);
}

.login-card .logo-text {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.login-card .title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--text);
}

.login-card .subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 0 1.5rem 0;
}

.login-card .field {
  margin-bottom: 1rem;
}

.login-card .field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.login-card .submit-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.login-card .submit-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.login-card .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-card .divider {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

.login-card .aux {
  margin: 1rem 0 0.75rem;
  text-align: center;
}

.login-card .aux .link,
.login-card .bottom .link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.login-card .aux .link:hover,
.login-card .bottom .link:hover {
  text-decoration: underline;
}

.login-card .bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-align: center;
}

.login-card .error-msg {
  text-align: center;
  color: var(--danger);
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Demo users section */
.login-card .demo-users {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.login-card .demo-users-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-card .demo-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.login-card .demo-user:hover {
  background: rgba(124, 58, 237, 0.15);
}

.login-card .demo-user.admin { background: var(--primary-light); }
.login-card .demo-user.worker { background: var(--success-light); }
.login-card .demo-user.model { background: var(--warning-light); }

.login-card .demo-user .role-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.login-card .demo-user.admin .role-badge {
  background: var(--primary);
  color: white;
}

.login-card .demo-user.worker .role-badge {
  background: var(--success);
  color: white;
}

.login-card .demo-user.model .role-badge {
  background: var(--warning);
  color: white;
}

.login-card .demo-user .email {
  font-size: 0.9rem;
  color: var(--text);
}

.login-card .demo-password {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* ==============================
   🗂️ Layout - App Shell - Model Pulse Style
============================== */
.app-container {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

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

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-icon i {
  font-size: 1.25rem;
  color: var(--primary);
}

.sidebar-logo-text {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section-title {
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius-md);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.sidebar-item:hover {
  background: var(--sidebar-option-bg);
  color: var(--primary);
  text-decoration: none;
}

.sidebar-item.active {
  background: var(--primary);
  color: white;
}

.sidebar-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: var(--muted);
}

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

/* Header */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
}

.header-icon-btn:hover {
  background: var(--card-hover);
  color: var(--primary);
}

.header-icon-btn .badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Page Content */
.page-content {
  flex: 1;
  padding: 1.5rem;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
}

.page-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ==============================
   📱 Mobile Bottom Navigation
============================== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 100;
}

.bottom-nav-items {
  display: flex;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.bottom-nav-item i {
  font-size: 1.25rem;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* ==============================
   🔲 Modal / Dialog - Model Pulse Style
============================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(20, 20, 30, 0.7) 0%, rgba(10, 10, 20, 0.85) 100%);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: min(480px, 100%);
  max-height: 90vh;
  overflow: hidden;
  animation: glassPop 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--primary);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Modal Form styling */
.modal-form {
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-form h2 {
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-form .subtitle {
  margin-top: 0.1rem;
  margin-bottom: 0.2rem;
  color: var(--muted);
}

.modal-form .field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.modal-form .field label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.modal-form .actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.2rem;
}

.modal-form .cancel-btn {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.modal-form .cancel-btn:hover {
  background: var(--primary-light);
}

.modal-form .primary-btn {
  background: var(--primary);
  color: white;
  border: none;
}

.modal-form .primary-btn:hover {
  background: var(--primary-hover);
}

/* ==============================
   🍞 Toast Notifications
============================== */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  min-width: 280px;
  max-width: 400px;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }

.toast i {
  font-size: 1.25rem;
}

.toast-success i { color: var(--success); }
.toast-error i { color: var(--danger); }
.toast-warning i { color: var(--warning); }
.toast-info i { color: var(--info); }

.toast-message {
  flex: 1;
  font-size: 0.9rem;
}

/* ==============================
   📊 KPI Cards - Model Pulse Style
============================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.kpi-icon.purple {
  background: var(--primary-light);
  color: var(--primary);
}

.kpi-icon.green {
  background: var(--success-light);
  color: var(--success);
}

.kpi-icon.yellow {
  background: var(--warning-light);
  color: var(--warning);
}

.kpi-icon.blue {
  background: var(--info-light);
  color: var(--info);
}

.kpi-badge {
  font-size: 0.7rem;
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}

.kpi-footer {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ==============================
   🎯 Avatar
============================== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.1rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.5rem; }

/* ==============================
   🔄 Loading & Spinner
============================== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
}

.loading-text {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ==============================
   🎬 Animations
============================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glassPop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeMask {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==============================
   📱 Responsive
============================== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .header {
    padding-left: 1rem;
  }
  
  .menu-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
  }
  
  .bottom-nav {
    display: block;
  }
  
  .main-content {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  
  .page-content {
    padding: 1rem;
  }
  
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .modal {
    width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-top: auto;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .header-right .btn span {
    display: none;
  }
}

/* ==============================
   🔧 Utilities
============================== */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==============================
   🌙 Dark Mode Specific Overrides
============================== */
.dark .sidebar,
.dark .header {
  background: var(--secondary);
}

.dark a,
.dark span,
.dark label,
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: var(--text);
}

.dark select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a0a0a0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* Platform Icons Colors */
.platform-instagram { color: #E4405F; }
.platform-tiktok { color: #000000; }
.dark .platform-tiktok { color: #ffffff; }
.platform-twitter { color: #1DA1F2; }
.platform-onlyfans { color: #00AFF0; }
.platform-youtube { color: #FF0000; }
.platform-telegram { color: #0088cc; }
.platform-facebook { color: #1877F2; }
