:root {
  --orange: #FF7A00;
  --orange-600: #E86A00;
  --orange-50: #FFF4EA;
  --orange-100: #FFE4CC;
  --bg: #FAF8F6;
  --surface: #FFFFFF;
  --text: #1F1A17;
  --muted: #7A706A;
  --border: #EEE7E1;
  --danger: #D93025;
  --success: #1E8E3E;
  --shadow: 0 1px 2px rgba(31, 26, 23, .06), 0 4px 16px rgba(31, 26, 23, .06);
  --radius: 14px;
  color-scheme: light;
}

/* Koyu tema: sistem koyuysa (kullanıcı "Açık" seçmediyse) ya da kullanıcı "Koyu" seçtiyse. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --orange-50: #2E2117;
    --orange-100: #45301F;
    --bg: #141110;
    --surface: #1E1A18;
    --text: #F3EEEA;
    --muted: #A69B94;
    --border: #2F2926;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --orange-50: #2E2117;
  --orange-100: #45301F;
  --bg: #141110;
  --surface: #1E1A18;
  --text: #F3EEEA;
  --muted: #A69B94;
  --border: #2F2926;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--orange); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); }

/* --- Butonlar --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; padding: 11px 16px;
  font-weight: 600; text-decoration: none; background: var(--orange); color: #fff;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--orange-600); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--orange-50); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--border); }
.btn-danger:hover { background: rgba(217, 48, 37, .08); }
.btn-google { background: var(--surface); color: var(--text); border-color: var(--border); width: 100%; padding: 13px; box-shadow: var(--shadow); }
.btn-google:hover { background: var(--orange-50); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--muted); flex: none;
}
.icon-btn:hover { background: var(--orange-50); color: var(--orange); }
.icon-btn svg { width: 19px; height: 19px; fill: currentColor; }

/* --- Giriş --- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 20% 0%, var(--orange-100), transparent 55%), var(--bg); }
.login-card { width: 100%; max-width: 360px; text-align: center; background: var(--surface);
  padding: 36px 28px; border-radius: 24px; box-shadow: var(--shadow); }
.login h1 { margin: 4px 0; font-size: 28px; letter-spacing: -.5px; }
.login h1 span { color: var(--text); }
.login .btn-google { margin: 24px 0 12px; }

/* --- Üst bar --- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: flex-end; gap: 6px; }
.brand img { height: 22px; width: auto; display: block; }
.brand span { font-size: 17px; font-weight: 700; line-height: 1; letter-spacing: -.01em; padding-bottom: 1px; }
.wordmark { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: 4px 0 10px; }
.wordmark img { height: 44px; width: auto; display: block; }
.wordmark span { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.02em; padding-bottom: 2px; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tab { border: 0; background: transparent; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.tab.active { background: var(--orange-50); color: var(--orange); }
.tab svg { display: none; }
.tab[hidden] { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--orange-100); padding: 0; overflow: hidden;
  background: var(--orange); color: #fff; font-weight: 700; display: grid; place-items: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu { position: absolute; right: 12px; top: calc(56px + env(safe-area-inset-top)); background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); min-width: 220px; overflow: hidden; }
.menu-head { padding: 12px 14px; display: flex; flex-direction: column; border-bottom: 1px solid var(--border); }
.menu-theme { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.menu-item { width: 100%; text-align: left; padding: 12px 14px; border: 0; background: transparent; }
.menu-item:hover { background: var(--orange-50); }

main { max-width: 860px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }

/* --- Arama & kategoriler --- */
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 0 12px; box-shadow: var(--shadow); }
.search:focus-within { border-color: var(--orange); }
.search svg { fill: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: transparent; padding: 12px 0; width: 100%; font-size: 16px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 14px;
  font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.chip .count { opacity: .65; margin-left: 4px; }

/* --- Liste --- */
.group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 18px 4px 8px; font-weight: 700; }
.card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 8px 10px 12px; margin-bottom: 8px; }
.card-main { flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; padding: 0; display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 17px; background: var(--orange); }
.card-text { min-width: 0; }
.card-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: flex; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

.fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 18px;
  border: 0; background: var(--orange); color: #fff; font-size: 30px; line-height: 1; box-shadow: 0 8px 24px rgba(255, 122, 0, .4); }
.fab:active { transform: scale(.96); }

/* --- Logo renkleri (bilinen platformlar) --- */
.logo.has-img, .logo.has-img[data-brand] { background: #fff; border: 1px solid var(--border); } /* marka rengi ikonun arkasında kalmasın */
.logo img { width: 26px; height: 26px; border-radius: 6px; }
.logo[data-brand="facebook"] { background: #1877F2; }
.logo[data-brand="instagram"] { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.logo[data-brand="google"] { background: #4285F4; }
.logo[data-brand="youtube"] { background: #FF0000; }
.logo[data-brand="linkedin"] { background: #0A66C2; }
.logo[data-brand="x"], .logo[data-brand="twitter"], .logo[data-brand="tiktok"], .logo[data-brand="apple"] { background: #111; }
.logo[data-brand="whatsapp"] { background: #25D366; }
.logo[data-brand="mixpanel"] { background: #7856FF; }
.logo[data-brand="clickup"] { background: #7B68EE; }
.logo[data-brand="slack"] { background: #4A154B; }
.logo[data-brand="figma"] { background: #A259FF; }
.logo[data-brand="github"] { background: #24292F; }
.logo[data-brand="aws"] { background: #FF9900; }
.logo[data-brand="mail"] { background: #EA4335; }

/* --- Modal (mobilde alt sayfa) --- */
.modal-root { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 15, 12, .45); animation: fade .15s; }
.modal { position: relative; width: 100%; max-width: 520px; max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 22px 22px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  animation: up .2s ease-out; }
@media (min-width: 640px) {
  .modal-root { align-items: center; }
  .modal { border-radius: 22px; }
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 19px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }

/* --- Form --- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; background: var(--bg); font-size: 16px; outline: 0;
}
.input:focus { border-color: var(--orange); background: var(--surface); }
textarea.input { resize: vertical; min-height: 70px; }
.input-group { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); padding-right: 4px; }
.input-group:focus-within { border-color: var(--orange); background: var(--surface); }
.input-group .input { border: 0; background: transparent; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .3px; }

/* --- Detay satırları --- */
.detail-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bg); border-radius: 12px; margin-bottom: 8px; }
.detail-row .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.detail-row .value { word-break: break-all; }
.detail-row > div { flex: 1; min-width: 0; }
.meta { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* --- Şifre üretici --- */
.generator { background: var(--orange-50); border-radius: 14px; padding: 14px; margin: -4px 0 14px; }
.gen-output { display: flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 10px; padding: 8px 8px 8px 12px; margin-bottom: 12px; }
.gen-output code { flex: 1; word-break: break-all; font-size: 15px; }
.gen-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.gen-row input[type=range] { flex: 1; accent-color: var(--orange); }
.gen-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.gen-opts label { display: flex; align-items: center; gap: 8px; }
input[type=checkbox] { accent-color: var(--orange); width: 18px; height: 18px; }
.strength { height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; margin-top: 6px; }
.strength > i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.strength > i.s1 { width: 25%; background: var(--danger); }
.strength > i.s2 { width: 50%; background: #F9AB00; }
.strength > i.s3 { width: 75%; background: #7CB342; }
.strength > i.s4 { width: 100%; background: var(--success); }

/* --- Yönetim --- */
.segmented { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.seg { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.seg.active { background: var(--orange); color: #fff; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); width: 100%;
  background: transparent; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.row:last-child { border-bottom: 0; }
button.row:hover { background: var(--orange-50); }
.row-main { flex: 1; min-width: 0; }
.row-main .card-sub { white-space: normal; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--orange-50); color: var(--orange); white-space: nowrap; }
.pill.gray { background: var(--bg); color: var(--muted); }
.stack { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.hint { font-size: 13px; color: var(--muted); margin: 0 4px 12px; }
.add-row { display: flex; gap: 8px; margin-bottom: 12px; }
.add-row .input { flex: 1; }

.grants { display: flex; flex-direction: column; gap: 2px; }
.grant { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; min-height: 56px; }
.grant.on { background: var(--orange-50); }
.grant-all { margin-bottom: 6px; border: 1px dashed var(--border); }
.grant label { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.grant input[type="checkbox"] { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--orange); }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--orange-100); color: var(--orange); font-weight: 700; font-size: 13px; }
.avatar-sm svg { width: 18px; height: 18px; fill: currentColor; }
.who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.who b, .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--muted); font-size: 12px; }
.grant select { width: auto; flex: none; padding: 6px 10px; font-size: 13px; border-radius: 999px; background: var(--surface); }
.grant select[hidden] { display: none; }

.audit-item { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.audit-item:last-child { border-bottom: 0; }
.audit-item .when { font-size: 12px; color: var(--muted); }

/* --- Toast --- */
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  z-index: 100; box-shadow: var(--shadow); animation: up .15s; max-width: calc(100% - 32px); text-align: center; }

@media (max-width: 520px) {
  .card-actions .hide-sm { display: none; }
}

/* --- Notlar --- */
.notes-grid { columns: 2 240px; column-gap: 12px; margin-top: 8px; }
.note { break-inside: avoid; display: block; width: 100%; text-align: left; margin: 0 0 12px; padding: 14px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.note:hover { border-color: var(--orange-100); box-shadow: var(--shadow); }
.note h3 { margin: 0 0 6px; font-size: 15px; display: flex; gap: 6px; align-items: flex-start; }
.note h3 span { flex: 1; word-break: break-word; }
.note-body { white-space: normal; word-break: break-word; font-size: 14px; max-height: 220px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.note-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.note[data-color="orange"], .note-editor[data-color="orange"] { background: #FFE8D2; border-color: #FFD3AA; }
.note[data-color="yellow"], .note-editor[data-color="yellow"] { background: #FFF6C7; border-color: #F5E79A; }
.note[data-color="green"], .note-editor[data-color="green"] { background: #E2F5E1; border-color: #C3E6C0; }
.note[data-color="blue"], .note-editor[data-color="blue"] { background: #E0EEFF; border-color: #BCD8FA; }
.note[data-color="purple"], .note-editor[data-color="purple"] { background: #EFE5FF; border-color: #D9C6FA; }
.note[data-color="pink"], .note-editor[data-color="pink"] { background: #FFE3EE; border-color: #F8C2D7; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .note[data-color="orange"], :root:not([data-theme="light"]) .note-editor[data-color="orange"] { background: #3D2817; border-color: #5A3A1F; }
  :root:not([data-theme="light"]) .note[data-color="yellow"], :root:not([data-theme="light"]) .note-editor[data-color="yellow"] { background: #38321A; border-color: #524824; }
  :root:not([data-theme="light"]) .note[data-color="green"], :root:not([data-theme="light"]) .note-editor[data-color="green"] { background: #1C3020; border-color: #29452E; }
  :root:not([data-theme="light"]) .note[data-color="blue"], :root:not([data-theme="light"]) .note-editor[data-color="blue"] { background: #1A2A3D; border-color: #273E58; }
  :root:not([data-theme="light"]) .note[data-color="purple"], :root:not([data-theme="light"]) .note-editor[data-color="purple"] { background: #2A2140; border-color: #3E315C; }
  :root:not([data-theme="light"]) .note[data-color="pink"], :root:not([data-theme="light"]) .note-editor[data-color="pink"] { background: #3A1E2A; border-color: #552B3D; }
}
:root[data-theme="dark"] .note[data-color="orange"], :root[data-theme="dark"] .note-editor[data-color="orange"] { background: #3D2817; border-color: #5A3A1F; }
:root[data-theme="dark"] .note[data-color="yellow"], :root[data-theme="dark"] .note-editor[data-color="yellow"] { background: #38321A; border-color: #524824; }
:root[data-theme="dark"] .note[data-color="green"], :root[data-theme="dark"] .note-editor[data-color="green"] { background: #1C3020; border-color: #29452E; }
:root[data-theme="dark"] .note[data-color="blue"], :root[data-theme="dark"] .note-editor[data-color="blue"] { background: #1A2A3D; border-color: #273E58; }
:root[data-theme="dark"] .note[data-color="purple"], :root[data-theme="dark"] .note-editor[data-color="purple"] { background: #2A2140; border-color: #3E315C; }
:root[data-theme="dark"] .note[data-color="pink"], :root[data-theme="dark"] .note-editor[data-color="pink"] { background: #3A1E2A; border-color: #552B3D; }
.note-editor { margin: -20px -20px calc(-20px - env(safe-area-inset-bottom)); padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: inherit; min-height: 100%; }
.note-title-input { width: 100%; border: 0; outline: 0; background: transparent; color: inherit; font-size: 20px; font-weight: 700; padding: 4px 0; }
.note-body-input { width: 100%; border: 0; outline: 0; background: transparent; color: inherit; resize: none; min-height: 40vh; font-size: 16px; line-height: 1.55; padding: 8px 0; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); padding: 0; background: var(--surface); }
.swatch[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 2px var(--surface) inset; }
.swatch[data-c="orange"] { background: #FFC48F; } .swatch[data-c="yellow"] { background: #FBE27A; }
.swatch[data-c="green"] { background: #A8DCA4; } .swatch[data-c="blue"] { background: #9CC6F5; }
.swatch[data-c="purple"] { background: #C7AEF5; } .swatch[data-c="pink"] { background: #F5A3C3; }
.icon-btn.on { color: var(--orange); }
.pill.ext { background: #E8F0FE; color: #1A73E8; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 3px 4px 3px 10px; border-radius: 999px; background: #E8F0FE; color: #1A73E8; }
.ext-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); padding: 6px 8px; min-height: 44px; }
.ext-toggle { margin-left: auto; border: 0; background: transparent; color: var(--orange); font-weight: 600; font-size: 14px; padding: 4px 6px; cursor: pointer; }
.ext-panel { margin-top: 6px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); padding: 8px; }
.ext-panel[hidden] { display: none; }
.ext-list { max-height: 240px; overflow: auto; margin-top: 6px; }
.ext-row { display: flex; align-items: center; gap: 4px; padding: 2px 4px; border-radius: 8px; }
.ext-row:hover { background: var(--bg); }
.ext-row label { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; min-width: 0; }
.ext-row label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext-row .input { flex: 1; padding: 6px 10px; }
.ext-row .icon-btn { width: 32px; height: 32px; }
.ext-row .icon-btn svg { width: 17px; height: 17px; }
.ext-row.busy { opacity: .5; pointer-events: none; }
.ext-ask { flex: 1; font-size: 13px; }
.ext-add { display: block; width: 100%; text-align: left; border: 1px dashed var(--orange); background: var(--orange-50); color: var(--orange); font-weight: 600; border-radius: 8px; padding: 8px 10px; margin-bottom: 4px; cursor: pointer; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.tag button { border: 0; background: transparent; color: inherit; font-size: 15px; line-height: 1; padding: 0 4px; cursor: pointer; }
.note-body-plain { white-space: pre-wrap; }
.export-box { display: flex; align-items: center; gap: 12px; justify-content: space-between; background: var(--orange-50);
  border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }

/* Notlarda basit markdown */
.md { word-break: break-word; }
.md p { margin: 0 0 6px; }
.md .md-h { font-weight: 700; margin: 8px 0 4px; line-height: 1.3; }
.md .md-h:first-child { margin-top: 0; }
.md .md-h1 { font-size: 1.3em; } .md .md-h2 { font-size: 1.15em; } .md .md-h3 { font-size: 1em; }
.md ul, .md ol { margin: 0 0 6px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md li.md-task { list-style: none; margin-left: -18px; }
.md li.md-task.done { color: var(--muted); text-decoration: line-through; }
.md .md-box { text-decoration: none; display: inline-block; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: color-mix(in srgb, var(--text) 8%, transparent); padding: 1px 5px; border-radius: 5px; }
.md a, .md .md-link { color: #3B82F6; text-decoration: underline; word-break: break-all; }
/* Not düzenleyici (Quill) — tema renklerine uyum */
.quill-host .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent); padding: 6px 0; position: sticky; top: 0; z-index: 2; background: inherit; }
.quill-host .ql-container.ql-snow { border: 0; font: inherit; font-size: 16px; }
.quill-host .ql-editor { min-height: 40vh; padding: 12px 0; line-height: 1.55; }
.quill-host .ql-editor.ql-blank::before { left: 0; right: 0; color: var(--muted); font-style: normal; }
.ql-snow .ql-stroke { stroke: currentColor; } .ql-snow .ql-fill { fill: currentColor; }
.ql-snow.ql-toolbar button, .ql-snow .ql-picker { color: inherit; }
.ql-snow .ql-picker-label { color: inherit; }
.ql-snow .ql-picker-options { background: var(--surface); color: var(--text); border-color: var(--border) !important; border-radius: 10px; box-shadow: var(--shadow); }
.ql-snow.ql-toolbar button:hover, .ql-snow.ql-toolbar button.ql-active, .ql-snow .ql-picker-label:hover, .ql-snow .ql-picker-label.ql-active { color: var(--orange); }
.ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke, .ql-snow .ql-picker-label:hover .ql-stroke, .ql-snow .ql-picker-label.ql-active .ql-stroke { stroke: var(--orange); }
.ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--orange); }
.ql-snow .ql-tooltip { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow); z-index: 3; }
.ql-snow .ql-tooltip input[type=text] { background: var(--bg); color: var(--text); border-color: var(--border); }
/* Kart ve okuma görünümünde aynı biçim */
.note-html.ql-editor { padding: 0; min-height: 0; height: auto; overflow: visible; white-space: normal; font-size: inherit; line-height: 1.5; cursor: inherit; }
.note-html.ql-editor p, .note-html.ql-editor li { cursor: inherit; }
.note-html.ql-editor h1 { font-size: 1.3em; } .note-html.ql-editor h2 { font-size: 1.15em; } .note-html.ql-editor h3 { font-size: 1em; }
.ql-editor blockquote { border-left: 3px solid var(--orange); margin: 4px 0; padding-left: 10px; color: var(--muted); }
.md .md-box { cursor: default; }
.connect-box { display: flex; align-items: center; gap: 12px; justify-content: space-between; background: var(--orange-50);
  border-radius: var(--radius); padding: 14px; margin: 12px 0; }
@media (max-width: 520px) { .connect-box { flex-direction: column; align-items: stretch; } }
/* Not düzenleyici geniş pencere */
.modal:has(.note-editor) { max-width: 880px; }
.popup-root { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.popup { position: relative; width: 100%; max-width: 480px; max-height: 80vh; max-height: 80dvh; overflow-y: auto; background: var(--surface);
  border-radius: 22px; padding: 20px; box-shadow: var(--shadow); animation: up .15s ease-out; }
.btn-share { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; }
.btn-share svg { width: 18px; height: 18px; }
.field small.opt { font-weight: 400; color: var(--muted); font-size: 12px; }
.share-panel { margin-top: 12px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent); }

/* --- Telefon: alt sekme çubuğu, taşma yok --- */
.app { overflow-x: clip; }
.brand, .avatar { flex: none; }
.input, textarea.input { min-width: 0; max-width: 100%; }
.card-main, .card-text, .modal, .popup { min-width: 0; }
.modal *, .popup * { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  /* backdrop-filter sabit (fixed) alt çubuğu üst barın içine hapseder; telefonda düz arka plan */
  .topbar { justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; gap: 0;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; font-size: 11px; border-radius: 12px; }
  .tab.active { background: transparent; }
  .tab svg { display: block; width: 100%; max-width: 56px; height: 30px; padding: 3px 0; border-radius: 999px; fill: currentColor; }
  .tab { min-width: 0; overflow: hidden; }
  .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab.active svg { background: var(--orange-50); }
  main { padding: 12px 12px calc(150px + env(safe-area-inset-bottom)); }
  .fab { right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 54px; height: 54px; }
  .toast { bottom: calc(144px + env(safe-area-inset-bottom)); }
  .menu { right: 8px; left: 8px; min-width: 0; }
  .modal { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 94dvh; }
  .modal-foot .btn { flex: 1 1 calc(50% - 8px); white-space: nowrap; justify-content: center; }
  .modal-foot .spacer { display: none; }
  .popup-root { align-items: flex-end; padding: 0; }
  .popup { max-width: none; border-radius: 22px 22px 0 0; max-height: 88dvh; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .notes-grid { columns: 1; }
  .ql-toolbar.ql-snow { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ql-toolbar.ql-snow .ql-formats { flex: none; }
}

/* --- Kimler erişebilir: ekip (avatarlar) ve şirket dışı (bina ikonu) --- */
.stack { align-items: center; }
.team-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--orange-50); color: var(--orange); font-size: 12px; font-weight: 600; }
.team-chip > svg { width: 14px; height: 14px; fill: currentColor; }
.faces { display: inline-flex; }
.face { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700;
  background: var(--orange); color: #fff; border: 2px solid var(--surface); margin-left: -5px; }
.face:first-child { margin-left: 0; }
.face.more { background: var(--muted); }
.ext-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ext-chip svg { width: 13px; height: 13px; fill: currentColor; flex: none; }
.access { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.access-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-top: 4px; }
.access-person { display: flex; align-items: center; gap: 10px; }
.access-person .who { flex: 1; }
.team-tag { background: var(--orange-50); color: var(--orange); padding: 3px 10px; }
.team-tag small { font-weight: 500; opacity: .8; }
.ext-panel .grants { max-height: 300px; overflow: auto; }
.menu-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.menu-switch input { width: 20px; height: 20px; accent-color: var(--orange); margin: 0; }
.send-fields { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; }
.send-field { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg); cursor: pointer; font-weight: 600; }
.send-field input { width: 20px; height: 20px; margin: 0; accent-color: var(--orange); }
.send-foot .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.send-foot .btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn-whatsapp { background: #25D366; border-color: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1EBE5A; }

/* --- Dosyalar (Google Drive) --- */
.chips .chip svg { width: 15px; height: 15px; fill: currentColor; vertical-align: -2px; margin-right: 5px; }
.files-bar { display: flex; align-items: center; gap: 8px; margin: 4px 2px 10px; min-height: 34px; }
.crumbs { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.view-toggle { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 2px; flex: none; }
.view-toggle button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 5px 7px; display: grid; place-items: center; }
.view-toggle button svg { width: 17px; height: 17px; fill: currentColor; }
.view-toggle button.active { background: var(--orange-50); color: var(--orange); }
.crumbs button { border: 0; background: transparent; color: var(--orange); font-weight: 600; padding: 2px 4px; }
.crumbs button:disabled { color: var(--text); }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 6px; }
.file { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 8px; min-width: 0; color: inherit; }
.file:hover { border-color: var(--orange-100); box-shadow: var(--shadow); }
.file-thumb { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--bg); display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb img.file-icon { width: 36px; height: 36px; object-fit: contain; }
.file-thumb > svg { width: 44px; height: 44px; fill: var(--muted); }
.file.folder .file-thumb > svg { fill: var(--orange); }
.file-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popup.viewer { max-width: 960px; max-height: 94dvh; }
.viewer-body { display: grid; place-items: center; min-height: 220px; background: var(--bg); border-radius: 12px; overflow: hidden; }
.viewer-body img { max-width: 100%; max-height: 72dvh; object-fit: contain; display: block; }
.viewer-body video { max-width: 100%; max-height: 72dvh; }
.viewer-pdf { width: 100%; height: 72dvh; border: 0; background: #fff; }
.viewer-text { width: 100%; max-height: 72dvh; overflow: auto; margin: 0; padding: 14px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.viewer-none { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; text-align: center; }
.viewer-none > svg { width: 48px; height: 48px; fill: var(--muted); }
.viewer-meta { align-self: center; }
.viewer .modal-foot .btn:disabled { opacity: .5; }
.viewer .modal-foot .btn { display: inline-flex; align-items: center; gap: 6px; }
.viewer .modal-foot .btn svg { width: 17px; height: 17px; fill: currentColor; }
@media (max-width: 640px) { .files-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.file-thumb { position: relative; }
.file-play { position: absolute; inset: auto auto 6px 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; border-radius: 999px; padding: 2px 7px; }
/* Liste görünümü */
.files-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.files-list .file { flex-direction: row; align-items: center; gap: 12px; padding: 8px 10px; }
.files-list .file-thumb { width: 44px; height: 44px; aspect-ratio: auto; margin: 0; flex: none; border-radius: 9px; }
.files-list .file-thumb > svg { width: 26px; height: 26px; }
.files-list .file-thumb img.file-icon { width: 24px; height: 24px; }
.files-list .file-play { inset: auto auto 2px 2px; font-size: 8px; padding: 1px 4px; }
.file-text { min-width: 0; flex: 1; }
/* Galeri */
.viewer-stage { position: relative; touch-action: pan-y pinch-zoom; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.45); color: #fff; font-size: 26px; line-height: 1; display: grid; place-items: center; }
.viewer-nav.prev { left: 8px; }
.viewer-nav.next { right: 8px; }
.viewer .modal-head h2 { font-size: 16px; white-space: nowrap; }
@media (max-width: 640px) {
  .popup.viewer { padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
  .viewer-nav { width: 34px; height: 34px; font-size: 22px; }
  .viewer .modal-foot .viewer-meta { display: none; }
}
/* Dosya öğesi: ⋯ düğmesi, uzun basınca seçim olmasın */
.file { position: relative; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.file:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.file-more { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text); font-size: 18px; line-height: 1;
  display: grid; place-items: center; opacity: 0; transition: opacity .12s; }
.file:hover .file-more, .file:focus-within .file-more { opacity: 1; }
@media (pointer: coarse) { .file-more { opacity: 1; } }
.files-list .file-more { position: static; opacity: 1; flex: none; background: transparent; }
#view-files.dropping { outline: 2px dashed var(--orange); outline-offset: 6px; border-radius: 16px; }
/* Sağ tık menüsü (masaüstü) */
.ctx-menu { position: fixed; z-index: 80; min-width: 210px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; animation: fade .1s; }
.ctx-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--text); }
.ctx-item:hover { background: var(--orange-50); }
.ctx-item svg { width: 18px; height: 18px; fill: var(--muted); flex: none; }
.ctx-item.danger, .ctx-item.danger svg { color: var(--danger); fill: var(--danger); }
/* Telefonda alttan açılan menü */
.popup.sheet { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
.popup.sheet .ctx-item { padding: 14px 12px; font-size: 16px; }
/* Drive paylaşımı */
.perm-popup { max-width: 540px; }
.perm-add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.perm-add-row { display: flex; gap: 8px; align-items: center; }
.perm-add-row .input[type="email"] { flex: 1; min-width: 0; }
.perm-add-row select.input { width: auto; flex: none; }
.perm-notify { flex: 1; display: flex; align-items: center; gap: 6px; }
.perm-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.perm-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.perm-row .who { flex: 1; }
.perm-row select.input { width: auto; flex: none; padding: 6px 10px; font-size: 13px; border-radius: 999px; }
.perm-toggle { cursor: pointer; border-top: 1px solid var(--border); }
.perm-toggle input { width: 20px; height: 20px; accent-color: var(--orange); }
/* İkonlu düğmeler (her yerde aynı boy) */
.btn:has(> svg) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn > svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.perm-team { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-pick { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--bg);
  border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 600; font-size: 14px; color: var(--text); }
.perm-pick .avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.perm-pick.on { border-color: var(--orange); background: var(--orange-50); color: var(--orange); }
.perm-pick.on .avatar-sm { background: var(--orange); color: #fff; }
/* --- Hatırlatıcılar --- */
.rem-card { cursor: pointer; align-items: flex-start; }
.rem-card.done { opacity: .55; }
.rem-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--orange-50); color: var(--orange); }
.rem-icon svg { width: 22px; height: 22px; fill: currentColor; }
.rem-icon.soon { background: var(--orange); color: #fff; }
.rem-when { font-weight: 700; color: var(--orange); font-size: 14px; margin: 2px 0; }
.rem-actions { display: flex; gap: 6px; align-self: center; flex: none; }
.rem-actions .btn { padding: 7px 12px; font-size: 13px; }
.rem-row { display: flex; gap: 10px; }
.rem-row .field { flex: 1; min-width: 0; }
.rem-preview { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.day-chip { min-width: 40px; border: 1px solid var(--border); background: var(--bg); border-radius: 10px; padding: 7px 8px; font-weight: 600; font-size: 13px; color: var(--text); }
.day-chip.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.perm-pick small { font-weight: 700; }
.viewer-body.pdf-pages { display: block; overflow: auto; max-height: 72dvh; padding: 8px; -webkit-overflow-scrolling: touch; }
.pdf-page { display: block; width: 100%; height: auto; margin: 0 auto 8px; background: #fff; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
/* Geri sayım */
.rem-count { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 8px; }
.big-count { display: flex; gap: 8px; margin: 6px 0 14px; }
.big-count-cell { flex: 1; text-align: center; background: var(--orange-50); border-radius: 14px; padding: 10px 4px; }
.big-count-cell b { display: block; font-size: 28px; line-height: 1.1; color: var(--orange); font-variant-numeric: tabular-nums; }
.big-count-cell small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.big-count-now { flex: 1; text-align: center; font-weight: 700; color: var(--orange); background: var(--orange-50); border-radius: 14px; padding: 14px; }
/* Şifre sağlığı */
.health-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 10px 12px; margin: 10px 0 4px; color: inherit; }
.health-score { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-content: center; text-align: center;
  background: #FFF1E0; color: #B45309; }
.health-card.ok .health-score { background: #E2F5E1; color: #1E7B34; }
.health-score b { font-size: 15px; line-height: 1; }
.health-score small { font-size: 9px; }
.health-go { margin-left: auto; color: var(--muted); font-size: 22px; }
.pill.warn { background: #FFF1E0; color: #B45309; }
.health-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 4px; border-radius: 10px; color: inherit; }
.health-row:hover { background: var(--bg); }
.health-row .who { flex: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .health-score, :root:not([data-theme="light"]) .pill.warn { background: #3D2817; color: #FDBA74; } }
:root[data-theme="dark"] .health-score, :root[data-theme="dark"] .pill.warn { background: #3D2817; color: #FDBA74; }
/* --- Takvim --- */
.cal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-top: 6px; }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cal-head b { flex: 1; text-align: center; font-size: 16px; }
.cal-head .icon-btn { font-size: 22px; }
.cal-today { padding: 5px 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 0 6px; }
.cal-cell { aspect-ratio: 1 / .9; border: 0; background: transparent; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text); font-size: 14px; font-weight: 600; }
.cal-cell.out { color: var(--muted); opacity: .5; }
.cal-cell.today span { color: var(--orange); }
.cal-cell.sel { background: var(--orange); color: #fff; }
.cal-cell.sel span { color: #fff; }
.cal-cell:not(.sel):hover { background: var(--orange-50); }
.cal-dots { display: flex; gap: 2px; height: 5px; }
.cal-dots b { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.cal-dots b.meet { background: #1A73E8; }
.cal-dots b.rem { background: var(--orange); }
.cal-cell.sel .cal-dots b { background: #fff; }
.cal-empty { padding: 4px; }
.ev-card { cursor: pointer; }
.ev-card.live { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.ev-card.declined { opacity: .55; }
.ev-time { width: 50px; flex: none; display: flex; flex-direction: column; align-items: center; color: var(--orange); }
.ev-time b { font-size: 15px; }
.ev-time small { font-size: 12px; color: var(--muted); }
.ev-join { flex: none; align-self: center; background: #1A73E8; border-color: #1A73E8; }
.ev-join-big { width: 100%; margin: 4px 0 12px; background: #1A73E8; border-color: #1A73E8; }
.ev-desc { max-height: 180px; overflow: auto; }
.ev-rsvp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
/* Kişi kutucukları ile altındaki alan / açıklama arası */
.field .perm-team { margin-bottom: 10px; }
.field .perm-team + .perm-add-row, .field .perm-team ~ small { display: block; margin-top: 8px; }
.field > small.muted { display: block; margin-top: 8px; line-height: 1.4; }
.rem-time svg { width: 20px; height: 20px; fill: var(--orange); }
.ev-card.rem-card { border-left: 3px solid var(--orange); }
.ev-card:not(.rem-card) { border-left: 3px solid #1A73E8; }
.cal-mode { margin: 6px 0 10px; }
.rem-time small + small { margin-top: 0; }
.cal-legend { display: flex; justify-content: center; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend b { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.cal-legend b.meet { background: #1A73E8; }

/* Yükleniyor çubuğu: üst barın alt kenarında, bir şey yüklenirken kayan turuncu çizgi */
.loadbar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; overflow: hidden; pointer-events: none; }
.loadbar::before { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 3px;
  background: var(--orange); animation: loadbar 1.1s ease-in-out infinite; }
@keyframes loadbar { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .loadbar::before { animation-duration: 2.5s; } }
/* Bildirim izni kutusu */
.push-actions { display: flex; gap: 8px; flex: none; }
.push-actions .btn { flex: 1; }

/* Yükleme paneli (Drive'daki gibi sağ altta) */
.upl { position: fixed; right: 20px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 40; width: 360px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 10px 32px rgba(0, 0, 0, .18); overflow: hidden; }
.upl-head { display: flex; align-items: center; gap: 4px; padding: 10px 8px 8px 14px; cursor: pointer; user-select: none; }
.upl-title { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upl-toggle { font-size: 16px; color: var(--muted); }
.upl-bar, .upl-mini { height: 4px; background: var(--orange-50); overflow: hidden; }
.upl-bar { margin: 0 14px 10px; border-radius: 4px; }
.upl-bar i, .upl-mini i { display: block; height: 100%; background: var(--orange); border-radius: inherit; transition: width .25s ease-out; }
.upl-bar i.warn { background: var(--danger); }
.upl-list { max-height: min(44vh, 320px); overflow-y: auto; border-top: 1px solid var(--border); padding: 4px 0; }
.upl-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; }
.upl-ico { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--orange-50); color: var(--orange); font-weight: 800; }
.upl-ico svg { width: 16px; height: 16px; fill: currentColor; }
.upl-row.done .upl-ico { background: color-mix(in srgb, #1E8E3E 14%, transparent); color: #1E8E3E; }
.upl-row.error .upl-ico { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.upl-row.canceled { opacity: .55; }
.upl-text { flex: 1; min-width: 0; }
.upl-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upl-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upl-row.error .upl-sub { color: var(--danger); }
.upl-mini { margin-top: 4px; border-radius: 3px; }
@media (max-width: 640px) {
  .upl { left: 12px; right: 12px; width: auto; max-width: none; bottom: calc(146px + env(safe-area-inset-bottom)); }
}

/* Klavye açıkken pencereler klavyenin üstünde kalır (--kb: klavye yüksekliği, app.js) */
.modal-root, .popup-root { bottom: var(--kb, 0px); transition: bottom .2s ease-out; }
.modal { max-height: calc(92dvh - var(--kb, 0px)); }
.popup { max-height: calc(80dvh - var(--kb, 0px)); }
.choice-list { display: grid; gap: 8px; margin-top: 16px; }
.choice-list .btn { width: 100%; justify-content: center; }
