/*
  Common theme for Lecturer UI
  - Keep backend PHP intact, only UI/UX styles
  - Bootstrap 5 compatible
*/

:root {
  /* Dark dashboard background */
  --les-bg-start: #0b1324;
  --les-bg-end: #0e1b33;
  --les-body-bg: radial-gradient(800px 400px at 10% -10%, rgba(31,64,154,.25) 0%, transparent 60%),
                  radial-gradient(1000px 500px at 110% 10%, rgba(88,28,135,.22) 0%, transparent 60%),
                  linear-gradient(180deg, var(--les-bg-start), var(--les-bg-end));

  /* Surfaces */
  --les-surface: rgba(248, 250, 253, 0.92);
  --les-surface-muted: rgba(241, 245, 255, 0.75);
  --les-border: rgba(255, 255, 255, 0.4);
  --les-card-shadow: 0 20px 40px rgba(2,6,23,.25), 0 2px 8px rgba(0,0,0,.08);
  --les-primary: #0d6efd;
  --les-pill-bg: #e7ecfb;
}

/* Base layout for all non-auth pages (navbar present) */
body:not(.auth-bg) {
  background: var(--les-body-bg);
  background-attachment: fixed;
  padding-top: 64px; /* space for fixed-top navbar */
  min-height: 100vh;
  color: #0b2a4a;
}

/* Scoped background for auth pages to avoid affecting dashboard layouts */
.auth-bg {
  background: radial-gradient(1200px 600px at 10% -10%, #e6f0ff 0%, transparent 60%),
              radial-gradient(1200px 600px at 110% 10%, #f8f5ff 0%, transparent 60%),
              #f3f6fb;
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.login-container {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px 20px 20px 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    position: relative;
    text-align: center;
}

.logo-container {
    margin-bottom: 10px;
}

.login-form h2 {
    margin-bottom: 10px;
}

.login-container h5, .login-container h3, .login-container h4 {
    margin-bottom: 5px; /* Adjust the space between headings */
}

.form-group {
    margin-bottom: 15px;
}

@media (max-width: 576px) {
    .login-container {
        width: 92%;
        padding: 20px;
        border-radius: 10px;
    }

    .login-form h2 { font-size: 1.5rem; }
    .btn-block { width: 100%; }
    .logo-container img { width: 100px; }
}

@media (min-width: 577px) and (max-width: 768px) {
    .login-container {
        padding: 20px;
        border-radius: 10px;
    }

    .login-form h2 {
        font-size: 1.75rem;
    }

    .btn-block {
        width: 100%;
    }
    .login-container2 {
        background-color: rgba(255, 255, 255, 0.8);
        padding: 30px 20px 20px 20px;
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        width: 100%;
        max-width: 500px;
        position: relative;
        text-align: center;
    }
    h1, h2, h4, h5 {
        font-family: 'Arial', sans-serif;
        color: #333;
        margin-bottom: 1rem;
    }
}

/* Shared dashboard helpers */
.page-container { max-width: 1100px; margin: 0 auto; }
.hero { text-align: center; margin-bottom: 1rem; }
.card { box-shadow: var(--les-card-shadow); border: 1px solid var(--les-border); backdrop-filter: saturate(140%) blur(4px); }

/* Brand/logo sizing used across pages */
.logo-container img, .brand-logo {
  max-width: 120px;
  width: 120px;
  height: auto;
}

/* Content wrapper used by analysis and schedule pages */
.content-card {
  background: var(--les-surface);
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(12, 20, 38, 0.32), 0 8px 20px rgba(12, 20, 38, 0.14);
  border: 1px solid var(--les-border);
  backdrop-filter: saturate(150%) blur(8px);
  overflow-x: auto; /* allow wide tables to scroll within */
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.section-card {
  background: var(--les-surface);
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(12, 20, 38, 0.26), 0 6px 16px rgba(12, 20, 38, 0.12);
  border: 1px solid var(--les-border);
  backdrop-filter: saturate(140%) blur(6px);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.table thead th { background-color: #2c3e50; color: #fff; }
.table-hover tbody tr:hover { background: rgba(0,0,0,.025); }
.table-responsive { overflow-x: auto; }

/* Buttons */
.btn-outline-success { border-width: 2px; }
.btn-outline-success:hover { color: #fff; }

/* Light navbar override for consistent visual theme */
.navbar-glass-dark {
  background: linear-gradient(180deg, rgba(12,20,38,.95), rgba(12,20,38,.9)) !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: saturate(150%) blur(6px);
}
.navbar-glass-dark .navbar-brand, .navbar-glass-dark .nav-link { color: #eef3ff; }
.navbar-glass-dark .nav-link:hover { color: #bcd0ff; }
.navbar-glass-dark .btn-outline-primary { color: #bcd0ff; border-color: #bcd0ff; }
.navbar-glass-dark .btn-outline-primary:hover { color: #0b1324; background: #bcd0ff; }

/* Pills and badges */
.pill { background: var(--les-pill-bg); color: #0b2a4a; border-radius: 10px; padding: .5rem .75rem; display: inline-block; }
.muted { color: #6c757d; }
.divider { height: 1px; background: rgba(0,0,0,.06); margin: 1rem 0; }

/* Metric cards */
.metric { background: var(--les-surface-muted); border: 1px solid var(--les-border); border-radius: 12px; padding: 1rem 1.25rem; box-shadow: 0 14px 24px rgba(12, 20, 38, 0.18); transition: box-shadow 160ms ease; }
.metric .value { font-size: 2.25rem; font-weight: 700; color: #3a5ccc; }
.metric .label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #7481a8; }

.chart-inline {
  position: relative;
  width: 100%;
  min-height: 420px;
}
.chart-inline canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-statistics {
  background: rgba(233, 241, 255, 0.94);
  border: 1px solid rgba(11, 42, 74, 0.06);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 18px 36px rgba(12, 20, 38, 0.26), 0 6px 16px rgba(12, 20, 38, 0.12);
}
.chart-statistics .stat-heading {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #0b2a4a;
}
.stat-cards .stat-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(234, 247, 255, 0.94));
  border: 1px solid rgba(11, 42, 74, 0.06);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 18px 28px rgba(12, 20, 38, 0.2);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.stat-card h6 {
  font-size: 0.95rem;
  margin: 0;
  color: #1b2d59;
}
.stat-score {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: #3a5ccc;
}
.stat-detail {
  font-size: 0.85rem;
  color: #586a90;
  margin: 0;
}

.comment-grid .comment-card {
  background: var(--les-surface-muted);
  border: 1px solid var(--les-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 16px 28px rgba(12,20,38,.22);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.comment-card p {
  color: #0b2a4a;
  font-size: 0.95rem;
}

@media (max-width: 576px) {
  .content-card {
    padding: 1.25rem;
  }
  .section-card {
    padding: 1rem;
  }
  .pill {
    align-self: flex-start;
  }
  .stat-cards .stat-card {
    padding: 0.85rem;
  }
  .chart-inline {
    min-height: 320px;
  }
}

@media (max-width: 768px) {
  .content-card + .content-card {
    margin-top: 1.5rem;
  }
  .metric {
    padding: 0.875rem 1rem;
  }
  .metric .value {
    font-size: 1.75rem;
  }
  .stat-score {
    font-size: 1.3rem;
  }
  .chart-inline {
    min-height: 360px;
  }
}

@media (hover: hover) {
  .content-card:hover,
  .section-card:hover,
  .stat-cards .stat-card:hover,
  .metric:hover,
  .comment-grid .comment-card:hover {
    box-shadow: 0 28px 52px rgba(12, 20, 38, 0.38), 0 10px 24px rgba(12, 20, 38, 0.18);
    transform: translateY(-4px);
  }
}
