@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#f6f7fb;--ink:#192338;--muted:#7c879b;--line:#e8ebf2;--purple:#6d5ce8;--navy:#202b45}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',Arial,sans-serif;font-size:14px}.sidebar{width:248px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid var(--line);padding:28px 18px;display:flex;flex-direction:column;z-index:2}.brand,.auth-brand{display:flex;align-items:center;gap:11px;padding:0 9px 35px}.brand-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:#6d5ce8;color:#fff;font-weight:800;font-size:20px;box-shadow:0 7px 18px #6d5ce833}.brand strong,.auth-brand strong{display:block;font:800 17px Manrope,sans-serif;letter-spacing:-.5px}.brand small,.auth-brand small{display:block;color:#929bad;font-size:11px;margin-top:3px}.sidebar nav{display:grid;gap:7px}.nav-link{display:flex;align-items:center;gap:12px;padding:13px 14px;border-radius:10px;color:#7a8498;text-decoration:none;font-weight:600}.nav-link span{font-size:18px;width:20px;text-align:center}.nav-link.active,.nav-link:hover{background:#f0edff;color:#6554dd}.side-note{margin-top:auto;background:#f7f5ff;border:1px solid #ece8ff;border-radius:14px;padding:17px 15px}.note-icon{font-size:20px;color:#6d5ce8;margin-bottom:11px}.side-note strong{font-size:13px}.side-note p{font-size:12px;line-height:1.65;color:#7d8497;margin:7px 0 0}.sidebar-footer{display:flex;justify-content:space-between;padding:20px 6px 0;color:#a0a8b7;font-size:11px}.main{margin-left:248px;padding:35px 42px 24px;max-width:1800px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.eyebrow{font-size:10px;letter-spacing:1.5px;color:#929bb0;font-weight:700;margin-bottom:9px}.topbar h1{font:800 29px Manrope,sans-serif;letter-spacing:-1px;margin:0}.topbar p,.section-heading p{color:var(--muted);margin:7px 0 0;font-size:13px}.top-actions{display:flex;align-items:center;gap:12px}.today{color:#727e94;font-weight:600}.avatar{width:38px;height:38px;display:grid;place-items:center;background:#e8e4ff;color:#6554dd;border-radius:50%;font-weight:800}.logout-link{font-size:12px;color:#6d5ce8;text-decoration:none;font-weight:700}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:31px}.stat-card,.panel,.course-card{background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 3px 12px #27375a05}.stat-card{padding:19px 20px}.stat-top{display:flex;align-items:center;justify-content:space-between;color:#79849a;font-size:12px;font-weight:600}.stat-card>strong{display:block;font:800 29px Manrope,sans-serif;margin:13px 0 4px}.stat-card small{color:#a0a8b6;font-size:11px}.stat-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;font-size:17px;font-weight:700}.purple{background:#f0edff;color:#725ee9}.blue{background:#eaf4ff;color:#3686dc}.orange{background:#fff2df;color:#df922a}.red{background:#ffeded;color:#df5d65}.warning-banner{display:flex;align-items:center;gap:14px;padding:15px 18px;background:#fff7e9;border:1px solid #ffe6b9;border-radius:12px;margin:-8px 0 28px}.warning-symbol{display:grid;place-items:center;flex-shrink:0;width:35px;height:35px;border-radius:10px;background:#ffe7bd;color:#b87914;font-weight:800;font-size:20px}.warning-banner strong{font-size:13px;color:#8e5a0d}.warning-banner p{font-size:12px;color:#a2763b;margin:4px 0 0;line-height:1.5}.section{margin-bottom:30px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px}.section-heading h2{font:800 18px Manrope,sans-serif;letter-spacing:-.4px;margin:0}.button{display:inline-flex;justify-content:center;align-items:center;border:0;border-radius:9px;padding:11px 15px;font:700 12px 'DM Sans',sans-serif;text-decoration:none;cursor:pointer;transition:.15s}.button:hover{transform:translateY(-1px);filter:brightness(.98)}.primary{background:#6d5ce8;color:white;box-shadow:0 5px 12px #6d5ce81c}.course-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.course-card{padding:19px;min-width:0}.course-head{display:flex;align-items:center;justify-content:space-between}.course-symbol{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#f0edff;color:#6554dd;font:800 17px Manrope,sans-serif}.icon-button{border:0;background:transparent;color:#9ba4b5;font-size:22px;cursor:pointer}.course-card h3{font:800 15px Manrope,sans-serif;margin:17px 0 6px;letter-spacing:-.3px}.course-meta{font-size:11px;color:#9ba3b2;margin:0 0 19px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.status{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700}.status i{width:6px;height:6px;border-radius:50%;background:#31b77b}.status.critical{color:#d58a20}.status.critical i{background:#efa42e}.status.failed{color:#df5b65}.status.failed i{background:#df5b65}.status.normal{color:#25a66e}.count{font-size:11px;font-weight:800;color:#5e687d}.progress{height:6px;border-radius:20px;background:#edf0f5;overflow:hidden}.progress span{display:block;height:100%;border-radius:20px;background:#36b982}.progress span.critical{background:#efa42e}.progress span.failed{background:#df5b65}.remaining{display:flex;justify-content:space-between;align-items:center;margin:13px 0 14px;color:#8a94a7;font-size:11px}.remaining strong{font:800 16px Manrope,sans-serif;color:#26a875}.remaining strong.text-red{color:#df5b65}.course-alert{padding:9px 10px;border-radius:8px;font-size:10px;line-height:1.45;margin-bottom:12px}.red-alert{background:#fff0f0;color:#cb4f59}.orange-alert{background:#fff7e8;color:#b77b21}.absence-form{border-top:1px solid #f0f1f5;padding-top:13px;display:grid;gap:7px}.absence-form label,.add-form label,.auth-form label{font-size:11px;font-weight:700;color:#68748a}.absence-form label span{font-weight:400;color:#a1a9b7}.absence-form input,.add-form input,.auth-form input{width:100%;border:1px solid #e6e9f0;background:#fcfcfe;border-radius:8px;padding:10px 11px;color:#354057;font:12px 'DM Sans',sans-serif;outline:none}.absence-form input:focus,.add-form input:focus,.auth-form input:focus{border-color:#9b8ff0;box-shadow:0 0 0 3px #6d5ce812}.dark-button{background:#252f49;color:#fff;margin-top:4px}.muted-button{background:#fff0f0;color:#c44f59;margin-top:4px}.history-link{display:flex;justify-content:space-between;align-items:center;color:#7565df;font-size:11px;font-weight:700;text-decoration:none;margin-top:14px}.history-link span{font-size:17px}.lower-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.panel{padding:21px}.panel-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#f0edff;color:#6d5ce8;font-size:20px}.add-form{display:grid;gap:9px}.add-form input{margin-bottom:7px;padding:12px}.full{width:100%;margin-top:5px;padding:13px}.history-list{display:grid}.history-item{display:flex;align-items:center;gap:11px;padding:12px 0;border-bottom:1px solid #f0f1f5}.history-item:last-child{border-bottom:0}.calendar-icon{width:35px;height:35px;border-radius:10px;background:#f0edff;display:grid;place-items:center;color:#6d5ce8}.history-info{flex:1;display:grid;gap:4px}.history-info strong{font-size:12px}.history-info small{font-size:11px;color:#929bad}.delete-button{border:0;background:#fff0f0;color:#ce5961;padding:7px 9px;border-radius:7px;font-size:10px;font-weight:700;cursor:pointer}.mini-empty,.empty{text-align:center;color:#929bad;font-size:12px;line-height:1.6}.mini-empty{padding:24px 5px}.empty{background:#fff;border:1px dashed #dfe3ed;border-radius:14px;padding:42px 15px}.empty-icon{font-size:30px;color:#b4aaf7}.empty h3{font:800 15px Manrope,sans-serif;color:#303a50;margin:12px 0 4px}.empty p{margin:0 0 17px}.alert{padding:12px 15px;border-radius:9px;margin-bottom:16px;font-size:12px;font-weight:600}.alert.danger{background:#fff0f0;color:#c54e58}.alert.success{background:#eafaf2;color:#21875b}footer{text-align:center;padding:27px 0 5px;color:#a0a8b7;font-size:10px}footer span{padding:0 6px}
.auth-body{min-height:100vh;display:grid;place-items:center;padding:25px;background:radial-gradient(circle at top left,#eeeaff,transparent 35%),#f6f7fb}.auth-card{width:min(100%,440px);background:white;border:1px solid var(--line);border-radius:20px;padding:32px;box-shadow:0 18px 60px #29375a0d}.auth-brand{padding:0 0 28px}.auth-intro h1{font:800 27px Manrope,sans-serif;letter-spacing:-.8px;margin:0}.auth-intro p{font-size:12px;line-height:1.7;color:#8791a4;margin:8px 0 20px}.auth-form{display:grid;gap:9px}.auth-form input{padding:13px;margin-bottom:7px}.auth-switch{text-align:center;color:#8791a4;font-size:12px;margin:20px 0 0}.auth-switch a{color:#6d5ce8;font-weight:700;text-decoration:none}.auth-foot{text-align:center;color:#a0a8b6;font-size:10px;line-height:1.6;margin:17px 0 0}.seat-count{display:flex;justify-content:space-between;color:#8a94a7;font-size:11px;margin:0 0 8px}.seat-count strong{color:#6554dd}.seat-track{height:5px;border-radius:20px;background:#edf0f5;overflow:hidden;margin-bottom:20px}.seat-track span{display:block;height:100%;background:#6d5ce8;border-radius:20px}
@media(max-width:1250px){.main{padding:28px 25px}.course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:850px){.sidebar{width:72px;padding:20px 10px}.brand{padding:0 6px 28px}.brand>div,.nav-link:not(.active){font-size:0}.brand strong,.brand small,.side-note,.sidebar-footer{display:none}.nav-link{justify-content:center;padding:13px 8px}.nav-link span{font-size:19px}.main{margin-left:72px;padding:25px 17px}.lower-grid{grid-template-columns:1fr}.topbar h1{font-size:24px}.today{font-size:11px}}@media(max-width:560px){.stats{gap:9px}.stat-card{padding:14px}.stat-card>strong{font-size:24px}.stat-card small{font-size:10px}.course-grid{grid-template-columns:1fr}.topbar{align-items:flex-start}.top-actions{flex-wrap:wrap;justify-content:flex-end}.main{padding:22px 12px}.warning-banner{align-items:flex-start}.panel{padding:16px}.auth-card{padding:23px}}

/* Mobil uyumluluk iyileştirmeleri */
img, svg, video { max-width: 100%; }
input, button, select, textarea { max-width: 100%; }
html, body { width: 100%; overflow-x: hidden; }
.main { min-width: 0; }
.course-card, .panel, .stat-card { min-width: 0; }

@media (max-width: 680px) {
  .sidebar {
    position: sticky;
    top: 0;
    inset: auto;
    width: 100%;
    height: auto;
    padding: 12px 14px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 3px 14px #27375a0a;
    z-index: 10;
    gap: 10px;
  }
  .brand {
    padding: 0 2px 4px;
    gap: 9px;
  }
  .brand-icon { width: 35px; height: 35px; border-radius: 11px; font-size: 18px; }
  .brand strong { font-size: 15px; }
  .brand small { display: block; font-size: 10px; }
  .sidebar nav {
    display: flex;
    gap: 6px;
    margin: 0 -2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .nav-link, .nav-link:not(.active) {
    flex: 0 0 auto;
    display: inline-flex;
    justify-content: center;
    gap: 6px;
    padding: 9px 11px;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 9px;
  }
  .nav-link span { font-size: 14px; width: auto; }
  .side-note, .sidebar-footer { display: none; }
  .main {
    margin-left: 0;
    padding: 20px 14px 18px;
    width: 100%;
  }
  .topbar {
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .topbar h1 { font-size: clamp(21px, 6vw, 27px); line-height: 1.2; }
  .topbar p { line-height: 1.5; max-width: 38ch; }
  .eyebrow { font-size: 9px; letter-spacing: 1px; }
  .top-actions { gap: 8px; }
  .today { display: none; }
  .logout-link { font-size: 11px; white-space: nowrap; }
  .avatar { width: 32px; height: 32px; flex: 0 0 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
  .stat-card { padding: 13px; border-radius: 12px; }
  .stat-top { gap: 6px; font-size: 11px; align-items: flex-start; }
  .stat-card > strong { font-size: 25px; margin: 10px 0 3px; }
  .stat-card small { font-size: 10px; line-height: 1.4; }
  .stat-icon { width: 29px; height: 29px; flex: 0 0 29px; }
  .section { margin-bottom: 24px; }
  .section-heading { align-items: flex-start; gap: 10px; }
  .section-heading h2 { font-size: 17px; }
  .section-heading p { font-size: 11px; line-height: 1.45; }
  .section-heading > .button { flex: 0 0 auto; padding: 10px; font-size: 11px; }
  .course-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .course-card { padding: 16px; border-radius: 13px; }
  .course-card h3 { overflow-wrap: anywhere; }
  .course-meta { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
  .absence-form input, .add-form input, .auth-form input { font-size: 16px; min-height: 44px; }
  .button { min-height: 42px; }
  .lower-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .panel { padding: 16px; }
  .warning-banner { padding: 12px; gap: 10px; margin-bottom: 22px; }
  .warning-banner p { line-height: 1.5; }
  .history-item { min-width: 0; }
  .history-info { min-width: 0; overflow-wrap: anywhere; }
  .auth-body { padding: 14px; }
  .auth-card { padding: 22px 18px; border-radius: 16px; }
  .auth-intro h1 { font-size: 24px; }
}

@media (max-width: 380px) {
  .main { padding: 16px 10px; }
  .topbar h1 { font-size: 21px; }
  .topbar { gap: 7px; }
  .top-actions { gap: 6px; }
  .stats { gap: 8px; }
  .stat-card { padding: 10px; }
  .stat-top { font-size: 10px; }
  .stat-card > strong { font-size: 22px; }
  .section-heading > .button { font-size: 10px; padding: 9px 8px; }
  .nav-link, .nav-link:not(.active) { padding: 8px 9px; }
}

/* Kesin mobil yerleşim düzeltmesi - v3 */
@media screen and (max-width: 768px) {
  html, body { max-width: 100% !important; min-width: 0 !important; overflow-x: clip !important; }
  body { display: block !important; }
  .sidebar {
    position: relative !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    width: 100% !important; max-width: 100% !important; height: auto !important; min-height: 0 !important;
    margin: 0 !important; padding: 12px !important; display: flex !important; flex-direction: column !important;
    border-right: 0 !important; border-bottom: 1px solid var(--line) !important;
  }
  .brand { padding: 0 2px 10px !important; margin: 0 !important; }
  .brand > div, .brand strong, .brand small { display: block !important; }
  .sidebar nav { display: flex !important; width: 100% !important; max-width: 100% !important; overflow-x: auto !important; overflow-y: hidden !important; gap: 6px !important; }
  .nav-link, .nav-link:not(.active) { display: inline-flex !important; flex: 0 0 auto !important; width: auto !important; font-size: 12px !important; white-space: nowrap !important; padding: 10px !important; }
  .nav-link span { display: inline-block !important; width: auto !important; font-size: 14px !important; }
  .side-note, .sidebar-footer { display: none !important; }
  .main { display: block !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important; margin: 0 !important; padding: 16px 12px 24px !important; }
  .topbar { display: flex !important; flex-direction: column !important; align-items: stretch !important; width: 100% !important; gap: 12px !important; }
  .topbar > div:first-child { min-width: 0 !important; }
  .topbar h1 { font-size: clamp(22px, 6vw, 28px) !important; overflow-wrap: anywhere !important; }
  .top-actions { display: flex !important; flex-wrap: wrap !important; justify-content: flex-start !important; align-items: center !important; }
  .stats { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; width: 100% !important; gap: 8px !important; }
  .stat-card { min-width: 0 !important; padding: 12px !important; }
  .stat-top { min-width: 0 !important; overflow-wrap: anywhere !important; }
  .stat-card small { overflow-wrap: anywhere !important; }
  .section, .panel, .course-card { min-width: 0 !important; max-width: 100% !important; }
  .section-heading { display: flex !important; flex-wrap: wrap !important; }
  .course-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; width: 100% !important; }
  .course-card { padding: 14px !important; }
  .course-meta { white-space: normal !important; overflow-wrap: anywhere !important; }
  .lower-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; width: 100% !important; }
  .panel { padding: 14px !important; }
  .absence-form, .add-form, .auth-form { min-width: 0 !important; width: 100% !important; }
  .absence-form input, .add-form input, .auth-form input, .button { min-width: 0 !important; max-width: 100% !important; font-size: 16px !important; }
  .history-item { flex-wrap: wrap !important; }
}
@media screen and (max-width: 390px) {
  .stats { grid-template-columns: minmax(0, 1fr) !important; }
  .main { padding-right: 10px !important; padding-left: 10px !important; }
  .section-heading > .button { width: 100% !important; }
}


/* İsteğe bağlı koyu tema */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);border-radius:10px;padding:9px 11px;background:#fff;color:#354057;font:700 11px 'DM Sans',sans-serif;cursor:pointer;white-space:nowrap;transition:background .2s,color .2s,border-color .2s}
.theme-toggle:hover{filter:brightness(.97)}
.auth-theme-toggle{position:fixed;top:16px;right:16px;z-index:20}
html[data-theme="dark"]{color-scheme:dark;--bg:#0d1220;--ink:#e8edf7;--muted:#a0abc0;--line:#283248;--purple:#a195ff;--navy:#e8edf7}
html[data-theme="dark"] body{background:#0d1220;color:#e8edf7}
html[data-theme="dark"] .sidebar,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .course-card,html[data-theme="dark"] .panel,html[data-theme="dark"] .auth-card,html[data-theme="dark"] .empty{background:#151d2e;border-color:#283248;color:#e8edf7}
html[data-theme="dark"] .sidebar{border-right-color:#283248}
html[data-theme="dark"] .brand small,html[data-theme="dark"] .auth-brand small,html[data-theme="dark"] .course-meta,html[data-theme="dark"] .stat-card small,html[data-theme="dark"] .remaining,html[data-theme="dark"] .history-info small,html[data-theme="dark"] .auth-intro p,html[data-theme="dark"] .auth-switch,html[data-theme="dark"] .auth-foot{color:#9aa8bf}
html[data-theme="dark"] .nav-link{color:#aab5ca}
html[data-theme="dark"] .nav-link.active,html[data-theme="dark"] .nav-link:hover{background:#292446;color:#c3baff}
html[data-theme="dark"] .side-note{background:#211e38;border-color:#383257}
html[data-theme="dark"] .side-note p{color:#b4b0d0}
html[data-theme="dark"] .topbar h1,html[data-theme="dark"] .section-heading h2,html[data-theme="dark"] .course-card h3,html[data-theme="dark"] .empty h3,html[data-theme="dark"] .history-info strong,html[data-theme="dark"] .auth-intro h1{color:#edf2fb}
html[data-theme="dark"] .topbar p,html[data-theme="dark"] .eyebrow{color:#9ba8bf}
html[data-theme="dark"] .theme-toggle{background:#202a40;border-color:#36425b;color:#edf2fb}
html[data-theme="dark"] .warning-banner{background:#302719;border-color:#594425}
html[data-theme="dark"] .warning-banner strong{color:#ffd58a}
html[data-theme="dark"] .warning-banner p{color:#d9b980}
html[data-theme="dark"] .progress{background:#2a3449}
html[data-theme="dark"] .absence-form{border-top-color:#2b354a}
html[data-theme="dark"] .absence-form input,html[data-theme="dark"] .add-form input,html[data-theme="dark"] .auth-form input{background:#0f1727;border-color:#344058;color:#edf2fb}
html[data-theme="dark"] .absence-form input::placeholder,html[data-theme="dark"] .add-form input::placeholder,html[data-theme="dark"] .auth-form input::placeholder{color:#73819a}
html[data-theme="dark"] .absence-form label,html[data-theme="dark"] .add-form label,html[data-theme="dark"] .auth-form label{color:#b5c0d4}
html[data-theme="dark"] .history-item{border-bottom-color:#2b354a}
html[data-theme="dark"] .course-alert.red-alert{background:#3b202b;color:#ffadb5}
html[data-theme="dark"] .course-alert.orange-alert{background:#392d1b;color:#ffd18a}
html[data-theme="dark"] .empty{border-color:#344058}
html[data-theme="dark"] .seat-track{background:#2a3449}
html[data-theme="dark"] .auth-body{background:radial-gradient(circle at top left,#292344,transparent 35%),#0d1220}
html[data-theme="dark"] .logout-link,html[data-theme="dark"] .history-link,html[data-theme="dark"] .auth-switch a{color:#b9b0ff}
html[data-theme="dark"] .count{color:#c4cee0}
html[data-theme="dark"] .mini-empty{color:#9aa8bf}
@media(max-width:680px){.theme-toggle{font-size:10px;padding:8px 9px}.auth-theme-toggle{top:10px;right:10px}}

/* Ders düzenleme ve mevcut devamsızlık sayısı alanları */
.edit-course{margin:0 0 14px;border:1px solid var(--line);border-radius:9px;padding:10px 11px}
.edit-course summary{cursor:pointer;color:#6d5ce8;font-size:12px;font-weight:700;list-style:none}
.edit-course summary::-webkit-details-marker{display:none}
.edit-form{margin-top:12px}
.form-help{display:block;color:#8993a7;font-size:11px;line-height:1.5;margin-top:-4px;margin-bottom:5px}
html[data-theme="dark"] .edit-course{border-color:#283248}
html[data-theme="dark"] .edit-form input,html[data-theme="dark"] .add-form input{background:#101727;border-color:#303b52;color:#e8edf7}
