/* DR.DOODLE yönetim paneli */
:root {
  --bg: #f4f5fb; --surface: #ffffff; --surface-2: #f8f9fd; --ink: #151a2d; --muted: #646c86; --line: #e5e8f3;
  --brand: #6a47ff; --brand-ink: #ffffff; --brand-soft: #eee9ff; --accent: #ff7a59;
  --ok: #0f9d68; --ok-soft: #dcf6ea; --info: #2c6ff0; --info-soft: #e4edff;
  --warn: #c77700; --warn-soft: #fff0d6; --danger: #d9363e; --danger-soft: #fde6e7;
  --gray: #6b7390; --gray-soft: #eceef6;
  --shadow: 0 1px 2px rgba(20, 26, 60, .05), 0 8px 24px rgba(20, 26, 60, .06);
  --shadow-lg: 0 20px 60px rgba(14, 18, 48, .28);
  --radius: 16px; --side: #12152b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1020; --surface: #171b2f; --surface-2: #1c2138; --ink: #eef0fb; --muted: #9aa2c0; --line: #272d49;
    --brand: #8a6dff; --brand-soft: #2a2450; --ok: #38d19a; --ok-soft: #13352b; --info: #6ea0ff; --info-soft: #1b2b52;
    --warn: #ffb547; --warn-soft: #3a2c10; --danger: #ff6b72; --danger-soft: #3d1a1f; --gray: #98a0bd; --gray-soft: #222842;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --side: #0a0c1b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- iskelet ---------- */
.app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.side {
  background: var(--side); color: #c9cde6; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; color: #fff; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand b { font-size: 17px; letter-spacing: .2px; display: block; line-height: 1.1; }
.brand small { color: #8f95b8; font-size: 12px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: #b9bedb;
  text-decoration: none; font-weight: 500; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.on { background: linear-gradient(135deg, rgba(106, 71, 255, .9), rgba(255, 122, 89, .85)); color: #fff; box-shadow: 0 8px 20px rgba(106, 71, 255, .35); }
.side .grow { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--brand)); color: #fff; display: grid; place-items: center; font-weight: 700; }
.me .nm { flex: 1; min-width: 0; font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me button { background: none; border: 0; color: #aab0d3; cursor: pointer; padding: 6px; border-radius: 8px; display: grid; }
.me button:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.main { padding: 30px clamp(18px, 3.2vw, 44px) 60px; min-width: 0; max-width: 1280px; width: 100%; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.top h1 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.3px; }
.top p { color: var(--muted); margin-top: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.mnav, .mtop { display: none; }
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px 16px 100px; }
  .mtop { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--side); color: #fff; position: sticky; top: 0; z-index: 20; }
  .mtop .brand { padding: 0; }
  .mtop .brand img { width: 30px; height: 30px; }
  .mtop button { background: rgba(255, 255, 255, .08); border: 0; color: #fff; border-radius: 10px; padding: 8px; cursor: pointer; display: grid; }
  .mnav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .mnav a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; border-radius: 12px; }
  .mnav a svg.i { width: 22px; height: 22px; }
  .mnav a.on { color: var(--brand); background: var(--brand-soft); }
}

/* ---------- bileşenler ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 12px; cursor: pointer; font-weight: 600;
  transition: transform .08s, box-shadow .15s, background .15s; white-space: nowrap; min-height: 42px;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible, .seg button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.btn.primary { background: linear-gradient(135deg, var(--brand), #8a55ff); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(106, 71, 255, .3); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.solid-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.sm { padding: 6px 11px; min-height: 34px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.active { background: var(--ok-soft); color: var(--ok); }
.badge.active::before { animation: pulse 1.6s infinite; }
.badge.planned { background: var(--info-soft); color: var(--info); }
.badge.past { background: var(--gray-soft); color: var(--gray); }
.badge.cancelled { background: var(--danger-soft); color: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }

.seg { display: inline-flex; background: var(--gray-soft); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); display: inline-flex; gap: 7px; align-items: center; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .lbl { font-weight: 600; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }
.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-height: 44px;
}
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea.input { resize: vertical; min-height: 84px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.err { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.note { background: var(--brand-soft); color: var(--ink); padding: 10px 14px; border-radius: 12px; font-size: 14px; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .ico { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty .ico svg.i { width: 28px; height: 28px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

.skeleton { background: linear-gradient(90deg, var(--gray-soft), var(--surface-2), var(--gray-soft)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; min-height: 120px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- ana sayfa ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden; margin-bottom: 18px; }
.hero .pic { background: repeating-conic-gradient(var(--gray-soft) 0 25%, var(--surface-2) 0 50%) 0 0 / 22px 22px; display: grid; place-items: center; min-height: 220px; padding: 14px; }
.hero .pic img { max-width: 100%; max-height: 300px; object-fit: contain; border-radius: 10px; }
.hero .txt { padding: 24px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.hero h2 { font-size: 24px; letter-spacing: -.3px; }
.hero .meta { color: var(--muted); }
.hero.off { grid-template-columns: 1fr; }
.hero.off .txt { align-items: center; text-align: center; padding: 34px 20px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }
.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.stat .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.stat .ic svg.i { width: 22px; height: 22px; }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 13.5px; }
.stat .v small { font-size: 15px; font-weight: 700; }
.sec-h { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 12px; }
.sec-h h2 { font-size: 18px; }

.list { display: grid; }
.item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.thumb { width: 64px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--gray-soft); display: block; }
.item .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { color: var(--muted); font-size: 13.5px; }
.item .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .item { grid-template-columns: 52px minmax(0, 1fr); } .item .acts { grid-column: 1 / -1; justify-content: flex-start; } .thumb { width: 52px; height: 38px; } }

/* ---------- özel günler ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.hcard { overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.hcard:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20, 26, 60, .06), 0 16px 34px rgba(20, 26, 60, .1); }
.hcard .img { aspect-ratio: 16 / 9; background: repeating-conic-gradient(var(--gray-soft) 0 25%, var(--surface-2) 0 50%) 0 0 / 18px 18px; display: grid; place-items: center; position: relative; }
.hcard .img img { width: 100%; height: 100%; object-fit: contain; }
.hcard .img .noimg { color: var(--muted); display: grid; justify-items: center; gap: 6px; font-size: 13px; }
.hcard .img .badge { position: absolute; top: 10px; left: 10px; }
.hcard .body { padding: 14px 16px 6px; flex: 1; }
.hcard h3 { font-size: 17px; }
.hcard p { color: var(--muted); font-size: 14px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hcard .foot { padding: 12px 16px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.hcard .foot .sp { flex: 1; }

.drop {
  border: 2px dashed var(--line); border-radius: 14px; padding: 16px; text-align: center; cursor: pointer; color: var(--muted);
  background: var(--surface-2); transition: border-color .15s, background .15s; display: grid; gap: 8px; justify-items: center;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop img { max-width: 100%; max-height: 200px; border-radius: 10px; object-fit: contain; }
.drop .dim { font-size: 13px; }

/* ---------- takvim ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--muted); }
.tabs button.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.tabs .n { opacity: .65; margin-left: 4px; font-weight: 500; }
.calhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; gap: 10px; flex-wrap: wrap; }
.calhead h2 { font-size: 19px; text-transform: capitalize; min-width: 150px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal .dow { padding: 8px 4px; text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.day { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0 6px; position: relative; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.day:nth-child(7n+14) { border-right: 0; }
.day:hover { background: var(--surface-2); }
.day.out { background: color-mix(in srgb, var(--gray-soft) 45%, transparent); color: var(--muted); }
.day .dn { font-size: 13px; font-weight: 700; padding: 0 8px; display: flex; justify-content: space-between; align-items: center; }
.day.today .dn span { background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 8px; }
.chip {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; padding: 4px 8px; min-height: 24px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
}
/* Birden fazla güne yayılan yayının adı, devam eden günlerin üzerine taşar (satır sonunda takvim kırpar) */
.cal { overflow: hidden; }
.chip .lab { position: relative; z-index: 2; }
.chip:not(.e) { overflow: visible; text-overflow: clip; z-index: 1; }
.chip.active { background: var(--ok-soft); color: var(--ok); }
.chip.planned { background: var(--info-soft); color: var(--info); }
.chip.past { background: var(--gray-soft); color: var(--gray); }
.chip.s { border-radius: 8px 0 0 8px; margin-left: 4px; width: calc(100% - 4px); }
.chip.e { border-radius: 0 8px 8px 0; margin-right: 4px; width: calc(100% - 4px); }
.chip.s.e { border-radius: 8px; width: calc(100% - 8px); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
@media (max-width: 640px) {
  .day { min-height: 76px; }
  .chip { font-size: 0; padding: 0; min-height: 8px; height: 8px; }
  .chip.s.e, .chip.s { border-radius: 99px 0 0 99px; }
  .day .dn { font-size: 12px; padding: 0 4px; }
}

/* ---------- önizleme ---------- */
.devbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.stage { background: repeating-conic-gradient(var(--gray-soft) 0 25%, var(--surface-2) 0 50%) 0 0 / 26px 26px; border-radius: var(--radius); padding: 24px; display: grid; justify-items: center; border: 1px solid var(--line); }
.frame { border: 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; height: 560px; max-width: 1120px; transition: max-width .25s; }
.frame.mobile { max-width: 390px; height: 720px; border-radius: 30px; border: 10px solid #1a1d2e; }

/* ---------- modal & toast ---------- */
.ovl { position: fixed; inset: 0; background: rgba(10, 13, 32, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 100; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal .mh { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 6px; }
.modal .mh h2 { font-size: 20px; }
.modal .mb { padding: 12px 22px 8px; }
.modal .mf { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 20px; flex-wrap: wrap; }
.x { border: 0; background: none; cursor: pointer; padding: 8px; border-radius: 10px; color: var(--muted); display: grid; }
.x:hover { background: var(--gray-soft); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; }
@media (max-width: 880px) { .toasts { bottom: 86px; } }
.toast { background: #151a2d; color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; animation: pop .2s; display: flex; gap: 9px; align-items: center; }
.toast.bad { background: var(--danger); }

/* ---------- giriş ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(900px 500px at 15% 10%, rgba(106, 71, 255, .22), transparent 60%),
  radial-gradient(700px 500px at 90% 90%, rgba(255, 122, 89, .22), transparent 60%), var(--bg); }
.login .box { width: min(400px, 100%); padding: 32px 28px; }
.login .logo { display: grid; justify-items: center; gap: 10px; margin-bottom: 22px; }
.login .logo img { width: 64px; height: 64px; filter: drop-shadow(0 10px 18px rgba(106, 71, 255, .35)); }
.login h1 { font-size: 22px; text-align: center; }
.login .sub { color: var(--muted); text-align: center; font-size: 14px; }
.login .btn { width: 100%; }
