/* 25Thirty Learning Design System Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  /* Color System */
  --navy: #18233F;
  --teal: #F26B38;
  --teal-hover: #D95625;
  --warm-white: #FFF8F1;
  --white: #FFFFFF;
  --slate: #475569;
  --soft-border: #E2E8F0;
  
  /* Accents */
  --amber: #D97706;
  --amber-alert: #FEF9C3;
  --amber-text: #78350F;
  --green: #2FA66D;
  --coral: #F58A6A;
  --red: #D94C4C;
  --soft-blue: #FFF8F1;
  --dark-blue: #101726;

  /* Theme mappings for 25Thirty Learning */
  --bg-main: var(--warm-white);
  --bg-card: var(--white);
  --text-main: var(--navy);
  --text-muted: var(--slate);
  --border-color: var(--soft-border);
  
  /* Fonts */
  --font-family: 'Inter', Arial, Helvetica, sans-serif;
  --font-headings: 'Manrope', 'Inter', Arial, Helvetica, sans-serif;
  
  /* Shadows & Radius */
  --radius-card: 16px;
  --radius-button: 12px;
  --shadow-subtle: 0 4px 12px rgba(24, 35, 63, 0.04);
  --transition: all 0.2s ease-in-out;
}

body.dark-mode {
  --bg-main: #101726;
  --bg-card: #18233F;
  --text-main: #FFF8F1;
  --text-muted: #A0AEC0;
  --border-color: #2D3748;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  font-weight: 400;
  transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  color: var(--text-main);
  margin-bottom: 0.5em;
  text-transform: none; /* Sentence case enforced */
}

h1 {
  font-size: 32px;
  font-weight: 700;
}

h2 {
  font-size: 24px;
  font-weight: 600;
}

h3 {
  font-size: 18px;
  font-weight: 600;
}

p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Layout Utilities */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background-color: var(--navy);
  color: var(--white);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar .brand {
  margin-bottom: 32px;
}

.sidebar .brand-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.sidebar .brand-endorsement {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.sidebar .nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #94A3B8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-button);
  transition: var(--transition);
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
  color: var(--white);
  background-color: rgba(45, 156, 145, 0.15);
  border-left: 3px solid var(--teal);
}

.sidebar .nav-link svg {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  background-color: var(--bg-main);
  transition: var(--transition);
}

/* Landing Header & Navbar */
.landing-header {
  background-color: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.landing-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.landing-brand-name {
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
}

.landing-nav {
  display: flex;
  gap: 24px;
}

.landing-nav a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.landing-nav a:hover {
  color: var(--white);
}

.landing-nav-actions {
  display: flex;
  gap: 12px;
}

/* Landing Sections */
.landing-section {
  padding: 64px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 70vh;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 18px;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-trust {
  font-size: 13px;
  color: var(--slate);
}

.hero-visual-container {
  background-color: var(--navy);
  border-radius: var(--radius-card);
  padding: 32px;
  color: var(--white);
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-visual-container h3 {
  color: var(--white);
  margin-bottom: 16px;
}

.mock-screen-shot {
  background-color: #111E2E;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: monospace;
  font-size: 12px;
  color: var(--teal);
}

/* Card components */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(7, 17, 31, 0.06);
}

/* 25Thirty Card Variations */
.card-action {
  border: 2px solid var(--teal);
  box-shadow: 0 6px 20px rgba(45, 156, 145, 0.08);
}
.card-info {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
}
.card-progress {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
}

/* Consistency indicators */
.consistency-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.consistency-dots {
  display: flex;
  gap: 8px;
}
.consistency-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border-color);
  transition: var(--transition);
}
.consistency-dot.completed {
  background-color: var(--teal);
  box-shadow: 0 0 4px rgba(45, 156, 145, 0.4);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  padding: 10px 20px;
  min-height: 40px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--teal);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--teal-hover);
}

.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--bg-main);
}

.btn-tertiary {
  background-color: transparent;
  color: var(--teal);
  padding: 6px 12px;
  min-height: auto;
}

.btn-tertiary:hover {
  text-decoration: underline;
}

.btn-destructive {
  background-color: transparent;
  border-color: var(--red);
  color: var(--red);
}

.btn-destructive:hover {
  background-color: rgba(239, 68, 68, 0.05);
}

.btn-lg {
  padding: 12px 24px;
  min-height: 44px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 12px;
  min-height: 32px;
  font-size: 13px;
  border-radius: 8px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--bg-card);
  color: var(--text-main);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 156, 145, 0.15);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Tabs */
.tab-container {
  margin-top: 24px;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
  margin-bottom: 24px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  font-weight: 600;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Table Style */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  background-color: var(--bg-card);
  margin-top: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background-color: rgba(7, 17, 31, 0.02);
  padding: 16px 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 16px 24px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

tr:hover td {
  background-color: rgba(7, 17, 31, 0.01);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 17, 31, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  padding: 32px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 20px 48px rgba(7, 17, 31, 0.15);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.2s ease-out;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

/* Helper System & Miscellaneous UI */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: sentence;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #047857; /* Darker green for WCAG AA compliance */
}

.badge-warning {
  background-color: rgba(217, 119, 6, 0.1);
  color: #B45309; /* Darker amber/orange for WCAG AA compliance */
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #DC2626; /* Darker red for WCAG AA compliance */
}

.badge-primary {
  background-color: rgba(45, 156, 145, 0.1);
  color: #1B6E66; /* Darker teal for WCAG AA compliance */
}

/* Programming Sandbox styling */
.editor-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 24px;
  min-height: 480px;
}

.code-editor-panel {
  background-color: #0A192F;
  border-radius: var(--radius-card);
  padding: 24px;
  color: #FAF8F2;
  display: flex;
  flex-direction: column;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.code-input {
  flex: 1;
  width: 100%;
  background-color: transparent;
  color: #E2E8F0;
  border: none;
  font-family: 'Consolas', 'Courier New', Courier, monospace;
  font-size: 14px;
  resize: none;
  outline: none;
  line-height: 1.5;
}

.test-cases-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.test-case-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
}

/* Chat & Messaging UI */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 500px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(7, 17, 31, 0.01);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.chat-bubble.sent {
  align-self: flex-end;
  background-color: var(--teal);
  color: var(--white);
  border-bottom-right-radius: 2px;
}

.chat-bubble.received {
  align-self: flex-start;
  background-color: var(--bg-main);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
  border: 1px solid var(--border-color);
}

.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

/* Mobile responsive menu */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    overflow-y: visible;
  }
  .sidebar-footer {
    display: none;
  }
  .main-content {
    padding: 16px;
  }
  .editor-container {
    grid-template-columns: 1fr;
  }
  .hero-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-title {
    font-size: 32px;
  }
  .landing-nav {
    display: none;
  }
  .top-actions button, .safeguarding-report-btn {
    min-height: 44px;
  }
}
.sidebar:not(.mobile-nav-open) .nav-links.active-role-nav {}

/* Centered container with max-width limit for standard dashboards */
.dashboard-container {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--teal) !important;
  outline-offset: 2px !important;
}

/* Dropdown Menu Transition Styles */
#teacher-class-dropdown, #student-profile-dropdown {
  display: block !important;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#teacher-class-dropdown.show-dropdown, #student-profile-dropdown.show-dropdown {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Empty State Cards */
.empty-state-card {
  text-align: center;
  padding: 48px 24px;
  background-color: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-card);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state-card .icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}

.empty-state-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.empty-state-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* App Body Layout Wrapper */
.app-body {
  display: flex;
  flex: 1;
  flex-direction: row;
  overflow: hidden;
}

@media (max-width: 768px) {
  .app-body {
    flex-direction: column;
    overflow: visible;
  }
}
