/* SGM Enterprise LMS - Corporate Theme */
:root {
  --bg-main: #0b1120;
  --bg-surface: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-blue: #0284c7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --border-subtle: #334155;
  --border-active: #38bdf8;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Header Navbar */
.lms-navbar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  font-weight: 900;
  font-size: 18px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.brand-text p {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-item {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
}

.nav-item:hover, .nav-item.active {
  color: var(--accent-cyan);
  background-color: var(--bg-card);
  text-decoration: none;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 15px;
  border-left: 1px solid var(--border-subtle);
}

.user-info {
  text-align: right;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.user-role {
  font-size: 11px;
  color: var(--accent-emerald);
}

.btn-logout {
  background-color: #334155;
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.btn-logout:hover {
  background-color: var(--accent-rose);
  color: #ffffff;
  text-decoration: none;
}

/* Breadcrumb Navigation */
.breadcrumb-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 28px;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb-bar a {
  color: var(--text-muted);
}

.breadcrumb-bar a:hover {
  color: var(--accent-cyan);
}

.breadcrumb-bar .sep {
  margin: 0 8px;
  color: #64748b;
}

.breadcrumb-bar .current {
  color: var(--text-main);
  font-weight: 600;
}

/* Main Container */
.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px;
  width: 100%;
  flex: 1;
}

/* Hero / Announcement Banner */
.hero-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hero-tag {
  display: inline-block;
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.hero-banner h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.hero-banner p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 850px;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

/* Cards */
.lms-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.lms-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-active);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.card-icon {
  font-size: 28px;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: #334155;
  color: #cbd5e1;
}

.badge-priority {
  background-color: rgba(244, 63, 94, 0.2);
  color: #fb7185;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.lms-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.lms-card p {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 16px;
}

.card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Progress bar */
.progress-bar {
  background-color: #334155;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  height: 100%;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  text-decoration: none;
}

/* Lesson & Video View */
.lesson-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 25px;
}

@media (max-width: 900px) {
  .lesson-layout {
    grid-template-columns: 1fr;
  }
}

.video-container {
  background-color: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.video-container video {
  width: 100%;
  height: auto;
  max-height: 520px;
  display: block;
  background-color: #000000;
}

/* Player Loading Overlay */
.player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 17, 32, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Floating Watermark */
.video-watermark {
  position: absolute;
  top: 20px;
  right: 25px;
  pointer-events: none;
  font-family: monospace;
  font-size: 11px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 5;
}

/* Curriculum Sidebar */
.curriculum-sidebar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  height: fit-content;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 15px;
}

.module-group {
  margin-bottom: 15px;
}

.module-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.unit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.unit-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  text-decoration: none;
}

.unit-item.active {
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  font-weight: 600;
  border-left: 3px solid var(--accent-cyan);
}

.unit-icon {
  font-size: 14px;
}

/* Login Form Styles */
.login-box {
  max-width: 440px;
  margin: 50px auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 35px 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.form-group {
  margin-bottom: 20px;
}

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

.form-input {
  width: 100%;
  padding: 10px 14px;
  background-color: #1e293b;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
}

.alert-box {
  background-color: rgba(244, 63, 94, 0.15);
  border: 1px solid var(--accent-rose);
  color: #fca5a5;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 20px;
}

.demo-credentials-box {
  margin-top: 25px;
  padding: 14px;
  background-color: #1e293b;
  border: 1px dashed var(--accent-cyan);
  border-radius: 8px;
  font-size: 12px;
}
