﻿/* Modern UI theme for the Education Panel
   Focus: red-white brand, smooth interactions, quality buttons, menus, inputs.
   Non-breaking: works with existing markup; enhances default elements.
*/

:root {
  /* Brand palette (Navy Blue / Lacivert) */
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;
  --brand-900: #1e3a8a;

  /* Surfaces and effects */
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --border: rgba(255, 255, 255, 0.55);
  --line: #e5e7eb;

  --shadow-xs: 0 1px 2px rgba(17, 24, 39, .08);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 8px 16px rgba(16, 24, 40, .10), 0 2px 4px rgba(16, 24, 40, .06);
  --shadow-lg: 0 16px 32px rgba(16, 24, 40, .14);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --transition-fast: 160ms ease;
  --transition-normal: 220ms ease;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  accent-color: var(--brand-500);
  background-attachment: fixed;
}

header {
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid rgba(255, 255, 255, .24);
}

header .logo {
  height: 32px;
}

/* Cards / Panels (non-breaking: targets existing rounded containers) */
.rounded-lg,
.rounded-xl,
.rounded-2xl {
  background-color: var(--surface);
  backdrop-filter: saturate(1.15) blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Elevated cards on white-background pages (exclude login which is not bg-white) */
body.bg-white :where(section.rounded-lg, section.rounded-xl, section.rounded-2xl,
  div.rounded-lg, div.rounded-xl, div.rounded-2xl) {
  border: 1px solid color-mix(in oklab, #e5e7eb 70%, white 30%);
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-normal);
}

/* Stronger elevation for prominent panels */
body.bg-white :where(section.rounded-2xl, div.rounded-2xl) {
  box-shadow: var(--shadow-lg);
}

/* Optional interactive elevation on hover */
body.bg-white :where(section.rounded-lg, section.rounded-xl, section.rounded-2xl,
  div.rounded-lg, div.rounded-xl, div.rounded-2xl):hover {
  box-shadow: var(--shadow-lg);
}

/* Inputs */
input:not([type=checkbox]),
select,
textarea {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .55rem .75rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-300) 55%, white 45%);
  background: #fff;
}

input[type=checkbox] {
  appearance: auto;
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
}

/* Buttons (applies to all buttons; color comes from existing classes) */
button,
.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-sm);
  padding: .55rem .9rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform var(--transition-fast), box-shadow var(--transition-normal), filter var(--transition-normal), background var(--transition-fast);
  box-shadow: var(--shadow-xs);
  will-change: transform, box-shadow, filter;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button:active,
.btn:active {
  transform: translateY(0);
  filter: brightness(.98);
}

button:focus-visible,
.btn:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--brand-300) 50%, white 50%);
  outline-offset: 2px;
}

/* Predefined variants to use optionally */
.btn-primary {
  color: #fff;
  background-image: linear-gradient(90deg, var(--brand-600), var(--brand-700) 60%, var(--brand-800));
}

.btn-outline {
  color: var(--brand-800);
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--brand-300) 65%, white 35%);
}

.btn-outline:hover {
  background: var(--brand-50);
}

.btn-ghost {
  color: #fff;
  background: color-mix(in oklab, rgba(255, 255, 255, .18) 50%, transparent 50%);
}

.btn-ghost:hover {
  background: color-mix(in oklab, rgba(255, 255, 255, .28) 50%, transparent 50%);
}

/* Sidebar menu (non-breaking: styles links in aside lists) */
aside ul {
  display: grid;
  gap: .25rem;
}

aside ul a {
  display: block;
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  color: #374151;
  border: 1px solid transparent;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

aside ul a:hover {
  background: var(--brand-50);
  color: var(--brand-800);
  border-color: color-mix(in oklab, var(--brand-100) 60%, white 40%);
  box-shadow: var(--shadow-xs);
}

/* Treat anchors with bg-blue- (active) a bit stronger */
aside ul a[class*="bg-blue-"] {
  background: var(--brand-100);
  color: var(--brand-800);
  border-color: color-mix(in oklab, var(--brand-200) 60%, white 40%);
}

/* Header logout button (ghost style) */
header nav button {
  border-radius: var(--radius-sm);
  backdrop-filter: saturate(1.1);
}

/* Global mobile menu button style */
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .7rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, var(--brand-300) 70%, white 30%);
  color: var(--brand-700);
  background: transparent;
  white-space: nowrap;
  line-height: 1;
  font-size: .95rem;
}

.mobile-menu-btn:hover {
  background: var(--brand-50);
}

/* Manager role: default disable all menu items; enable only allowed */
body.manager-role aside.sidebar-main ul>li {
  opacity: .45;
  pointer-events: none;
  filter: grayscale(1);
}

body.manager-role aside.sidebar-main ul>li.manager-visible,
body.manager-role aside.sidebar-main ul>li.allow-manager {
  opacity: 1;
  pointer-events: auto;
  filter: none;
}

body.manager-role aside.sidebar-main ul>li.manager-disabled a {
  cursor: not-allowed;
}

/* Ensure dedicated mobile drawer/backdrop are hidden by default (desktop) */
#mobileNav {
  display: none;
}

.mobile-nav-backdrop {
  display: none;
}

/* Tables */
table thead tr {
  background: color-mix(in oklab, var(--brand-50) 60%, white 40%);
}

table th {
  color: #374151;
  font-weight: 600;
}

table td,
table th {
  border-bottom: 1px solid #f1f5f9;
}

/* Toasts or status text */
.text-blue-,
.text-blue- {
  font-weight: 500;
}

/* Utility helpers (optional) */
.shadow-hover:hover {
  box-shadow: var(--shadow-md);
}

.rounded-md-modern {
  border-radius: var(--radius-md);
}

.rounded-lg-modern {
  border-radius: var(--radius-lg);
}

/* Certificate preview canvas border refinement */
#certPreview {
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

/* Login form enhancements */
#loginForm input {
  caret-color: #fff;
}

.form-field .icon {
  width: 22px;
  height: 22px;
}

.form-field input.input-primary {
  padding-left: 2.75rem;
}

.form-field .toggle-pass {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: var(--brand-700);
  background: transparent;
  border: 1px solid var(--brand-300);
  border-radius: 0.375rem;
}

.form-field .toggle-pass:hover {
  background: var(--brand-50);
}

.input-lg {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  padding-right: 1rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Animated brand gradient background for page */
.animated-gradient {
  background-image: linear-gradient(165deg, var(--brand-400) 0%, var(--brand-500) 22%, var(--brand-600) 45%, var(--brand-700) 72%, var(--brand-900) 100%);
  background-size: 300% 300%;
  animation: brandGradientShift 10s ease-in-out infinite alternate;
}

@keyframes brandGradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 50% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

/* Card polish */
.card-modern {
  border: 1px solid color-mix(in oklab, var(--brand-200) 30%, white 70%);
  box-shadow: 0 10px 30px rgba(153, 27, 27, 0.25);
  border-radius: var(--radius-lg);
}

/* Colored summary card variants (stronger hues) */
.card-emerald {
  background-image: linear-gradient(180deg, #dcfce7 0%, #a7f3d0 55%, #ffffff 100%);
  border-color: #34d399;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.22);
}

.card-emerald .text-xl {
  color: #047857;
}

.card-emerald:hover {
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.28);
}

.card-blue {
  background-image: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 55%, #ffffff 100%);
  border-color: #60a5fa;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.22);
}

.card-blue .text-xl {
  color: #1d4ed8;
}

.card-blue:hover {
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.28);
}

.card-violet {
  background-image: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 55%, #ffffff 100%);
  border-color: #a78bfa;
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.22);
}

.card-violet .text-xl {
  color: #6d28d9;
}

.card-violet:hover {
  box-shadow: 0 16px 32px rgba(139, 92, 246, 0.28);
}

.card-amber {
  background-image: linear-gradient(180deg, #fef3c7 0%, #fde68a 55%, #ffffff 100%);
  border-color: #f59e0b;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.20);
}

.card-amber .text-xl {
  color: #b45309;
}

.card-amber:hover {
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.26);
}

/* Larger primary button */
.btn-primary {
  padding: 0.75rem 1rem;
  font-weight: 600;
}

/* Input-with-icon layout to center icons inside input */
.input-with-icon {
  position: relative;
}

.input-with-icon .icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon input.input-primary {
  padding-left: 3rem;
  width: 100%;
}

/* Bigger input size variant */
.input-xl {
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-right: 1rem;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
}

/* Toggle password button below input */
.toggle-pass-below {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: 0.35rem 0.75rem;
  font-size: .85rem;
  color: var(--brand-700);
  background: transparent;
  border: 1px solid var(--brand-300);
  border-radius: 0.5rem;
}

.toggle-pass-below:hover {
  background: var(--brand-50);
}

/* Mobile-only: white menu cards in red sidebar */
@media (max-width: 768px) {

  /* Sidebar linkleri mobilde daha kompakt olsun */
  .sidebar-main nav a {
    padding: .5rem .6rem;
  }
}

/* Global: mobile header normalization (menu left, title center, logout right) */
@media (max-width: 768px) {

  header .w-full,
  header>div {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: .5rem;
  }

  /* Push nav to right */
  header .w-full nav,
  header>div nav {
    margin-left: auto !important;
    position: static !important;
  }

  /* Compact menu button */
  header .w-full .mobile-menu-btn,
  header .w-full #menuBtn,
  header>div .mobile-menu-btn,
  header>div #menuBtn {
    margin-right: .75rem !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    font-size: .95rem !important;
  }
}

/* Modern sol menÃ¼ (Ã¶nce admin.html) */
.left-menu-modern .menu-panel {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08), 0 4px 12px rgba(17, 24, 39, 0.06);
  border-radius: 16px;
}

.left-menu-modern h2 {
  font-size: 0.95rem;
  color: #111827;
}

.left-menu-modern ul {
  margin-top: 0.75rem;
}

.left-menu-modern a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 12px;
  color: #374151;
  border: 1px solid transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease, color 0.2s ease;
}

.left-menu-modern a:hover {
  background: rgba(254, 242, 242, 0.9);
  /* red-50 benzeri */
  border-color: rgba(244, 63, 94, 0.18);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
  transform: translateX(2px);
}

.left-menu-modern a.active {
  background-image: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

/* KÄ±rmÄ±zÄ± tam ekran sol panel */
.sidebar-main {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  width: 18rem;
  /* w-72 */
  background-image: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-700) 40%, #172554 100%);
  color: #fff;
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.08);
  z-index: 30;
  transition: transform .2s ease;
}

.sidebar-main .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .10rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  margin-top: 0;
  margin-bottom: 6rem;
  width: 100%;
}

.sidebar-main .brand img {
  height: 70px;
  width: auto;
}

.sidebar-main .brand .title {
  font-weight: 600;
  font-size: 1rem;
}

.sidebar-main {
  display: flex;
  flex-direction: column;
}

.sidebar-main nav {
  padding: 0.5rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.sidebar-main nav ul {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.sidebar-main nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  width: 100%;
  background: transparent;
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: none;
  transition: background .2s ease, transform .15s ease, border-color .2s ease, color .2s ease;
}

.sidebar-main nav a .icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  color: #ffffff;
}

.sidebar-main nav a.active .icon {
  color: #b91c1c;
}

.sidebar-main nav a:hover {
  background: rgba(255, 255, 255, .10);
  color: #ffffff;
  border-color: rgba(255, 255, 255, .25);
  transform: translateX(2px);
}

.sidebar-main nav a.active {
  background: #ffffff;
  color: #b91c1c;
  border-color: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.10);
  font-weight: 600;
}

.sidebar-main nav a.active .icon {
  color: #b91c1c;
}

.sidebar-main .section-title {
  font-size: .75rem;
  opacity: .85;
  padding: 0.75rem 1rem 0.25rem;
  color: #fff;
}

.left-menu-modern a.active {
  background-image: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

/* Backdrop for mobile sidebar */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 40;
  display: none;
}

/* Mobile responsive: convert sidebar to off-canvas drawer */
@media (max-width: 768px) {

  /* Hide desktop sidebar entirely; use dedicated mobile drawer */
  aside.sidebar-main {
    display: none;
  }

  /* Mobile drawer (red) */
  #mobileNav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 85vw;
    max-width: 360px;
    background-image: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-700) 40%, #172554 100%);
    color: #fff;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .22s ease;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
  }

  #mobileNav .brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  #mobileNav .brand img {
    height: 56px;
    width: auto;
  }

  #mobileNav .close-btn {
    align-self: flex-end;
    padding: .4rem .6rem;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: none;
    transition: background .2s ease, transform .15s ease, border-color .2s ease;
  }

  #mobileNav .close-btn:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .35);
  }

  #mobileNav ul {
    display: flex;
    flex-direction: column;
    gap: .5rem;
  }

  #mobileNav a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem .9rem;
    border-radius: 14px;
    color: #fff;
    background: transparent;
    border: 1px solid transparent;
  }

  #mobileNav a .icon {
    width: 22px;
    height: 22px;
    color: #fff;
  }

  #mobileNav a:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .25);
  }

  #mobileNav a.active {
    background: #fff;
    color: #b91c1c;
    border-color: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.10);
  }

  #mobileNav a.active .icon {
    color: #b91c1c;
  }

  /* Mobile drawer backdrop */
  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 40;
    display: none;
  }

  body.mobile-open #mobileNav {
    transform: translateX(0);
  }

  body.mobile-open .mobile-nav-backdrop {
    display: block;
  }

  /* Remove left padding reserved for desktop sidebar */
  header>div {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  main {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Header iÃ§eriÄŸi taÅŸmasÄ±n */
  header .w-full {
    display: flex;
    flex-wrap: nowrap;
    align-items: center !important;
  }

  /* MenÃ¼ sol grupta, Ã‡Ä±kÄ±ÅŸ nav saÄŸa itilir */
  header .w-full>.flex:first-child {
    flex: 0 1 auto;
  }

  header .w-full nav {
    margin-left: auto !important;
    position: static !important;
  }

  header .w-full .mobile-menu-btn,
  header .w-full #menuBtn {
    margin-right: .75rem;
  }

  header nav {
    position: static !important;
    right: auto !important;
    top: auto !important;
    margin-top: .5rem;
  }

  header .brand img,
  header img[alt="Logo"] {
    max-width: 100%;
    height: auto;
  }



  /* Grid aralÄ±klarÄ± mobilde daralt */
  .grid {
    gap: .75rem;
  }

  /* BÃ¼yÃ¼k tablolar iÃ§in yatay kaydÄ±rma */
  table {
    width: 100%;
  }

  .table-modern,
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Uzun metinler satÄ±r kÄ±rabilsin */
  .break-words,
  .truncate,
  p,
  .text-sm {
    word-break: break-word;
  }


}

/* MenÃ¼ iÃ§inde kÃ¼Ã§Ã¼k rozet/ikon alanlarÄ± iÃ§in */
.left-menu-modern .badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 9999px;
  font-size: 11px;
  background: rgba(244, 63, 94, 0.10);
  color: #b91c1c;
  border: 1px solid rgba(244, 63, 94, 0.30);
}

.toggle-pass-below:hover {
  background: var(--brand-50);
}

.input-lg {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  padding-right: 1rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Animated brand gradient background for page */
.animated-gradient {
  background-image: linear-gradient(165deg, var(--brand-400) 0%, var(--brand-500) 22%, var(--brand-600) 45%, var(--brand-700) 72%, var(--brand-900) 100%);
  background-size: 300% 300%;
  animation: brandGradientShift 10s ease-in-out infinite alternate;
}

@keyframes brandGradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 50% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

/* Card polish */
.card-modern {
  border: 1px solid color-mix(in oklab, var(--brand-200) 30%, white 70%);
  box-shadow: 0 10px 30px rgba(153, 27, 27, 0.25);
  border-radius: var(--radius-lg);
}

/* Colored summary card variants (stronger hues) */
.card-emerald {
  background-image: linear-gradient(180deg, #dcfce7 0%, #a7f3d0 55%, #ffffff 100%);
  border-color: #34d399;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.22);
}

.card-emerald .text-xl {
  color: #047857;
}

.card-emerald:hover {
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.28);
}

.card-blue {
  background-image: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 55%, #ffffff 100%);
  border-color: #60a5fa;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.22);
}

.card-blue .text-xl {
  color: #1d4ed8;
}

.card-blue:hover {
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.28);
}

.card-violet {
  background-image: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 55%, #ffffff 100%);
  border-color: #a78bfa;
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.22);
}

.card-violet .text-xl {
  color: #6d28d9;
}

.card-violet:hover {
  box-shadow: 0 16px 32px rgba(139, 92, 246, 0.28);
}

.card-amber {
  background-image: linear-gradient(180deg, #fef3c7 0%, #fde68a 55%, #ffffff 100%);
  border-color: #f59e0b;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.20);
}

.card-amber .text-xl {
  color: #b45309;
}

.card-amber:hover {
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.26);
}

/* Larger primary button */
.btn-primary {
  padding: 0.75rem 1rem;
  font-weight: 600;
}

/* Input-with-icon layout to center icons inside input */
.input-with-icon {
  position: relative;
}

.input-with-icon .icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon input.input-primary {
  padding-left: 3rem;
  width: 100%;
}

/* Bigger input size variant */
.input-xl {
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-right: 1rem;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
}

/* Toggle password button below input */
.toggle-pass-below {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: 0.35rem 0.75rem;
  font-size: .85rem;
  color: var(--brand-700);
  background: transparent;
  border: 1px solid var(--brand-300);
  border-radius: 0.5rem;
}

.toggle-pass-below:hover {
  background: var(--brand-50);
}

/* Animated floating particles overlay for brand background */
.animated-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  mix-blend-mode: soft-light;
  background-image:
    radial-gradient(24px 24px at 12% 22%, rgba(255, 255, 255, 0.12), transparent 60%),
    radial-gradient(18px 18px at 78% 28%, rgba(255, 255, 255, 0.10), transparent 60%),
    radial-gradient(20px 20px at 42% 82%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(16px 16px at 66% 66%, rgba(255, 255, 255, 0.08), transparent 60%);
  background-size: 140% 140%;
  animation: particlesDrift 22s ease-in-out infinite alternate;
}

@keyframes particlesDrift {
  0% {
    background-position: 0% 0%;
  }

  50% {
    background-position: 50% 50%;
  }

  100% {
    background-position: 100% 100%;
  }
}

/* Utility: ensure hidden works even without Tailwind */
.hidden {
  display: none !important;
}

/* ===== Mobile Header Normalization (global override) ===== */
@media (max-width: 768px) {

  /* Make all header containers a single row */
  header .w-full,
  header>div {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: .5rem;
  }

  /* Push logout/nav to the right */
  header .w-full nav,
  header>div nav {
    margin-left: auto !important;
    position: static !important;
  }

  /* Keep menu button compact and on the left group */
  header .w-full .mobile-menu-btn,
  header .w-full #menuBtn,
  header>div .mobile-menu-btn,
  header>div #menuBtn {
    margin-right: .75rem !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    font-size: .95rem !important;
  }
}

#courseInfo {
  text-align: left;
  display: flex;
  flex-direction: column;
}

#courseInfo h2 {
  font-size: 1.25rem;
}

#courseInfo p {
  font-size: 1.25rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.course-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.course-title-icon {
  width: 36px;
  height: 36px;
  display: block;
}

.course-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ann-nav-btn {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid var(--brand-300);
  box-shadow: none;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.ann-nav-btn:hover {
  transform: translateY(-50%) translateY(-1px);
  filter: brightness(0.95);
}

.ann-nav-btn:active {
  filter: brightness(0.96);
}

.ann-nav-btn:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--brand-300) 55%, white 45%);
  outline-offset: 2px;
}

.ann-prev {
  left: 8px;
}

.ann-next {
  right: 8px;
}

.ann-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.ann-text {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  font-weight: 700;
  color: #1f2937;
  /* gray-800 */
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Mouse-following pointer markers overlay */
.pointer-markers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(60px at var(--mx) var(--my), rgba(255, 255, 255, 0.35), transparent 70%),
    radial-gradient(120px at calc(var(--mx) + 4%) calc(var(--my) + 2%), rgba(255, 255, 255, 0.18), transparent 75%),
    radial-gradient(200px at calc(var(--mx) - 6%) calc(var(--my) - 3%), rgba(255, 255, 255, 0.12), transparent 80%);
}

/* Animated diagonal lines overlay for background */
.animated-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  background-image: repeating-linear-gradient(120deg,
      rgba(255, 255, 255, 0.18) 0px,
      rgba(255, 255, 255, 0.18) 2px,
      transparent 2px,
      transparent 10px);
  background-size: 200% 200%;
  animation: linesMove 14s linear infinite;
}

@keyframes linesMove {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 100% 100%;
  }
}

.ann-nav-btn:hover {
  transform: translateY(-50%) translateY(-1px);
  filter: brightness(0.95);
}

.ann-nav-btn:active {
  filter: brightness(0.96);
}

.ann-nav-btn:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--brand-300) 55%, white 45%);
  outline-offset: 2px;
}

.ann-prev {
  left: 8px;
}

.ann-next {
  right: 8px;
}

.ann-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.ann-text {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  font-weight: 700;
  color: #1f2937;
  /* gray-800 */
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Announcements carousel layout and visibility */
.ann-carousel {
  position: relative;
  overflow: hidden;
}

.ann-slide {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.ann-slide[data-active="true"] {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.ann-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.ann-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #e5e7eb;
}

.ann-dot[aria-current="true"] {
  background: #ef4444;
}

/* Global mobile menu button (visible only on mobile widths) */
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .7rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, var(--brand-300) 70%, white 30%);
  color: var(--brand-700);
  background: transparent;
  box-shadow: none;
  z-index: 60;
  white-space: nowrap;
  line-height: 1;
  font-size: .95rem;
}

.mobile-menu-btn:hover {
  background: var(--brand-50);
}

@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Normalize legacy #menuBtn buttons across pages */
#menuBtn {
  display: inline-flex !important;
  align-items: center !important;
  gap: .4rem !important;
  padding: .4rem .7rem !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid color-mix(in oklab, var(--brand-300) 70%, white 30%) !important;
  color: var(--brand-700) !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 60 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  font-size: .95rem !important;
}

#menuBtn:hover {
  background: var(--brand-50) !important;
}

@media (min-width: 769px) {
  #menuBtn {
    display: none !important;
  }
}
