/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================= BODY ================= */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: url('../images/banner-img11.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Overlay (login page only) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Dashboard pages don't use the login background/overlay at all */
.dashboard-page {
  background: #f3f4f6 !important;
}

.dashboard-page::before {
  content: none;
}

/* ================= LOGIN / REGISTER ================= */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Glass Box */
.login-box {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  padding: 40px;
  border-radius: 12px;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);

  width: 100%;
  max-width: 420px;

  text-align: center;
  color: #fff;
}

/* Logo */
.logo {
  margin-bottom: 20px;
}

.logo img {
  max-width: 120px;
}

/* Heading */
.login-box h2 {
  margin-bottom: 10px;
  font-size: 26px;
}

.login-box p {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 20px;
}

/* Form */
.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

/* Inputs */
.form-group input {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
}

/* Focus Fix */
.form-group input:focus {
  outline: none;
  border: 1px solid #3498db;
}

/* Remember */
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Button */
.login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;

  background: linear-gradient(to right, #0072ff, #00c6ff);

  color: white;
  font-size: 16px;

  cursor: pointer;
  transition: 0.3s;
}

.login-btn:hover {
  opacity: 0.9;
}

/* Links */
.forgot-password {
  display: block;
  margin-top: 15px;
  color: #ddd;
  text-decoration: none;
  font-size: 14px;
}

.forgot-password:hover {
  color: #fff;
}

/* Messages */
.error-message {
  background: rgba(255, 0, 0, 0.2);
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

.success-message {
  background: rgba(0, 255, 0, 0.2);
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* ================= DASHBOARD SHELL (SIDEBAR + MAIN) ================= */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-logo {
  height: 30px;
  width: auto;
  fill: #0072ff;
}

.sidebar-brand-text {
  font-weight: 700;
  font-size: 16px;
  color: #111827;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.sidebar-section {
  margin-bottom: 18px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 0 12px;
  margin-bottom: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: 0.15s;
  margin-bottom: 2px;
}

.sidebar-link i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.sidebar-link:hover {
  background: #f3f4f6;
  color: #111827;
}

.sidebar-link.active {
  background: linear-gradient(to right, #0072ff, #00c6ff);
  color: #ffffff;
}

/* ---- Main area ---- */
.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.topbar-user-info {
  text-align: right;
}

.topbar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.topbar-user-email {
  font-size: 12px;
  color: #6b7280;
}

.main-content {
  flex: 1;
  padding: 24px;
}

/* ================= STATS GRID ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
  padding: 20px;
}

.stat-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #0072ff, #00c6ff);
}

/* ================= CHARTS SECTION ================= */
.charts-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.chart-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
  padding: 20px;
}

.chart-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
}

/* ================= DASHBOARD (legacy simple card layout, unused by sidebar pages) ================= */
.dashboard-container {
  min-height: 100vh;
  padding: 50px 20px;
}

.dashboard-card {
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e5e7eb;
}

.dashboard-header h2 {
  margin: 0;
  color: #333;
}

.dashboard-content {
  padding: 30px;
}

.dashboard-content h3 {
  margin-bottom: 10px;
  color: #333;
}

.dashboard-content p {
  color: #666;
  font-size: 16px;
}

/* Logout Button */
.logout-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
}

.logout-btn:hover {
  background: #b91c1c;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .sidebar {
    width: 76px;
  }

  .sidebar-brand-text,
  .sidebar-section-title,
  .sidebar-link span {
    display: none;
  }

  .topbar-user-email {
    display: none;
  }

  .sidebar-link {
    justify-content: center;
  }

  .sidebar-link i {
    font-size: 18px;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: 25px;
  }

  .dashboard-content {
    padding: 20px;
  }
}