:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #17324d;
  background: #eef6fb;
  --blue: #1769aa;
  --sky: #e4f4fb;
  --navy: #17324d;
  --green: #3f9b75;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 0, #d9f2ee, transparent 34%), #eef6fb;
}
header {
  height: 76px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #d8e7ef;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand strong {
  font-size: 25px;
}
.brand small {
  display: block;
  color: #668094;
}
.mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  font-weight: 900;
  font-size: 26px;
}
main {
  max-width: 1180px;
  margin: 36px auto;
  padding: 0 22px;
}
.panel {
  background: #fff;
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 18px 50px #21435e18;
}
.login {
  max-width: 560px;
  margin: 70px auto;
}
.badge {
  display: inline-block;
  border-radius: 99px;
  background: #dff1f8;
  color: #17618f;
  padding: 8px 13px;
  font-weight: 700;
  font-size: 13px;
}
h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 16px 0 10px;
}
p {
  line-height: 1.55;
  color: #587185;
}
input {
  width: 100%;
  border: 2px solid #c9dce8;
  border-radius: 15px;
  padding: 16px;
  font-size: 18px;
  outline: none;
}
input:focus {
  border-color: var(--blue);
}
button {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.login button {
  width: 100%;
  margin-top: 12px;
}
.ghost {
  background: #e8f3f8;
  color: var(--navy);
}
.hidden {
  display: none !important;
}
.message {
  min-height: 24px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(125deg, #fff, #e2f6f3);
  border-radius: 28px;
  padding: 28px;
}
.deva {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
  font-size: 25px;
}
.deva small {
  font-size: 13px;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.book-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: auto;
  align-items: stretch;
}
.book-open input,
.book-open button {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}
.book-open button {
  margin-top: 0;
  white-space: normal;
}
.button-link {
  display: inline-block;
  margin-top: 14px;
  border-radius: 14px;
  padding: 14px 18px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  text-decoration: none;
}
.deva-help {
  grid-column: 1 / -1;
}
.pdf-page{width:100%;height:min(72vh,900px);border:1px solid #cfe0ee;border-radius:16px;background:#eef5fa}.homework-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.homework-actions button{width:auto;flex:1 1 190px}
textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 2px solid #c9dce8;
  border-radius: 15px;
  padding: 16px;
  font: inherit;
  outline: none;
}
textarea:focus {
  border-color: var(--blue);
}
nav button {
  background: #fff;
  color: var(--navy);
}
nav button.active {
  background: var(--blue);
  color: #fff;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: #fff;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 10px 26px #21435e12;
}
.card h3 {
  margin: 4px 0 8px;
}
.card .meta {
  font-size: 14px;
  color: #668094;
}
.card button {
  width: 100%;
  margin-top: 14px;
}
.modal {
  position: fixed;
  inset: 0;
  background: #10283bbd;
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 10;
}
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  max-width: 700px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  padding: 28px;
}
.close {
  position: absolute;
  right: 14px;
  top: 14px;
  background: #edf4f7;
  color: #17324d;
  font-size: 20px;
  padding: 8px 13px;
}
.qr {
  display: flex;
  justify-content: center;
  padding: 16px;
}
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.photos img {
  width: 100%;
  border-radius: 12px;
}
.success {
  color: #16833b;
  font-weight: 800;
}
.warn {
  color: #a35a00;
  font-weight: 700;
}
@media (max-width: 620px) {
  main {
    margin-top: 20px;
  }
  .hero {
    align-items: flex-start;
  }
  .deva {
    width: 82px;
    height: 82px;
    font-size: 18px;
  }
  .panel {
    padding: 24px;
  }
}

.brand { text-decoration: none; }
.brand-wordmark { display: grid; grid-template-columns: auto auto; column-gap: 7px; align-items: baseline; line-height: 1; }
.brand-wordmark strong { font-size: 25px; letter-spacing: -1px; background: linear-gradient(135deg,#062a84,#0879d8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-wordmark span { font-size: 18px; font-weight: 800; letter-spacing: 3px; color: #123d86; }
.brand-wordmark small { grid-column: 1 / -1; margin-top: 6px; padding-top: 5px; border-top: 2px solid #f49a24; color: #668094; font-size: 11px; letter-spacing: 1.2px; }
.deva-profile { display: flex; align-items: center; gap: 13px; padding: 9px 16px 9px 9px; background: #fff; border: 1px solid #d6e9f3; border-radius: 24px; box-shadow: 0 12px 35px #1769aa1c; }
.deva-profile img { width: 92px; height: 92px; object-fit: cover; object-position: 50% 34%; border-radius: 18px; }
.deva-profile strong { display: block; font-size: 24px; color: #0b4d96; letter-spacing: 1px; }
.deva-profile small { display: block; margin-top: 5px; color: #668094; font-weight: 700; white-space: nowrap; }
@media (max-width: 620px) { .deva-profile { padding: 7px; border-radius: 18px; } .deva-profile img { width: 70px; height: 70px; } .deva-profile strong { display: none; } .deva-profile small { font-size: 10px; white-space: normal; max-width: 70px; text-align: center; } }


/* FIX WEB-MOBIL PARITY: Android Compose renkleri ve kart dili */
.role-student { --role:#1769aa; --role-soft:#eaf4ff; --role-accent:#59bdf5; }
.role-teacher { --role:#239866; --role-soft:#eaf8f0; --role-accent:#6bd388; }
.role-parent { --role:#7045c8; --role-soft:#f2ecff; --role-accent:#9b63f1; }

.role-student,
.role-teacher,
.role-parent {
  color:#15324a;
  background:
    radial-gradient(circle at 100% 0, var(--role-soft), transparent 38%),
    #f8fbff;
  -webkit-tap-highlight-color:transparent;
}
.role-student header,
.role-teacher header,
.role-parent header {
  min-height:76px;
  height:auto;
  position:sticky;
  top:0;
  z-index:8;
  backdrop-filter:blur(14px);
  background:#ffffffee;
}
.role-student main,
.role-teacher main,
.role-parent main { max-width:1120px; }
.role-student .hero,
.role-teacher .hero,
.role-parent .hero {
  background:linear-gradient(135deg,#fff,var(--role-soft));
  border:1px solid color-mix(in srgb,var(--role) 16%,#fff);
  box-shadow:0 14px 38px color-mix(in srgb,var(--role) 13%,transparent);
}
.role-student .badge,
.role-teacher .badge,
.role-parent .badge { background:var(--role-soft); color:var(--role); }
.role-student button:not(.ghost):not(.close),
.role-teacher button:not(.ghost):not(.close),
.role-parent button:not(.ghost):not(.close),
.role-student .button-link,
.role-teacher .button-link,
.role-parent .button-link {
  background:linear-gradient(135deg,var(--role-accent),var(--role));
  min-height:48px;
  border-radius:16px;
  box-shadow:0 8px 18px color-mix(in srgb,var(--role) 22%,transparent);
}
.role-student nav button,
.role-teacher nav button,
.role-parent nav button {
  background:#fff;
  color:#15324a;
  box-shadow:0 8px 22px #183b6312;
  border:1px solid #e4edf5;
}
.role-student nav button.active,
.role-teacher nav button.active,
.role-parent nav button.active {
  background:linear-gradient(135deg,var(--role-accent),var(--role));
  color:#fff;
  border-color:transparent;
}
.role-student .card,
.role-teacher .card,
.role-parent .card {
  border:1px solid #e5edf5;
  box-shadow:0 12px 28px #183b6312;
}
.role-student .card h3,
.role-teacher .card h3,
.role-parent .card h3 { color:var(--role); }
.role-hero .deva-profile img { object-fit:contain; background:var(--role-soft); }
.role-hero .deva-profile strong { color:var(--role); }

.role-student nav button::before,
.role-teacher nav button::before,
.role-parent nav button::before {
  display:inline-block;
  margin-right:8px;
  font-size:20px;
  vertical-align:-2px;
}
button[data-view="homeworks"]::before { content:"📋"; }
button[data-view="books"]::before { content:"📚"; }
button[data-view="archive"]::before { content:"🗂️"; }
button[data-view="devaHelp"]::before { content:"🤖"; }
button[data-view="notifications"]::before { content:"🔔"; }
button[data-view="zoomMeetings"]::before,
button[data-view="zoom"]::before { content:"🎥"; }
button[data-view="classTasks"]::before { content:"🏅"; }
button[data-view="pending"]::before { content:"✅"; }
button[data-view="classes"]::before { content:"👥"; }
button[data-view="newHomework"]::before { content:"✏️"; }
button[data-view="given"]::before { content:"📤"; }
button[data-view="bot"]::before,
button[data-view="settings"]::before { content:"⚙️"; }

@media (max-width:700px) {
  .role-student header,
  .role-teacher header,
  .role-parent header {
    padding:8px 14px;
    gap:8px;
  }
  .role-student main,
  .role-teacher main,
  .role-parent main {
    margin:14px auto 28px;
    padding:0 14px;
  }
  .role-student .hero,
  .role-teacher .hero,
  .role-parent .hero {
    border-radius:24px;
    padding:18px;
  }
  .role-hero h1 { font-size:26px; }
  .role-hero .deva-profile img { width:72px; height:72px; }
  .role-hero .deva-profile small { max-width:82px; }
  .role-student nav,
  .role-teacher nav,
  .role-parent nav {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .role-student nav button,
  .role-teacher nav button,
  .role-parent nav button {
    min-height:92px;
    padding:12px 8px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    line-height:1.25;
    border-radius:20px;
  }
  .role-student nav button::before,
  .role-teacher nav button::before,
  .role-parent nav button::before {
    margin:0 0 7px;
    font-size:27px;
  }
  .role-student .grid,
  .role-teacher .grid,
  .role-parent .grid { grid-template-columns:1fr; }
  .role-student .card,
  .role-teacher .card,
  .role-parent .card { border-radius:22px; padding:18px; }
  input,textarea,select { font-size:16px; min-height:48px; }
}

button[data-view="focusTimer"]::before { content:"⏱️"; }
button[data-view="parentLink"]::before { content:"👨‍👩‍👦"; }
button[data-view="premium"]::before { content:"⭐"; }
.focus-card { text-align:center; }
.focus-clock { display:block; margin:18px 0; color:var(--role); font-size:clamp(48px,12vw,78px); letter-spacing:2px; }
.pair-code { display:grid; gap:6px; place-items:center; margin-top:18px; min-height:72px; }
.pair-code strong { color:var(--role); font-size:44px; letter-spacing:8px; }
.pair-code small { color:#63788a; font-weight:700; }

.achievement-section {
  margin:14px 0 20px;
  padding:18px;
  border:1px solid #e5edf5;
  border-radius:24px;
  background:#fff;
  box-shadow:0 12px 28px #183b6310;
}
.achievement-heading { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:14px; }
.achievement-heading h2 { margin:7px 0 0; color:#15324a; font-size:20px; }
.achievement-heading small { color:#63788a; font-weight:700; }
.achievement-row { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.achievement {
  min-height:116px;
  padding:12px 8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  border-radius:18px;
  background:#f4f7fa;
  border:1px solid #e3ebf2;
}
.achievement.earned { background:linear-gradient(145deg,#fff8da,#e8f8ef); border-color:#f3c95d; }
.achievement.locked { filter:grayscale(.72); opacity:.66; }
.achievement-icon { font-size:31px; margin-bottom:6px; }
.achievement strong { color:#15324a; font-size:12px; line-height:1.2; }
.achievement small { margin-top:5px; color:#63788a; font-size:10px; }
@media (max-width:700px) {
  .achievement-section { padding:15px 12px; margin-top:4px; }
  .achievement-heading { align-items:start; }
  .achievement-heading small { max-width:110px; text-align:right; font-size:10px; }
  .achievement-row { display:flex; overflow-x:auto; gap:9px; padding-bottom:5px; scroll-snap-type:x mandatory; }
  .achievement { flex:0 0 104px; scroll-snap-align:start; }
}

.student-view { display:none; }
.detail-view .hero,
.detail-view > nav,
.detail-view .achievement-section { display:none; }
.detail-view .student-view { display:block; }
.student-view-header {
  display:flex;
  align-items:center;
  gap:14px;
  margin:4px 0 18px;
  padding:12px 0;
  border-bottom:1px solid #dce8f1;
}
.student-view-header h2 { margin:0; color:#15324a; font-size:24px; }
.student-view-header .ghost { min-height:44px; white-space:nowrap; }
@media (max-width:700px) {
  .detail-view { min-height:calc(100vh - 90px); }
  .student-view-header {
    position:sticky;
    top:76px;
    z-index:6;
    margin:0 -14px 14px;
    padding:10px 14px;
    background:#f8fbfff2;
    backdrop-filter:blur(12px);
  }
  .student-view-header h2 { font-size:20px; }
}

/* Ortak yazısız DEVA üst logosu */
.brand{display:inline-flex;align-items:center;min-width:56px}.brand-logo{display:block;width:58px;height:58px;object-fit:contain;object-position:center;border-radius:16px;background:#fff;box-shadow:0 7px 20px #173b6618}.brand-logo-small{width:48px;height:48px;border-radius:14px}@media(max-width:700px){.brand-logo{width:52px;height:52px;border-radius:14px}.brand-logo-small{width:44px;height:44px}}

/* Kitaplarım: mobil uygulamayla uyumlu renkli kitap kapakları */
.book-card {
  display:grid;
  grid-template-columns:150px minmax(0,1fr);
  gap:18px;
  align-items:stretch;
}
.book-card-body {
  min-width:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.book-cover {
  position:relative;
  min-height:210px;
  padding:18px 14px 14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  border-radius:18px 10px 10px 18px;
  color:#fff;
  box-shadow:inset -8px 0 0 #ffffff2e,0 12px 24px #183b6324;
}
.book-cover::before {
  content:"";
  position:absolute;
  width:130px;
  height:130px;
  top:-55px;
  right:-45px;
  border-radius:50%;
  background:#ffffff24;
}
.book-cover::after {
  content:"";
  position:absolute;
  inset:0 auto 0 7px;
  width:4px;
  background:#ffffff52;
}
.book-cover-math { background:linear-gradient(145deg,#1769aa,#53bdf5); }
.book-cover-turkish { background:linear-gradient(145deg,#d84d62,#ff9478); }
.book-cover-life { background:linear-gradient(145deg,#218f62,#70d58b); }
.book-cover-english { background:linear-gradient(145deg,#6941bd,#a16ef0); }
.book-cover-default { background:linear-gradient(145deg,#315979,#70a8cf); }
.book-cover-grade {
  position:absolute;
  top:13px;
  left:15px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.8px;
}
.book-cover-icon {
  width:66px;
  height:66px;
  margin:8px 0 12px;
  display:grid;
  place-items:center;
  border-radius:22px;
  background:#ffffffec;
  color:#16466f;
  font-size:30px;
  font-weight:1000;
  box-shadow:0 8px 20px #102b4a2b;
}
.book-cover strong { font-size:18px; line-height:1.15; text-transform:uppercase; }
.book-cover small { margin-top:6px; font-size:11px; font-weight:900; }
.book-cover em {
  position:absolute;
  bottom:11px;
  font-size:8px;
  font-style:normal;
  font-weight:900;
  letter-spacing:1px;
  opacity:.84;
}
@media(max-width:700px) {
  .book-card { grid-template-columns:112px minmax(0,1fr); gap:12px; padding:13px; }
  .book-cover { min-height:178px; padding:14px 9px; border-radius:16px 8px 8px 16px; }
  .book-cover-icon { width:52px; height:52px; font-size:24px; border-radius:17px; }
  .book-cover strong { font-size:14px; }
  .book-card-body h3 { font-size:16px; }
  .book-card-body p { font-size:12px; }
  .book-open { grid-template-columns:1fr; }
}

.book-cover-original {
  width:100%;
  min-height:0;
  aspect-ratio:3 / 4;
  align-self:start;
  padding:8px;
  background:#eef4f8;
  box-shadow:0 12px 24px #183b6324;
}
.book-cover-original::before,
.book-cover-original::after { display:none; }
.book-cover-original img {
  display:block;
  width:100%;
  height:100%;
  min-height:0;
  object-fit:contain;
  object-position:center;
  border-radius:10px;
}
.book-cover-original canvas {
  display:block;
  width:100%;
  height:100%;
  min-height:0;
  object-fit:contain;
  object-position:center;
  border-radius:10px;
  background:#fff;
}
.book-cover-live .book-cover-loading {
  position:absolute;
  inset:auto 8px 8px;
  padding:6px 8px;
  border-radius:9px;
  background:#17324dcc;
  color:#fff;
  font-size:10px;
  font-weight:800;
  line-height:1.2;
}
.book-cover-live.is-ready .book-cover-loading { display:none; }
@media(max-width:700px) {
  .book-cover-original {
    min-height:0;
    padding:6px;
  }
}

/* Ödev içine bağlı 20+5 odak akışı */
.homework-focus {
  margin:14px 0 18px;
  padding:16px;
  border:1px solid #cfe3f3;
  border-radius:20px;
  background:linear-gradient(135deg,#eef8ff,#f2fff7);
}
.homework-focus > div:first-child {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.homework-focus strong {
  color:var(--role,#1769aa);
  font-size:30px;
  letter-spacing:1px;
}
.homework-focus p {
  margin:10px 0 0;
  color:#526b7f;
  line-height:1.45;
}
.homework-focus-choice {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:12px;
}
.homework-focus-choice button { margin:0; }
@media(max-width:520px) {
  .homework-focus-choice { grid-template-columns:1fr; }
  .homework-focus strong { font-size:26px; }
}
