:root{
  --bg:#f5f8fc;
  --card:#ffffff;
  --text:#172033;
  --muted:#64748b;
  --primary:#0f766e;
  --primary2:#0d9488;
  --primary-soft:#ecfdf5;
  --blue:#2563eb;
  --purple:#7c3aed;
  --border:#e2e8f0;
  --ok:#16a34a;
  --warn:#d97706;
  --radius:20px;
  --shadow:0 12px 32px rgba(15,23,42,.07);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:linear-gradient(180deg,#f7fbff 0%,var(--bg) 100%);
  color:var(--text);
}
a{text-decoration:none;color:inherit}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
#kayro-app{min-height:100vh}

/* ANA GENISLIK */
.kayro-shell{
  width:min(1280px,calc(100% - 32px));
  margin:0 auto;
  padding:24px 0 48px;
}

/* HEADER */
.kayro-topbar{
  background:linear-gradient(135deg,#0f766e 0%,#0b7285 100%);
  color:#fff;
  position:sticky;
  top:0;
  z-index:900;
  box-shadow:0 8px 24px rgba(15,23,42,.16);
}
.kayro-topbar-inner{
  width:min(1280px,calc(100% - 32px));
  margin:0 auto;
  min-height:104px;
  padding:15px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.brand{display:flex;align-items:center;gap:16px;min-width:320px}
.brand-logo{
  width:74px;height:74px;border-radius:20px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.20);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.brand-text h1{margin:0;color:#fff;font-size:1.85rem;line-height:1.05;letter-spacing:-.02em}
.brand-text p{margin:7px 0 0;color:rgba(255,255,255,.9);font-weight:650}
.brand-text .sub{margin-top:7px;color:#99f6e4;font-size:.74rem;font-weight:900;letter-spacing:.16em;text-transform:uppercase}
.kayro-nav{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.kayro-nav button{
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.10);
  color:#fff;
  border-radius:14px;
  padding:11px 15px;
  font-weight:800;
  transition:.18s ease;
}
.kayro-nav button:hover{background:#fff;color:#0f766e;transform:translateY(-1px)}

/* HERO */
.kayro-hero{
  padding:42px;
  border-radius:28px;
  background:linear-gradient(135deg,#eff6ff 0%,#eef2ff 48%,#f0fdfa 100%);
  border:1px solid #dbeafe;
  box-shadow:var(--shadow);
  margin-bottom:26px;
}
.kayro-kicker{
  display:inline-flex;
  font-weight:900;
  color:var(--blue);
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:.8rem;
}
.kayro-hero h1,.kayro-hero h2{
  margin:10px 0 14px;
  font-size:clamp(2.2rem,5vw,4rem);
  line-height:1.04;
  letter-spacing:-.04em;
  color:#111c33;
}
.kayro-hero p{
  max-width:1000px;
  margin:0;
  color:var(--muted);
  line-height:1.75;
  font-size:1.06rem;
}
.kayro-actions{display:flex;flex-wrap:wrap;gap:11px;margin-top:24px}

/* BUTTONS */
.kayro-btn{
  border:0;
  border-radius:13px;
  padding:12px 16px;
  cursor:pointer;
  font-weight:850;
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:#fff;
  box-shadow:0 8px 18px rgba(15,118,110,.14);
  transition:.18s ease;
}
.kayro-btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(15,118,110,.18)}
.kayro-btn.primary{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff}
.kayro-btn.secondary{background:#fff;color:var(--text);border:1px solid var(--border);box-shadow:none}
.kayro-btn.secondary:hover{border-color:#99f6e4;background:#f0fdfa;color:#0f766e}

/* GENEL KART / SECTION */
.kayro-card,.kayro-section,.kayro-soft-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--shadow);
}
.kayro-section{padding:28px;margin-top:24px}
.kayro-section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 18px}
.kayro-section-title h2,.kayro-section-title h3{margin:0;color:#172033;font-size:1.65rem;letter-spacing:-.02em}

/* AI KARTI */
.ai-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding:24px;
  border:1px solid #ddd6fe;
  border-radius:22px;
  background:linear-gradient(135deg,#faf5ff 0%,#ffffff 75%);
}
.ai-left{display:flex;align-items:center;gap:18px;min-width:0}
.ai-icon{
  width:72px;height:72px;min-width:72px;border-radius:20px;
  display:grid;place-items:center;font-size:32px;
  background:linear-gradient(135deg,#ede9fe,#ddd6fe);
}
.ai-card h4{margin:0;font-size:1.35rem;color:#172033}
.ai-card p{margin:9px 0 0;color:var(--muted);line-height:1.65}

/* ISTATISTIKLER */
.kayro-stat-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.kayro-stat{
  min-width:0;
  padding:22px 16px;
  border-radius:18px;
  border:1px solid var(--border);
  background:#f8fafc;
  text-align:center;
}
.kayro-stat.blue{background:#eff6ff;border-color:#dbeafe}
.kayro-stat.green{background:#f0fdf4;border-color:#dcfce7}
.kayro-stat.purple{background:#faf5ff;border-color:#ede9fe}
.kayro-stat strong{display:block;font-size:1.85rem;line-height:1;color:#172033}
.kayro-stat span{display:block;margin-top:8px;color:var(--muted);font-size:.9rem;font-weight:650}
.progress-track{height:10px;background:#e2e8f0;border-radius:99px;overflow:hidden;margin-top:8px}
.progress-bar{height:100%;width:0;background:linear-gradient(90deg,var(--primary),var(--primary2));transition:.3s}

/* MODULLER */
.module-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.module-card{
  cursor:pointer;
  transition:.2s ease;
  min-height:255px;
  display:flex;
  flex-direction:column;
  padding:22px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:0 8px 24px rgba(15,23,42,.05);
  overflow:hidden;
}
.module-card:hover{transform:translateY(-4px);border-color:#bfdbfe;box-shadow:0 16px 36px rgba(15,23,42,.10)}
.module-no{
  display:inline-flex;
  width:max-content;
  padding:7px 10px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:900;
  font-size:.76rem;
  letter-spacing:.04em;
}
.module-card h3,.module-card h4{margin:14px 0 9px;font-size:1.13rem;line-height:1.35;color:#172033}
.module-card p{margin:0 0 18px;color:var(--muted);font-size:.92rem;line-height:1.62;flex:1}
.module-actions{margin-top:auto;display:flex;gap:9px}
.module-actions .kayro-btn{width:100%}
.badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:6px 9px;
  border-radius:999px;
  background:#ecfdf5;
  color:#047857;
  font-size:.76rem;
  font-weight:800;
}

/* ATLAS */
.atlas-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.atlas-btn{
  min-height:80px;
  border:1px solid var(--border);
  background:#fff;
  padding:16px 12px;
  border-radius:16px;
  cursor:pointer;
  font-weight:850;
  color:#172033;
  box-shadow:0 5px 16px rgba(15,23,42,.04);
  transition:.18s ease;
}
.atlas-btn:hover{border-color:#5eead4;background:#f0fdfa;transform:translateY(-2px)}
.atlas-btn small{display:block;margin-top:5px;color:var(--muted);font-weight:750}

/* AI OGRETMEN EKRANI */
.kayro-modern-shell{max-width:1480px;margin:0 auto}
.kayro-teacher-layout{display:grid;grid-template-columns:minmax(390px,42%) 1fr;min-height:800px}
.kayro-teacher-left{background:#fff}
.kayro-answer-panel{background:linear-gradient(180deg,#f8fbff 0%,#fff 28%)}
.kayro-question-box{background:#fff;border:1px solid #d9e3ef;border-radius:16px}
.kayro-mode-card{background:linear-gradient(135deg,#f8f7ff,#fff);border:1px solid #e5ddff;border-radius:20px}
.kayro-green-card{border:1px solid #86efac;background:linear-gradient(135deg,#ecfdf5,#f7fff9);box-shadow:0 10px 28px rgba(16,185,129,.08)}
.kayro-purple-card{border:1px solid #ddd6fe;background:linear-gradient(135deg,#f5f3ff,#fff);box-shadow:0 10px 28px rgba(124,58,237,.08)}
.kayro-blue-card{border:1px solid #bfdbfe;background:linear-gradient(135deg,#eff6ff,#fff)}
.kayro-gradient-button{background:linear-gradient(135deg,#7c3aed,#4f46e5)!important;color:#fff!important;border:none!important;box-shadow:0 10px 24px rgba(79,70,229,.22)}
.ai-mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:20px}
.ai-mode-btn{border:1px solid #dbe4ef;background:#fff;color:#334155;border-radius:14px;padding:13px 12px;font-weight:850;cursor:pointer}
.ai-mode-btn.active{background:linear-gradient(135deg,#0f766e,#0d9488);color:#fff;border-color:transparent;box-shadow:0 8px 18px rgba(13,148,136,.16)}
.reg-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.reg-quick{border:1px solid #99f6e4;background:#f0fdfa;color:#115e59;border-radius:12px;padding:11px;text-align:left;font-weight:750;cursor:pointer}
.reg-quick:hover{background:#ccfbf1}

/* QUIZ */
.quiz-option{display:block;width:100%;text-align:left;margin:8px 0;padding:13px;border-radius:13px;border:1px solid var(--border);background:#fff;cursor:pointer;transition:.18s ease}
.quiz-option:hover{border-color:#bfdbfe;background:#f8fbff}
.quiz-option.correct{border-color:#86efac;background:#f0fdf4}
.quiz-option.wrong{border-color:#fca5a5;background:#fef2f2}
.notice{padding:13px 15px;border-radius:13px;background:#fff7ed;color:#9a3412;font-size:.88rem;line-height:1.6;margin-top:18px;border:1px solid #fed7aa}

/* MODAL / DERS */
.kayro-modal{position:fixed;inset:0;background:rgba(15,23,42,.55);display:none;align-items:center;justify-content:center;padding:18px;z-index:1000}
.kayro-modal.open{display:flex}
.kayro-modal-box{background:#fff;border-radius:20px;max-width:900px;width:100%;max-height:88vh;overflow:auto;padding:24px}
.kayro-close{float:right;border:0;background:#f1f5f9;border-radius:10px;padding:8px 11px;cursor:pointer}
.lesson-steps{display:grid;gap:10px;margin:18px 0}
.lesson-step{padding:12px;border:1px solid var(--border);border-radius:12px;background:#f8fafc}

@media(max-width:1050px){
  .kayro-topbar-inner{align-items:flex-start;flex-direction:column}
  .kayro-nav{justify-content:flex-start}
  .kayro-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kayro-teacher-layout{grid-template-columns:1fr}
  .kayro-teacher-left{border-right:0!important;border-bottom:1px solid #dbe4ef}
}

@media(max-width:700px){
  .kayro-shell,.kayro-topbar-inner{width:min(100% - 20px,1280px)}
  .kayro-hero{padding:24px}
  .kayro-section{padding:20px}
  .ai-card,.ai-left{align-items:flex-start}
  .ai-card{flex-direction:column}
  .module-grid{grid-template-columns:1fr}
  .atlas-grid{grid-template-columns:1fr 1fr}
  .reg-quick-grid,.ai-mode-switch{grid-template-columns:1fr}
}

@media(max-width:520px){
  .brand{min-width:0}
  .brand-logo{width:62px;height:62px}
  .brand-text h1{font-size:1.5rem}
  .kayro-nav button{padding:9px 11px;font-size:.9rem}
  .kayro-stat-grid{grid-template-columns:1fr!important}
  .atlas-grid{grid-template-columns:1fr}
}