/* =============================================
   DREAM FAME - Project Tracker App
   Premium UI Design
   ============================================= */

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

:root {
  --primary: #1a3c6e;
  --primary-dark: #0f2a52;
  --primary-light: #2a5ca8;
  --accent: #e8a020;
  --accent-dark: #c8881a;
  --accent-light: #f5c842;
  --success: #00b894;
  --danger: #e17055;
  --warning: #fdcb6e;
  --purple: #6c5ce7;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --text: #2d3436;
  --text-light: #636e72;
  --border: #e8ecef;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: #f0f4f8; color: var(--text); min-height: 100vh; }

/* =============================================
   LOGIN & REGISTER PAGE
   ============================================= */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f2a52 0%, #1a3c6e 40%, #1a5ca8 70%, #e8a020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-page::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,160,32,0.15) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  border-radius: 50%;
}

.login-card {
  background: #fff;
  border-radius: 24px;
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
  position: relative;
  z-index: 1;
}

.login-logo { text-align: center; margin-bottom: 8px; }
.login-logo img { height: 64px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); }
.login-logo h1 { color: var(--primary); font-size: 1.5rem; font-weight: 800; margin-top: 12px; letter-spacing: -0.5px; }
.login-logo p { color: var(--text-light); font-size: 0.82rem; margin-top: 4px; }

.login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-divider span { color: var(--text-light); font-size: 0.78rem; }

.login-card h2 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin: 20px 0 20px; text-align: center; }

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

.form-control {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s;
  width: 100%;
  background: #fafbfc;
  color: var(--text);
}
.form-control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px rgba(26,60,110,0.08); background: #fff; }
.form-control::placeholder { color: #b2bec3; }

.btn-login-submit {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 15px rgba(26,60,110,0.3);
}
.btn-login-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(26,60,110,0.35); }
.btn-login-submit:active { transform: translateY(0); }

.forgot-link { text-align: center; margin-top: 14px; font-size: 0.83rem; color: var(--text-light); }
.forgot-link a { color: var(--primary); text-decoration: none; font-weight: 600; }
.forgot-link a:hover { color: var(--accent); }

.register-link-box {
  margin-top: 20px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(26,60,110,0.05), rgba(232,160,32,0.05));
  border-radius: var(--radius-sm);
  border: 1px solid rgba(26,60,110,0.1);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}
.register-link-box a { color: var(--accent); font-weight: 700; text-decoration: none; }

.alert { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 0.84rem; margin-top: 12px; display: none; }
.alert-danger { background: #fff5f5; border: 1.5px solid #feb2b2; color: #c53030; }
.alert-success { background: #f0fff4; border: 1.5px solid #9ae6b4; color: #276749; }

/* =============================================
   NAVBAR
   ============================================= */
.app-navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(15,42,82,0.3);
}

.navbar-brand-app { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.navbar-brand-app img { height: 40px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.navbar-brand-app span { color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.3px; }
.navbar-brand-app small { color: rgba(255,255,255,0.6); font-size: 0.7rem; display: block; font-weight: 400; margin-top: -2px; }

.navbar-right { display: flex; align-items: center; gap: 12px; }

.role-badge {
  background: var(--accent);
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(232,160,32,0.4);
}
.role-badge.engineer { background: var(--success); box-shadow: 0 2px 8px rgba(0,184,148,0.4); }
.role-badge.customer { background: var(--purple); box-shadow: 0 2px 8px rgba(108,92,231,0.4); }

.user-name { color: rgba(255,255,255,0.85); font-size: 0.85rem; font-weight: 500; }

.btn-logout {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.btn-logout:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }

/* =============================================
   TABS
   ============================================= */
.app-tabs {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.app-tabs-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 0; overflow-x: auto; }

.tab-btn {
  background: none; border: none;
  padding: 16px 20px;
  font-size: 0.86rem; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--primary); background: rgba(26,60,110,0.03); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* =============================================
   LAYOUT
   ============================================= */
.app-container { max-width: 1200px; margin: 0 auto; padding: 28px 20px; }

.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.7rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.page-header p { color: var(--text-light); font-size: 0.88rem; margin-top: 4px; }

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

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
.stat-card.accent::before { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.stat-card.success::before { background: linear-gradient(90deg, var(--success), #55efc4); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), #a29bfe); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon-wrap {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(26,60,110,0.08), rgba(26,60,110,0.04));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-card.accent .stat-icon-wrap { background: linear-gradient(135deg, rgba(232,160,32,0.12), rgba(232,160,32,0.04)); }
.stat-card.success .stat-icon-wrap { background: linear-gradient(135deg, rgba(0,184,148,0.12), rgba(0,184,148,0.04)); }
.stat-card.purple .stat-icon-wrap { background: linear-gradient(135deg, rgba(108,92,231,0.12), rgba(108,92,231,0.04)); }

.stat-icon { font-size: 1.8rem; }
.stat-info h3 { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1; letter-spacing: -1px; }
.stat-card.accent .stat-info h3 { color: var(--accent-dark); }
.stat-card.success .stat-info h3 { color: var(--success); }
.stat-card.purple .stat-info h3 { color: var(--purple); }
.stat-info p { font-size: 0.78rem; color: var(--text-light); margin-top: 3px; font-weight: 500; }

/* =============================================
   CARD BOX
   ============================================= */
.card-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}
.card-box-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fafbfc, #fff);
}
.card-box-header h2 { font-size: 1rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.card-box-header h2 i { color: var(--accent); }
.card-box-body { padding: 24px; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  letter-spacing: 0.2px;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 4px 12px rgba(26,60,110,0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,60,110,0.3); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: #fff; box-shadow: 0 4px 12px rgba(232,160,32,0.3); }
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(232,160,32,0.35); }
.btn-success { background: linear-gradient(135deg, var(--success), #55efc4); color: #fff; box-shadow: 0 4px 12px rgba(0,184,148,0.25); }
.btn-success:hover { transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg, var(--danger), #fab1a0); color: #fff; box-shadow: 0 4px 12px rgba(225,112,85,0.25); }
.btn-danger:hover { transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.78rem; border-radius: 8px; }

/* =============================================
   TABLE
   ============================================= */
.app-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.app-table thead { background: linear-gradient(135deg, #f8f9fa, #f0f4f8); }
.app-table th { padding: 13px 16px; text-align: left; font-size: 0.75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.8px; border-bottom: 2px solid var(--border); }
.app-table td { padding: 15px 16px; border-bottom: 1px solid #f5f5f5; vertical-align: middle; color: var(--text); }
.app-table tbody tr:hover td { background: rgba(26,60,110,0.02); }
.app-table tbody tr:last-child td { border-bottom: none; }

/* =============================================
   BADGES
   ============================================= */
.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: inline-block;
}
.badge-planning { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.badge-progress { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.badge-completed { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge-admin { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.badge-engineer { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge-customer { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,42,82,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { transform: scale(0.95) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.modal-header {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fafbfc, #fff);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.modal-close { background: rgba(0,0,0,0.06); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--text-light); display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.modal-close:hover { background: rgba(0,0,0,0.12); color: var(--text); }
.modal-body { padding: 26px; }
.modal-footer { padding: 18px 26px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: #fafbfc; }

/* =============================================
   UPLOAD ZONE
   ============================================= */
.upload-zone {
  border: 2px dashed #c8d6e5;
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: linear-gradient(135deg, #f8fafc, #f0f4f8);
  display: block;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(26,60,110,0.04), rgba(26,60,110,0.02));
}
.upload-zone i { font-size: 2.8rem; color: var(--primary); margin-bottom: 14px; display: block; opacity: 0.7; }
.upload-zone p { color: var(--text-light); font-size: 0.9rem; }
.upload-zone span { color: var(--primary); font-weight: 700; }

.upload-progress { margin-top: 16px; display: none; }
.progress-bar-wrap { background: #e9ecef; border-radius: 10px; height: 10px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }
.progress-bar-fill { background: linear-gradient(90deg, var(--primary), var(--accent)); height: 100%; border-radius: 10px; transition: width 0.3s; width: 0%; }
.progress-text { font-size: 0.8rem; color: var(--text-light); margin-top: 8px; text-align: center; font-weight: 500; }

/* =============================================
   MEDIA GALLERY
   ============================================= */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }

.media-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.25s;
}
.media-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.media-thumb {
  width: 100%; height: 160px;
  object-fit: cover; display: block; cursor: pointer;
  transition: transform 0.3s;
}
.media-card:hover .media-thumb { transform: scale(1.03); }

.media-thumb-video {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, var(--dark), #2d3436);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; overflow: hidden;
}
.media-thumb-video::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,60,110,0.6), rgba(232,160,32,0.3));
}
.media-thumb-video i { font-size: 2.8rem; color: rgba(255,255,255,0.9); position: relative; z-index: 1; }

.media-info { padding: 12px 14px; }
.media-note { font-size: 0.84rem; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-meta { font-size: 0.74rem; color: var(--text-light); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.media-actions { display: flex; gap: 6px; margin-top: 10px; }

/* =============================================
   PROJECT CARDS
   ============================================= */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }

.project-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(26,60,110,0.2); }

.project-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.project-card-header::after {
  content: '🏗️';
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  opacity: 0.2;
}
.project-card-header h3 { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.project-card-header p { color: rgba(255,255,255,0.75); font-size: 0.78rem; display: flex; align-items: center; gap: 5px; }

.project-card-body { padding: 16px 20px; }
.project-meta { display: flex; flex-direction: column; gap: 8px; }
.project-meta-item { display: flex; align-items: center; gap: 9px; font-size: 0.82rem; color: var(--text-light); }
.project-meta-item i { width: 16px; color: var(--primary); flex-shrink: 0; }

.project-card-footer { padding: 14px 20px; border-top: 1px solid #f5f5f5; display: flex; justify-content: space-between; align-items: center; background: #fafbfc; }

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(10px);
}
.lightbox.active { display: flex; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 90vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  color: rgba(255,255,255,0.8);
  font-size: 2rem; cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: none; border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #b2bec3;
}
.empty-state i { font-size: 3.5rem; margin-bottom: 16px; display: block; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

.no-data { text-align: center; padding: 48px; color: #b2bec3; font-size: 0.9rem; }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

input[type="file"] { display: none; }

.preview-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preview-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border); box-shadow: var(--shadow-sm); }
.preview-video-thumb { width: 80px; height: 80px; background: var(--dark); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.preview-video-thumb i { color: rgba(255,255,255,0.7); font-size: 1.4rem; }

/* =============================================
   LOADING
   ============================================= */
.loading-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loading {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: var(--text-light);
}
.page-loading .spinner {
  width: 44px; height: 44px;
  border: 4px solid rgba(26,60,110,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.page-loading p { font-size: 0.88rem; font-weight: 500; }

/* =============================================
   TOAST
   ============================================= */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }

.toast {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  min-width: 270px;
  animation: toastIn 0.3s ease;
  border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast i { font-size: 1.1rem; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* =============================================
   MISC UTILITIES
   ============================================= */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted { color: var(--text-light); font-size: 0.83rem; }
.fw-600 { font-weight: 600; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }
.gap-2 { gap: 8px; }

.section-title {
  font-size: 1rem; font-weight: 700; color: var(--primary);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--border), transparent); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .app-container { padding: 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .projects-grid { grid-template-columns: 1fr; }
  .user-name { display: none; }
  .card-box-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .app-table { font-size: 0.82rem; }
  .login-card { padding: 32px 24px; }
  .app-navbar { padding: 0 16px; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
  .modal-box { border-radius: 16px; }
}
