/* =============================================
   ADMIN PANEL - CUSTOM CSS
   ============================================= */

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --sidebar-width: 260px;
  --sidebar-bg: #1e1b4b;
  --navbar-height: 64px;
  --text-light: #a5b4fc;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
}

/* =============================================
   LOGIN PAGE
   ============================================= */

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrapper {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.login-box {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto 1rem;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.login-logo h2 {
  color: #1e293b;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.login-logo p {
  color: #64748b;
  font-size: 0.9rem;
}

.login-form .form-control {
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  padding: 0.75rem 1rem;
  transition: all 0.2s;
}

.login-form .form-control:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.login-btn {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 0.75rem !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4) !important;
}

.demo-credentials {
  text-align: center;
  margin-top: 1.5rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 10px;
  color: #64748b;
  border: 1px dashed #cbd5e1;
}

/* =============================================
   ADMIN LAYOUT
   ============================================= */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* =============================================
   SIDEBAR
   ============================================= */

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
}

.sidebar-logo i {
  font-size: 1.5rem;
  color: #a5b4fc;
}

.sidebar-close-btn {
  background: none;
  border: none;
  color: #a5b4fc;
  font-size: 1.1rem;
  cursor: pointer;
}

.sidebar-user {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.sidebar-avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-user-info strong {
  display: block;
  color: white;
  font-size: 0.9rem;
}

.sidebar-user-info small {
  color: var(--text-light);
  font-size: 0.78rem;
}

.sidebar-nav {
  list-style: none;
  padding: 1rem 0;
  flex: 1;
}

.sidebar-nav .nav-label {
  padding: 0.6rem 1.5rem 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(165, 180, 252, 0.5);
  margin-top: 0.5rem;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1.5rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: 0;
  transition: all 0.2s;
  font-size: 0.9rem;
  margin: 2px 0.75rem;
  border-radius: 10px;
}

.sidebar-nav li a:hover,
.sidebar-nav li.active a {
  background: rgba(79, 70, 229, 0.3);
  color: white;
}

.sidebar-nav li.active a {
  background: linear-gradient(135deg, rgba(79,70,229,0.5), rgba(124,58,237,0.3));
  color: white;
  font-weight: 600;
}

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

.logout-link:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* =============================================
   MAIN CONTENT
   ============================================= */

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* =============================================
   TOP NAVBAR
   ============================================= */

.top-navbar {
  height: var(--navbar-height);
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.sidebar-toggle-btn {
  background: none;
  border: 1.5px solid #e2e8f0;
  color: #64748b;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sidebar-toggle-btn:hover {
  background: #f1f5f9;
  color: #4f46e5;
}

.navbar-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
}

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

.user-dropdown-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.4rem 0.9rem;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.user-dropdown-btn:hover {
  background: #f1f5f9;
  border-color: #4f46e5;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

/* =============================================
   CONTENT AREA
   ============================================= */

.content-area {
  padding: 1.5rem;
  flex: 1;
}

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

.page-header h4 {
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* =============================================
   STAT CARDS
   ============================================= */

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid transparent;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-primary { border-left-color: #4f46e5; }
.stat-success { border-left-color: #10b981; }
.stat-warning { border-left-color: #f59e0b; }
.stat-danger  { border-left-color: #ef4444; }

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-primary .stat-icon { background: rgba(79,70,229,0.1); color: #4f46e5; }
.stat-success .stat-icon { background: rgba(16,185,129,0.1); color: #10b981; }
.stat-warning .stat-icon { background: rgba(245,158,11,0.1); color: #f59e0b; }
.stat-danger  .stat-icon { background: rgba(239,68,68,0.1);  color: #ef4444; }

.stat-info h3 {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.stat-info p {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0;
  font-weight: 500;
}

/* =============================================
   WELCOME BANNER
   ============================================= */

.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.welcome-banner h3 {
  font-size: 1.4rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.welcome-icon {
  font-size: 4rem;
  color: #fbbf24;
  opacity: 0.7;
  flex-shrink: 0;
}

/* =============================================
   CARDS
   ============================================= */

.card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
}

.card-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 1rem 1.25rem !important;
  border-radius: 14px 14px 0 0 !important;
}

/* =============================================
   TABLE
   ============================================= */

.table th {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  margin-right: 8px;
}

/* =============================================
   PROFILE AVATAR
   ============================================= */

.profile-avatar {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 auto;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .welcome-icon {
    display: none;
  }

  .stat-card {
    padding: 1rem;
  }
}

/* =============================================
   LEGAL PAGES
   ============================================= */

.legal-page-bg {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #dbeafe 0, #eef2ff 30%, #f8fafc 60%, #ffffff 100%);
}

.legal-hero h1 {
  font-weight: 800;
  color: #0f172a;
}

.legal-chip {
  display: inline-block;
  background: #0f172a;
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.4px;
}

.legal-card {
  border: 1px solid #dbe5f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.legal-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.legal-icon-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.legal-icon-green {
  background: #dcfce7;
  color: #15803d;
}

.legal-doc {
  background: #fff;
  border: 1px solid #dbe5f0;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.legal-doc-header {
  padding: 1.5rem;
  background: linear-gradient(120deg, #f8fafc, #eef2ff);
  border-bottom: 1px solid #dbe5f0;
}

.legal-doc-header h1 {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}

.legal-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.legal-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eef2f7;
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.6rem;
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
}

.legal-section p,
.legal-section li {
  color: #334155;
  line-height: 1.65;
}
