/* 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 (orange) centered on #eb9534 */
  --brand-50:  #fff4e8;
  --brand-100: #ffe7d1;
  --brand-200: #ffd0a3;
  --brand-300: #ffb26d;
  --brand-400: #ff9a45;
  --brand-500: #f3872f;
  --brand-600: #eb9534; /* requested primary */
  --brand-700: #cc7620;
  --brand-800: #a35b17;
  --brand-900: #6f3b0e;

  /* 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, 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;
}

/* 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-red-50 (active) a bit stronger */
aside ul a[class*="bg-red-50"] {
  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-red ul > li { opacity: .45; pointer-events: none; filter: grayscale(1); }
body.manager-role aside.sidebar-red ul > li.manager-visible, 
body.manager-role aside.sidebar-red ul > li.allow-manager { opacity: 1; pointer-events: auto; filter: none; }
body.manager-role aside.sidebar-red 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-red-600, .text-red-700 { 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-red 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: var(--brand-50);
  border-color: color-mix(in oklab, var(--brand-100) 60%, white 40%);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--brand-600) 18%, transparent 82%);
  transform: translateX(2px);
}
.left-menu-modern a.active {
  background-image: linear-gradient(90deg, var(--brand-600) 0%, var(--brand-700) 100%);
  color: #fff;
  border-color: color-mix(in oklab, var(--brand-700) 35%, white 65%);
  box-shadow: 0 6px 16px color-mix(in oklab, var(--brand-700) 35%, transparent 65%);
}
/* Kırmızı tam ekran sol panel */
.sidebar-red {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  height: 100vh;
  width: 18rem; /* w-72 */
  background-image: linear-gradient(180deg, var(--brand-700) 0%, var(--brand-600) 40%, var(--brand-900) 100%);
  color: #fff;
  box-shadow: 8px 0 24px rgba(0,0,0,0.08);
  z-index: 30;
  transition: transform .2s ease;
}
.sidebar-red .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-red .brand img { height: 120px; width:auto; }
.sidebar-red .brand .title { font-weight: 600; font-size: 1rem; }
.sidebar-red { display: flex; flex-direction: column; }
.sidebar-red nav { padding: 0.5rem 0.75rem; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: stretch; }
.sidebar-red nav ul { width: 100%; display: flex; flex-direction: column; gap: .35rem; }
.sidebar-red 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-red nav a .icon { width: 20px; height: 20px; display: inline-block; color: var(--brand-50); }
.sidebar-red nav a.active .icon { color: var(--brand-700); }
.sidebar-red nav a:hover {
  background: rgba(255,255,255,.10);
  color: #ffffff;
  border-color: rgba(255,255,255,.25);
  transform: translateX(2px);
}
.sidebar-red nav a.active {
  background: #ffffff;
  color: var(--brand-700);
  border-color: #ffffff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.10);
  font-weight: 600;
}
.sidebar-red nav a.active .icon { color: var(--brand-700); }
.sidebar-red .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, var(--brand-600) 0%, var(--brand-700) 100%);
  color: #fff;
  border-color: color-mix(in oklab, var(--brand-700) 35%, white 65%);
  box-shadow: 0 6px 16px color-mix(in oklab, var(--brand-700) 35%, transparent 65%);
}

/* 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) {
  .login-hero { display: none !important; }
  /* Hide desktop sidebar entirely; use dedicated mobile drawer */
  aside.sidebar-red { display: none; }
  .desktop-card { display: none !important; }
  .brand-logo-mobile { width: 100px; height: 56px; background-image: linear-gradient(90deg, var(--brand-600), var(--brand-400)); -webkit-mask-image: url('loginlogo.png'); mask-image: url('loginlogo.png'); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
  .mobile-card .form-field { margin-top: .25rem; }
  .mobile-card .form-field label { font-weight: 600; color: var(--brand-700); }
  .mobile-card .input-with-icon::before { content: ""; position: absolute; left: .5rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 9999px; background: var(--brand-50); border: 1px solid color-mix(in oklab, var(--brand-200) 60%, white 40%); }
  .mobile-card .input-with-icon .icon { left: .85rem; width: 20px; height: 20px; color: var(--brand-700); }
  .mobile-card .input-primary { background: #fff; border: 1px solid color-mix(in oklab, var(--brand-300) 40%, white 60%); border-radius: var(--radius-md); padding-top: .7rem; padding-bottom: .7rem; padding-right: 1rem; font-size: 1rem; box-shadow: var(--shadow-xs); }
  .mobile-card .input-with-icon input.input-primary { padding-left: 3rem; }
  .mobile-card .input-primary:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-300) 55%, white 45%); background: #fff; }
  .mobile-card input::placeholder { color: #9ca3af; }
  .mobile-card .toggle-pass-below { border-color: var(--brand-300); color: var(--brand-700); border-radius: 9999px; }

  /* Mobile drawer (blue) */
  #mobileNav {
    position: fixed; top: 0; left: 0; height: 100vh;
    width: 85vw; max-width: 360px;
    background-image: linear-gradient(180deg, var(--brand-700) 0%, var(--brand-600) 40%, var(--brand-900) 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: 90px; 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: var(--brand-50); }
  #mobileNav a:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }
  #mobileNav a.active { background: #fff; color: var(--brand-700); border-color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,0.10); }
#mobileNav a.active .icon { color: var(--brand-700); }

  /* 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; }


}
@media (min-width: 769px) { .mobile-card { display: none !important; } }
/* 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: var(--brand-500); }
/* 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; }
/* Login page: hide menu button */
.login-page #menuBtn, .login-page .mobile-menu-btn { display: none !important; }
@media (min-width: 769px) { #menuBtn { display: none !important; } }

/* Blue theme overrides for Tailwind red utilities */
/* Text colors */
.text-red-500 { color: var(--brand-500) !important; }
.text-red-600 { color: var(--brand-600) !important; }
.text-red-700 { color: var(--brand-700) !important; }
.text-red-800 { color: var(--brand-800) !important; }
.text-red-900 { color: var(--brand-900) !important; }

/* Background colors */
.bg-red-50  { background-color: var(--brand-50) !important; }
.bg-red-100 { background-color: var(--brand-100) !important; }
.bg-red-200 { background-color: var(--brand-200) !important; }
.bg-red-300 { background-color: var(--brand-300) !important; }
.bg-red-600 { background-color: var(--brand-600) !important; }
.bg-red-700 { background-color: var(--brand-700) !important; }
.bg-red-800 { background-color: var(--brand-800) !important; }

/* Border colors */
.border-red-100 { border-color: var(--brand-100) !important; }
.border-red-200 { border-color: var(--brand-200) !important; }
.border-red-300 { border-color: var(--brand-300) !important; }
.border-red-600 { border-color: var(--brand-600) !important; }

/* Hover variants (Tailwind escape required) */
.hover\:bg-red-50:hover  { background-color: var(--brand-50) !important; }
.hover\:bg-red-100:hover { background-color: var(--brand-100) !important; }
.hover\:bg-red-700:hover { background-color: var(--brand-700) !important; }
.hover\:text-red-800:hover { color: var(--brand-800) !important; }

/* Focus ring and border colors */
.focus\:ring-red-500:focus, .focus\:ring-red-500:focus-visible { --tw-ring-color: var(--brand-500) !important; }
.focus\:ring-red-600:focus, .focus\:ring-red-600:focus-visible { --tw-ring-color: var(--brand-600) !important; }
.focus\:border-red-500:focus, .focus\:border-red-500:focus-visible { border-color: var(--brand-500) !important; }
.focus\:border-red-600:focus, .focus\:border-red-600:focus-visible { border-color: var(--brand-600) !important; }

/* Gradient utilities to map red -> blue */
.from-red-600 { --tw-gradient-from: var(--brand-600) !important; --tw-gradient-to: rgb(37 99 235 / 0) !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
.via-red-700  { --tw-gradient-stops: var(--tw-gradient-from), var(--brand-700), var(--tw-gradient-to) !important; }
.to-red-800   { --tw-gradient-to: var(--brand-800) !important; }

/* Global icon defaults: make icons brand-colored site-wide */
.icon, .icon-md, .icon-sm, svg.icon { color: var(--brand-700); }

/* Make specific brand logos render in white regardless of original colors */
img[src$="loginlogo.png"],
img[src$="deneyimlogo.png"] {
  filter: brightness(0) invert(1);
}
@media (max-width: 768px) {
  .mobile-card img[src$="loginlogo.png"] { filter: none !important; }
}
