/* HarclikGo — Mobile-first native app feel */
:root {
  --bg: #f3f7f4;
  --bg-deep: #e8f0ea;
  --surface: #ffffff;
  --ink: #1a2e24;
  --ink-soft: #5a6f63;
  --muted: #8a9b91;
  --line: #d5e3da;
  --brand: #0d9f6e;
  --brand-dark: #087a54;
  --brand-soft: #d8f5e8;
  --accent: #ff6b35;
  --accent-soft: #ffe8df;
  --gold: #f5b800;
  --gold-soft: #fff3c4;
  --danger: #e5484d;
  --danger-soft: #ffe5e5;
  --ok: #0d9f6e;
  --shadow: 0 8px 28px rgba(26, 46, 36, 0.08);
  --shadow-sm: 0 2px 10px rgba(26, 46, 36, 0.06);
  --radius: 20px;
  --radius-sm: 14px;
  --nav-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Nunito", system-ui, sans-serif;
  --display: "Fredoka", "Nunito", sans-serif;
  --max: 480px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100%;
  min-height: 100dvh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body.app-shell {
  max-width: var(--max);
  margin: 0 auto;
  background:
    radial-gradient(ellipse 120% 40% at 50% -5%, rgba(45, 212, 168, 0.18), transparent 55%),
    var(--bg);
  position: relative;
  box-shadow: 0 0 0 1px rgba(26,46,36,0.04);
}

@media (min-width: 481px) {
  body.app-shell {
    min-height: 100dvh;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  html {
    background: #cfdad3;
  }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* —— App chrome —— */
.app-top {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: calc(12px + var(--safe-t)) 18px 12px;
  background: rgba(243, 247, 244, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-top h1 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-top .sub {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.hk-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 6px 14px;
  background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
  border-bottom: 1px solid rgba(13, 159, 110, 0.18);
  font-size: 0.78rem;
  line-height: 1.3;
}
.hk-meta-ver {
  font-weight: 800;
  color: #0d9f6e;
  letter-spacing: 0.02em;
}
.hk-meta-dev {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 700;
  color: #166534;
  white-space: nowrap;
}

.app-content {
  padding: 8px 18px calc(var(--nav-h) + var(--safe-b) + 20px);
  min-height: calc(100dvh - 60px);
  animation: fadeUp 0.35s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bottom tab bar — native feel */
.app-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--max);
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 8px 10px calc(8px + var(--safe-b));
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  z-index: 50;
  overflow: visible;
}

.app-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  border-radius: 14px;
  padding: 6px 4px;
  transition: color 0.15s, background 0.15s, transform 0.15s;
}

.app-nav a .ico {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}

.app-nav a .ico svg { width: 28px; height: 28px; display: block; }
.app-nav a .ico {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 3px rgba(15, 60, 40, .18));
}

.app-nav a.active {
  color: var(--brand);
  background: linear-gradient(180deg, #e8fff4, #c8f5df);
  box-shadow:
    0 3px 0 #9fd9bc,
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.app-nav a:active { transform: scale(0.94); }

.app-nav.nav-3 { grid-template-columns: repeat(3, 1fr); }
.app-nav.nav-4 { grid-template-columns: repeat(4, 1fr); }
.app-nav.nav-5 { grid-template-columns: repeat(5, 1fr); }
.app-nav.nav-5 a { font-size: 0.62rem; padding: 6px 2px; }
.app-nav.nav-5 a .ico svg { width: 22px; height: 22px; }
.app-nav.nav-6 { grid-template-columns: repeat(6, 1fr); }
.app-nav.nav-6 a { font-size: 0.58rem; padding: 5px 1px; }
.app-nav.nav-6 a .ico svg { width: 20px; height: 20px; }
.app-nav.nav-6 a .ico { width: 32px; height: 32px; }
.app-nav.nav-7 { grid-template-columns: repeat(7, 1fr); }
.app-nav.nav-7 a { font-size: 0.52rem; padding: 5px 0; }
.app-nav.nav-7 a .ico svg { width: 18px; height: 18px; }
.app-nav.nav-7 a .ico { width: 28px; height: 28px; }

/* Mouse hover açıklama — fare ayrılınca kapanır */
.nav-tip {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .app-nav a,
  .settings-tab {
    position: relative;
  }
  .nav-tip {
    display: block;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 90;
    min-width: 120px;
    max-width: 220px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #102820;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    box-shadow: 0 10px 24px rgba(16, 40, 32, 0.28);
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
    white-space: normal;
  }
  .nav-tip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #102820;
  }
  .app-nav a:hover .nav-tip,
  .app-nav a:focus-visible .nav-tip,
  .settings-tab:hover .nav-tip,
  .settings-tab:focus-visible .nav-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  .settings-tabs .nav-tip {
    bottom: auto;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-6px);
  }
  .settings-tabs .nav-tip::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #102820;
  }
  .settings-tab:hover .nav-tip,
  .settings-tab:focus-visible .nav-tip {
    transform: translateX(-50%) translateY(0);
  }
  body.is-desktop .settings-tabs .nav-tip {
    left: calc(100% + 10px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) translateX(-6px);
  }
  body.is-desktop .settings-tabs .nav-tip::after {
    left: 0;
    top: 50%;
    bottom: auto;
    transform: translate(-100%, -50%);
    border: 6px solid transparent;
    border-right-color: #102820;
  }
  body.is-desktop .settings-tab:hover .nav-tip,
  body.is-desktop .settings-tab:focus-visible .nav-tip {
    transform: translateY(-50%) translateX(0);
  }
}

/* —— Splash / Welcome —— */
.welcome {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(24px + var(--safe-t)) 22px calc(28px + var(--safe-b));
  background:
    radial-gradient(ellipse 100% 70% at 0% 0%, rgba(61, 180, 242, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse 90% 60% at 100% 20%, rgba(255, 122, 69, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(13, 159, 110, 0.2) 0%, transparent 55%),
    linear-gradient(165deg, #f7fbf8 0%, #e5f6ee 100%);
  max-width: var(--max);
  margin: 0 auto;
}

.welcome-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 20px;
}

.welcome-logo {
  width: 80px;
  height: 80px;
  border-radius: 26px;
  background: linear-gradient(160deg, #2dd4a8, #0d9f6e);
  display: grid;
  place-items: center;
  box-shadow:
    0 6px 0 #087a54,
    0 14px 28px rgba(13, 159, 110, 0.4);
  animation: popIn 0.5s cubic-bezier(.2,1.2,.4,1) both;
}

.welcome-logo svg { width: 42px; height: 42px; }

@keyframes popIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.welcome h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 10vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  animation: fadeUp 0.45s 0.1s ease both;
}

.welcome p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 600;
  max-width: 18em;
  animation: fadeUp 0.45s 0.18s ease both;
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeUp 0.45s 0.25s ease both;
}

.welcome-actions .btn {
  min-height: 60px;
  font-size: 1.12rem;
}

.welcome-visual {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  animation: fadeUp 0.45s 0.22s ease both;
}

.welcome-visual img {
  width: 52px;
  height: 52px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 4px 0 #c5d8cc,
    0 8px 16px rgba(26, 46, 36, 0.1);
}

.welcome-credit {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 8px;
}

.welcome-credit a {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.alert-3d {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 800;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.12);
}

.alert-3d-wait {
  background: linear-gradient(180deg, #ffe8df, #ffd0b8);
  color: #8a3208;
  box-shadow: 0 5px 0 #d45520;
}

.alert-3d-ok {
  background: linear-gradient(180deg, #d8f5e8, #b8f0d4);
  color: #066845;
  box-shadow: 0 5px 0 #2aa876;
}

/* —— Buttons — 3D colorful —— */
.btn {
  --btn-face: #0d9f6e;
  --btn-edge: #087a54;
  --btn-shine: rgba(255, 255, 255, 0.28);
  --btn-depth: 5px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #fff;
  width: 100%;
  border: none;
  background:
    linear-gradient(180deg, var(--btn-shine) 0%, transparent 42%),
    linear-gradient(180deg, var(--btn-face) 0%, var(--btn-edge) 100%);
  box-shadow:
    0 var(--btn-depth) 0 var(--btn-edge),
    0 calc(var(--btn-depth) + 6px) 18px rgba(16, 32, 24, 0.22);
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  filter: brightness(1.04);
}

.btn:active,
.btn.is-pressed {
  transform: translateY(var(--btn-depth));
  box-shadow:
    0 0 0 var(--btn-edge),
    0 4px 10px rgba(16, 32, 24, 0.18);
}

.btn-primary {
  --btn-face: #12b57a;
  --btn-edge: #087a54;
}

.btn-secondary {
  --btn-face: #3db4f2;
  --btn-edge: #1a7fb8;
  color: #fff;
  border: none;
}

.btn-accent {
  --btn-face: #ff7a45;
  --btn-edge: #d45520;
}

.btn-gold {
  --btn-face: #ffc933;
  --btn-edge: #d49a00;
  color: #5a4200;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-app {
  --btn-face: #1a2e24;
  --btn-edge: #0a1610;
  color: #ffc933;
  text-shadow: none;
  box-shadow:
    0 var(--btn-depth) 0 var(--btn-edge),
    0 calc(var(--btn-depth) + 6px) 18px rgba(0, 0, 0, 0.22),
    inset 0 0 0 2px #ffc933;
}

.btn-pink {
  --btn-face: #ff6b9d;
  --btn-edge: #d44572;
}

.btn-danger {
  --btn-face: #ff5a5f;
  --btn-edge: #c93a3e;
}

.btn-mint {
  --btn-face: #2dd4a8;
  --btn-edge: #0f9f78;
}

.btn-ghost {
  --btn-face: #ffffff;
  --btn-edge: #c5d4cb;
  color: var(--ink-soft);
  text-shadow: none;
  min-height: 48px;
  box-shadow:
    0 var(--btn-depth) 0 var(--btn-edge),
    0 calc(var(--btn-depth) + 4px) 14px rgba(16, 32, 24, 0.08);
}

.btn-sm {
  min-height: 42px;
  padding: 0 14px;
  font-size: 0.9rem;
  width: auto;
  border-radius: 14px;
  --btn-depth: 4px;
}

.btn-icon {
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 16px;
  --btn-face: #ffffff;
  --btn-edge: #c5d4cb;
  --btn-depth: 3px;
  color: var(--ink);
  text-shadow: none;
  display: grid;
  place-items: center;
  width: 46px;
}

.btn-icon:active {
  transform: translateY(3px);
}

/* —— Cards / panels —— */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(26, 46, 36, 0.08);
  border: 2px solid rgba(213, 227, 218, 0.85);
}

.card + .card { margin-top: 12px; }

.balance-hero {
  background:
    radial-gradient(ellipse 80% 60% at 90% 10%, rgba(255, 201, 51, 0.35), transparent 50%),
    linear-gradient(145deg, #14c98a 0%, #0d9f6e 45%, #066845 100%);
  color: #fff;
  border-radius: 28px;
  padding: 22px 20px 20px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 0 #055c3c,
    0 16px 36px rgba(13, 159, 110, 0.35);
  margin-bottom: 18px;
  border: none;
}

.balance-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, transparent 40%);
  pointer-events: none;
}

.balance-hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.balance-hero .label {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.balance-hero .amount {
  font-family: var(--display);
  font-size: 2.7rem;
  letter-spacing: -0.03em;
  margin: 4px 0 14px;
  position: relative;
  z-index: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}

.balance-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.balance-stats .chip {
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  backdrop-filter: blur(6px);
}

.balance-stats .chip span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.85;
}

.balance-stats .chip strong {
  font-size: 1.1rem;
  font-weight: 800;
}

/* —— Task list —— */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 12px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: 1.2rem;
}

.section-head a, .section-head .link {
  color: var(--brand);
  font-weight: 800;
  font-size: 0.85rem;
}

.task-list { display: flex; flex-direction: column; gap: 12px; }

.task-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  border-radius: 22px;
  padding: 12px;
  border: 2px solid #dceae2;
  box-shadow:
    0 1px 0 #fff inset,
    0 6px 0 #c5d8cc,
    0 10px 20px rgba(26, 46, 36, 0.08);
  transition: transform 0.12s, box-shadow 0.12s;
}

.task-item:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 #fff inset,
    0 2px 0 #c5d8cc,
    0 4px 10px rgba(26, 46, 36, 0.08);
}

.task-item.done { opacity: 0.72; }

.task-schedule-groups { display: flex; flex-direction: column; gap: 18px; }
.task-schedule-group { display: flex; flex-direction: column; gap: 10px; }
.task-schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 0;
}
.task-schedule-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--ink);
}
.task-schedule-head p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}
.task-item-scheduled {
  grid-template-columns: 58px 64px 1fr auto;
}
.task-schedule-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 6px 4px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff9e8 0%, #ffe9a8 100%);
  border: 2px solid #f0d070;
  box-shadow: 0 2px 0 #e0bc58;
}
.task-schedule-clock {
  font-size: 0.95rem;
  font-weight: 900;
  color: #7a4e00;
  line-height: 1.1;
}
.task-schedule-date {
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #9a6b12;
}

/* Excel tarzı görev tablosu */
.task-excel-section { padding: 14px 12px 16px; overflow: hidden; }
.task-excel-hero { margin-bottom: 14px; border: 2px solid #b8dcc8; }
.task-excel-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 2px solid #d8e8de;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.task-excel-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.task-excel-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #eef9f2 0%, #d9f0e3 100%);
  color: #1a4632;
  font-weight: 900;
  text-align: left;
  padding: 10px 10px;
  border-bottom: 2px solid #b8dcc8;
  white-space: nowrap;
}
.task-excel-table tbody tr:nth-child(even) { background: #f8fcf9; }
.task-excel-table tbody tr:hover { background: #f0faf4; }
.task-excel-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #e6f0ea;
  vertical-align: top;
}
.task-excel-date, .task-excel-time {
  font-weight: 800;
  color: #2d5a44;
  white-space: nowrap;
}
.task-excel-task-inner {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.task-excel-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.task-excel-desc {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.task-excel-reward .badge { margin-right: 4px; }
.task-excel-status-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #fff6d6;
  color: #7a4e00;
}
.task-excel-row.status-completed .task-excel-status-pill { background: #e8f4ff; color: #1a4a7a; }
.task-excel-row.status-approved .task-excel-status-pill { background: #e8fff0; color: #1a6a3a; }
.task-excel-row.status-rejected .task-excel-status-pill { background: #ffe8e8; color: #8a1a1a; }
.task-proof-compact { gap: 6px; min-width: 180px; }
.task-proof-compact .task-proof-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.task-proof-compact .btn-xs {
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}
.task-proof-compact .task-proof-note {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.78rem;
  border-radius: 10px;
  border: 1px solid #cfe0d6;
}
.task-proof-compact .photo-preview-wrap img,
.task-proof-compact .photo-preview-wrap video {
  max-width: 120px;
  max-height: 80px;
  border-radius: 8px;
}
@media (max-width: 760px) {
  .task-excel-wrap { border-radius: 12px; }
  .task-excel-table { min-width: 640px; }
}

.task-thumb {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background:
    linear-gradient(160deg, #e8fff4 0%, #c8f5df 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.8),
    0 4px 0 #9fd9bc;
}

.task-thumb img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.task-body h3 {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.task-body p {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 2px;
}

.task-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.badge-money {
  background: linear-gradient(180deg, #ffe566, #f5b800);
  color: #6b5200;
  box-shadow: 0 3px 0 #c99200;
}

.badge-xp {
  background: linear-gradient(180deg, #7dd3fc, #3db4f2);
  color: #0a4d6e;
  box-shadow: 0 3px 0 #1a7fb8;
}

.badge-ok {
  background: linear-gradient(180deg, #b8f5d8, #6ee7b0);
  color: var(--brand-dark);
  box-shadow: 0 3px 0 #2aa876;
}

.badge-wait {
  background: linear-gradient(180deg, #ffd0b8, #ff8f5a);
  color: #8a3208;
  box-shadow: 0 3px 0 #d45520;
}

.badge-pending {
  background: #eef2f0;
  color: var(--ink-soft);
  box-shadow: 0 3px 0 #c5d0ca;
}

/* Template picker — instant image */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.template-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px 8px;
  text-align: center;
  transition: border-color 0.15s, transform 0.12s, background 0.15s;
  cursor: pointer;
}

.template-card:active { transform: scale(0.96); }

.template-card.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.template-card img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 auto 8px;
  display: block;
  background: #e8f0eb;
}

.template-card span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}

/* Forms */
.form-stack { display: flex; flex-direction: column; gap: 14px; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}

.field textarea { min-height: 90px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 48px !important;
  width: 100%;
  background: #f3f4f6 !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 14px !important;
  color: #1f2937;
}

.password-wrap input::placeholder {
  color: #9ca3af;
  font-weight: 600;
}

.password-wrap input:focus {
  border-color: var(--brand) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(13, 159, 110, 0.12);
}

.password-toggle {
  position: absolute !important;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px !important;
  height: 28px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50%;
  display: grid !important;
  place-items: center;
  color: #6b7280;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  cursor: pointer;
  z-index: 5;
  filter: none !important;
}

.password-toggle:hover,
.password-toggle:active,
.password-toggle[aria-pressed="true"] {
  color: var(--brand);
  background: transparent !important;
  transform: translateY(-50%) !important;
  box-shadow: none !important;
  filter: none !important;
}

.password-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pin-input {
  letter-spacing: 0.4em;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--display);
}

/* Avatar picker */
.avatar-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.avatar-row::-webkit-scrollbar { display: none; }

.avatar-opt {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid transparent;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-deep);
}

.avatar-opt.selected { border-color: var(--brand); }
.avatar-opt img { width: 100%; height: 100%; object-fit: cover; }

/* Kids list */
.kid-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f7fbf8);
  border-radius: 22px;
  border: 2px solid #dceae2;
  margin-bottom: 12px;
  box-shadow:
    0 1px 0 #fff inset,
    0 5px 0 #c5d8cc,
    0 10px 18px rgba(26, 46, 36, 0.07);
}

.kid-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffe8df, #ffd4c2);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 0 #e8b8a0;
}

.kid-avatar img { width: 100%; height: 100%; object-fit: cover; }

.kid-info { flex: 1; min-width: 0; }
.kid-info h3 { font-size: 1.05rem; font-weight: 800; font-family: var(--display); }
.kid-info p { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }

/* Empty state */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
}

.empty img {
  width: 80px;
  height: 80px;
  margin: 0 auto 14px;
  opacity: 0.85;
}

.empty h3 {
  font-family: var(--display);
  color: var(--ink);
  margin-bottom: 6px;
}

/* Toast */
.toast {
  position: fixed;
  top: calc(14px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(var(--max) - 36px);
  width: calc(100% - 36px);
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease both, toastOut 0.3s ease 2.7s forwards;
}

.toast-success { background: var(--brand); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--ink); color: #fff; }

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translate(-50%, -12px); }
}

/* Auth pages */
.auth-page {
  min-height: 100dvh;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(20px + var(--safe-t)) 22px calc(28px + var(--safe-b));
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.auth-page .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.auth-page h1 {
  font-family: var(--display);
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.auth-page .lead {
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 24px;
}

.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin-bottom: 22px;
}

.role-tabs a {
  text-align: center;
  padding: 14px;
  border-radius: 16px;
  font-weight: 800;
  font-family: var(--display);
  color: var(--ink-soft);
  background: linear-gradient(180deg, #fff, #eef4f0);
  box-shadow: 0 4px 0 #c5d4cb;
}

.role-tabs a.active {
  background: linear-gradient(180deg, #2dd4a8, #0d9f6e);
  color: #fff;
  box-shadow: 0 5px 0 #087a54;
  text-shadow: 0 1px 0 rgba(0,0,0,0.12);
}

/* Complete button big — 3D */
.complete-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2dd4a8 0%, #0d9f6e 100%);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow:
    0 5px 0 #087a54,
    0 10px 18px rgba(13, 159, 110, 0.4);
  flex-shrink: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}

.complete-btn:active {
  transform: translateY(5px);
  box-shadow:
    0 0 0 #087a54,
    0 4px 10px rgba(13, 159, 110, 0.3);
}

.complete-btn:disabled,
.complete-btn.done {
  background: linear-gradient(180deg, #d5e3da, #b8c9bf);
  color: var(--muted);
  box-shadow: 0 4px 0 #9aada3;
}

/* Approve row */
.action-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* Fab — 3D */
.fab {
  position: fixed;
  right: max(18px, calc(50% - var(--max)/2 + 18px));
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff8f5a 0%, #ff6b35 100%);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow:
    0 6px 0 #d45520,
    0 14px 28px rgba(255, 107, 53, 0.45);
  z-index: 45;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  font-family: var(--display);
  transition: transform 0.12s, box-shadow 0.12s;
}

.fab:active {
  transform: translateY(6px);
  box-shadow:
    0 0 0 #d45520,
    0 6px 14px rgba(255, 107, 53, 0.35);
}

/* Sheet / modal feel */
.sheet {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 20px 18px calc(20px + var(--safe-b));
  margin: 0 -18px -20px;
  box-shadow: 0 -8px 30px rgba(26,46,36,0.08);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  margin: 0 auto 16px;
}

/* Transaction */
.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.tx-item:last-child { border-bottom: none; }
.tx-item .plus { color: var(--brand); font-weight: 800; }
.tx-item .minus { color: var(--danger); font-weight: 800; }
.tx-item .note { font-weight: 700; }
.tx-item .when { font-size: 0.75rem; color: var(--muted); font-weight: 600; }

/* Pull-to-refresh hint */
.pull-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
  padding: 4px 0 8px;
}

/* Status pills filter — yatay kaydırma + görünür çubuk */
.filters-wrap {
  position: relative;
  margin: 0 -4px 14px;
  padding: 0 4px;
}
.filters-wrap::before,
.filters-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 10px;
  width: 18px;
  z-index: 2;
  pointer-events: none;
}
.filters-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg, #f3f7f4), transparent);
}
.filters-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg, #f3f7f4), transparent);
}
.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 0;
  padding: 4px 8px 12px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #0d9f6e #d7e5dc;
}
.filters::-webkit-scrollbar {
  height: 6px;
  display: block;
}
.filters::-webkit-scrollbar-track {
  background: #d7e5dc;
  border-radius: 999px;
}
.filters::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #2dd4a8, #0d9f6e);
  border-radius: 999px;
}

.filter-chip {
  flex-shrink: 0;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #eef4f0);
  border: none;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--ink-soft);
  box-shadow: 0 4px 0 #c5d4cb;
  font-family: var(--display);
  cursor: pointer;
  scroll-snap-align: start;
  white-space: nowrap;
}

.filter-chip.active,
.filter-chip.is-active {
  background: linear-gradient(180deg, #2dd4a8, #0d9f6e);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 0 #087a54;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat-chip {
  background: linear-gradient(180deg, #fff, #eef4f0);
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: 0 4px 0 #c5d4cb;
}
.stat-chip span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.stat-chip strong {
  font-family: var(--display);
  font-size: 0.92rem;
  color: var(--ink);
}

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.amount-chip {
  flex: 1;
  min-width: 64px;
  padding: 10px 8px;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #e8f3ec);
  box-shadow: 0 3px 0 #c5d4cb;
  cursor: pointer;
}
.amount-chip:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #c5d4cb;
}

.rate-chip {
  display: inline-block;
  margin: 6px 0 4px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: #e8f8f1;
  color: #066845;
  position: relative;
  z-index: 1;
}
.balance-hero .rate-chip {
  background: rgba(255,255,255,0.22);
  color: #fff;
}
.play-req-banner {
  border: 2px solid #0d9f6e !important;
  background: #f0fdf7;
  box-shadow: 0 6px 0 #0a7a54;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.quick-actions.child-quick-bar {
  grid-template-columns: repeat(3, 1fr);
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #eef4f0);
  box-shadow: 0 4px 0 #c5d4cb;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.78rem;
  text-align: center;
  border: 0;
  margin: 0;
  box-sizing: border-box;
}
.quick-action.qa-form {
  padding: 0;
}
.quick-action .qa-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  padding: 14px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border-radius: 16px;
}
.quick-action .qa-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.65;
  margin-top: -2px;
}
.quick-action svg {
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.kid-card.is-suspended {
  opacity: 0.72;
}
.kid-card .kid-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px;
  gap: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #e8f0eb);
  box-shadow: 0 3px 0 #c5d4cb, inset 0 0 0 1px rgba(13, 159, 110, 0.12);
}
.lang-switch .lang-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 7px 11px;
  border-radius: 11px;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--display);
  letter-spacing: 0.06em;
  color: #102018;
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.lang-switch .lang-sep {
  width: 1px;
  height: 14px;
  background: #c5d4cb;
  margin: 0 2px;
  flex-shrink: 0;
}
.lang-switch .lang-opt.is-active {
  background: linear-gradient(180deg, #2dd4a8, #0d9f6e);
  color: #fff;
  box-shadow: 0 2px 0 #087a54;
}
.lang-switch .lang-opt:not(.is-active):active {
  transform: translateY(1px);
}

.top-right-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.top-right-cluster > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Auth / welcome / landing: dil seçici sayfa içinde */
.page-lang-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 4px 4px;
  margin-bottom: 4px;
  gap: 10px;
}

/* Ebeveyn 3D zil bildirimleri */
.hg-bell-wrap {
  position: relative;
  z-index: 40;
  flex-shrink: 0;
}
.hg-bell-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(180deg, #fffef8, #f3e6c2);
  box-shadow: 0 3px 0 #d4b56a, inset 0 0 0 1px rgba(180, 120, 20, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}
.hg-bell-btn:active { transform: translateY(1px); }
.hg-bell-3d {
  display: block;
  filter: drop-shadow(0 2px 1px rgba(120, 70, 0, 0.35));
  transform: translateZ(0);
}
.hg-bell-wrap.has-unread .hg-bell-3d {
  animation: hgBellTilt 1.4s ease-in-out infinite;
}
.hg-bell-wrap.hg-bell-ring .hg-bell-3d {
  animation: hgBellShake 0.55s ease;
}
@keyframes hgBellTilt {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(12deg); }
  40% { transform: rotate(-10deg); }
  60% { transform: rotate(8deg); }
  80% { transform: rotate(-4deg); }
}
@keyframes hgBellShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(18deg) scale(1.08); }
  50% { transform: rotate(-16deg) scale(1.05); }
  75% { transform: rotate(10deg); }
}
.hg-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6b6b, #e11d48);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 0 #9f1239;
}
.hg-bell-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: min(70vh, 480px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff, #f4faf7);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(16, 40, 30, 0.22), 0 0 0 1px rgba(13, 159, 110, 0.12);
  z-index: 50;
}
/* display:flex, [hidden]’ı eziyordu — kapatılamıyordu */
.hg-bell-panel[hidden] {
  display: none !important;
}
.hg-bell-wrap:not(.is-open) .hg-bell-panel {
  display: none !important;
}
.hg-bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #dce8e1;
  font-family: var(--display);
}
.hg-bell-close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #5a7266;
}
.hg-bell-list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hg-bell-empty {
  padding: 24px 12px;
  text-align: center;
  color: #6b7f74;
  font-size: 0.9rem;
}
.hg-bell-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2eee7;
}
.hg-bell-item.kind-exit_request {
  box-shadow: inset 0 0 0 1px #fcd34d;
  background: linear-gradient(180deg, #fffbeb, #fff);
}
.hg-bell-item.kind-play_request {
  box-shadow: inset 0 0 0 1px #86efac;
}
.hg-bell-item.kind-message {
  box-shadow: inset 0 0 0 1px #93c5fd;
}
.hg-bell-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0d9f6e;
  margin-bottom: 4px;
}
.hg-bell-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: #102018;
  line-height: 1.3;
}
.hg-bell-body {
  margin-top: 4px;
  font-size: 0.84rem;
  color: #3d5248;
  line-height: 1.35;
}
.hg-bell-at {
  margin-top: 6px;
  font-size: 0.7rem;
  color: #8aa094;
}
.hg-bell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.hg-bell-act {
  border: 0;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.hg-bell-act.ok {
  background: linear-gradient(180deg, #34d399, #0d9f6e);
  color: #fff;
  box-shadow: 0 2px 0 #087a54;
}
.hg-bell-act.no {
  background: #fee2e2;
  color: #b91c1c;
}
.hg-bell-act.open {
  background: #dbeafe;
  color: #1d4ed8;
}

.auth-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.auth-toolbar .back {
  margin: 0;
}
.auth-toolbar .page-lang-bar {
  padding: 0;
  margin: 0;
}
.welcome .page-lang-bar {
  padding: calc(4px + var(--safe-t)) 0 8px;
  margin: 0;
}
.landing .page-lang-bar {
  display: none;
}

/* Chat / mesajlar */
.chat-box {
  padding: 12px !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-peer {
  font-weight: 800;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.chat-thread {
  max-height: 42vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
}
.chat-empty {
  text-align: center;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 24px 8px;
}
.chat-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 16px;
  box-shadow: 0 3px 0 #c5d4cb;
}
.chat-bubble.mine {
  align-self: flex-end;
  background: linear-gradient(180deg, #2dd4a8, #0d9f6e);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.chat-bubble.theirs {
  align-self: flex-start;
  background: linear-gradient(180deg, #fff, #eef4f0);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.chat-bubble.is-reminder {
  box-shadow: 0 3px 0 #e0b84a;
}
.chat-bubble.mine.is-reminder {
  background: linear-gradient(180deg, #ffd56a, #f0b429);
  color: #3a2a00;
}
.chat-tag {
  font-size: 0.68rem;
  font-weight: 800;
  opacity: 0.85;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chat-text {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}
.chat-meta {
  font-size: 0.68rem;
  opacity: 0.75;
  margin-top: 6px;
  font-weight: 600;
}
.chat-compose {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
}

.task-alert-banner {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
  font-family: var(--display);
  background: linear-gradient(180deg, #fff6d6, #ffe08a);
  box-shadow: 0 4px 0 #e0b84a;
  color: #3a2a00;
  animation: alertPulse 1.2s ease-in-out 2;
}
.task-alert-banner.is-urgent {
  background: linear-gradient(180deg, #ffb4a8, #ff6b5a);
  color: #fff;
  box-shadow: 0 4px 0 #c44536;
}
@keyframes alertPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.upcoming-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #eef4f0);
  box-shadow: 0 4px 0 #c5d4cb;
}
.upcoming-card.phase-soon {
  background: linear-gradient(180deg, #fff8e6, #ffe9b0);
  box-shadow: 0 4px 0 #e0b84a;
}
.upcoming-card.phase-now {
  background: linear-gradient(180deg, #ffd0c8, #ff8f7a);
  box-shadow: 0 4px 0 #c44536;
  color: #3a1510;
}
.upcoming-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e8f0eb;
}
.upcoming-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upcoming-body {
  flex: 1;
  min-width: 0;
}
.upcoming-body h3 {
  font-family: var(--display);
  font-size: 1rem;
  margin: 0 0 2px;
}
.upcoming-body p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.upcoming-call {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
}

/* Install banner PWA */
.install-banner {
  display: none;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.88rem;
}

.install-banner.show { display: flex; }
.install-banner button {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 800;
  white-space: nowrap;
}

/* Prevent iOS rubber-band on app shell */
body.app-shell {
  touch-action: pan-y;
}

/* Bigger touch targets on child complete */
.complete-btn svg { width: 22px; height: 22px; }

/* Android app download promo */
a.app-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
  padding: 14px 16px;
  transition: transform .15s ease;
}
a.app-promo:active { transform: scale(0.98); }
.app-promo-ico { flex-shrink: 0; }
.app-promo-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-promo-text strong {
  font-weight: 800;
  font-size: 0.95rem;
}
.app-promo-text span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
}
.app-promo-cta {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 800;
  color: #0d9f6e;
  background: rgba(13, 159, 110, 0.12);
  padding: 8px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.app-dl-hero {
  text-align: center;
  margin-bottom: 16px;
  padding: 8px 4px 4px;
}
.app-dl-badge {
  display: inline-flex;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 0 rgba(6, 104, 69, 0.35));
}
.app-dl-hero h1 {
  font-family: var(--display);
  font-size: 1.55rem;
  margin: 0 0 8px;
}
.app-dl-hero p {
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.4;
  margin: 0;
}
.app-dl-steps {
  margin: 12px 0 0;
  padding-left: 1.2rem;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.88rem;
}
.app-dl-why {
  margin: 0;
  padding-left: 1.2rem;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.55;
}
.btn-block { width: 100%; display: inline-flex; justify-content: center; }
.home-app-dl { margin-bottom: 14px; }
.screen-hero {
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(120, 200, 255, 0.35), transparent 50%),
    linear-gradient(145deg, #1a9bb8 0%, #0d7a96 45%, #065a70 100%);
  box-shadow:
    0 8px 0 #054a5c,
    0 16px 36px rgba(13, 122, 150, 0.35);
}

/* Standalone PWA: hide browser-like extras feel */
@media all and (display-mode: standalone) {
  .welcome, .auth-page, body.app-shell {
    /* already full bleed */
  }
  .app-top {
    padding-top: calc(10px + var(--safe-t));
  }
}

/* Landscape phones: keep content usable */
@media (max-height: 500px) and (orientation: landscape) {
  .welcome-brand { padding-bottom: 8px; }
  .welcome h1 { font-size: 1.8rem; }
  .balance-hero .amount { font-size: 2rem; }
}

/* İnternet kesildi uyarısı */
.hg-offline {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom));
  background: rgba(10, 24, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hg-offline[hidden] {
  display: none !important;
}
.hg-offline-card {
  width: min(100%, 360px);
  text-align: center;
  padding: 1.5rem 1.25rem 1.35rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff 0%, #f3f7f4 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  border: 1px solid #d5e3da;
  color: #1a2e24;
}
.hg-offline-ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.85rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, #ff8a65 0%, #e53935 100%);
  box-shadow: 0 6px 0 #b71c1c, 0 10px 18px rgba(229, 57, 53, 0.35);
}
.hg-offline-card h2 {
  margin: 0 0 0.45rem;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.hg-offline-card p {
  margin: 0 0 1.1rem;
  color: #5a6f63;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
}
.hg-offline-card .btn {
  min-width: 160px;
}
html.hg-is-offline {
  overflow: hidden;
}

/* Native kabuk (Android APK / Windows EXE) — tarayıcı hissini azalt */
html.pk-native,
body.pk-native.hg-app-shell {
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body.pk-native.hg-app-shell .site-footer,
body.pk-native.hg-app-shell .web-only,
body.pk-native.hg-app-shell a[href*="download"][data-web-chrome] {
  display: none !important;
}
body.pk-native.hg-app-shell .welcome-web-hint {
  display: none !important;
}
body.pk-native.hg-app-shell .btn,
body.pk-native.hg-app-shell button {
  touch-action: manipulation;
}
body.is-android.pk-native .topbar,
body.is-desktop.pk-native .topbar {
  padding-top: max(8px, env(safe-area-inset-top));
}
body.pk-native.hg-app-shell .app-nav {
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.admin-impersonate-bar {
  position: sticky;
  bottom: calc(var(--nav-h, 64px) + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 auto;
  max-width: var(--max, 480px);
  padding: 10px 14px;
  background: #0d9f6e;
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
}

.admin-impersonate-bar a {
  color: #fff;
  text-decoration: underline;
  font-weight: 800;
}

/* �� �ocuk g�nl�k plan overlay �� */
.hk-day-brief {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 14px calc(18px + var(--nav-h, 64px) + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 30, 24, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hk-day-brief.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.hk-day-brief-card {
  width: min(420px, 100%);
  max-height: min(70vh, 520px);
  overflow: auto;
  background: linear-gradient(180deg, #fffef8, #f3fbf6);
  border: 1px solid #cfe6d8;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(20, 38, 28, 0.22);
  padding: 14px 16px 12px;
  transform: translateY(18px);
  transition: transform 0.3s ease;
}

.hk-day-brief.is-visible .hk-day-brief-card {
  transform: translateY(0);
}

.hk-day-brief-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.hk-day-brief-head strong {
  font-family: var(--display);
  font-size: 1.15rem;
  flex: 1;
}

.hk-day-brief-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.hk-day-brief-close {
  border: 0;
  background: #e8f3ec;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #0b6b45;
}

.hk-day-brief-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d5e4db;
}

.hk-day-brief-section h4 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0b6b45;
}

.hk-day-brief-list {
  margin: 0;
  padding-left: 18px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}

.hk-day-brief-list li { margin: 4px 0; }

.hk-day-brief-empty,
.hk-day-brief-foot {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hk-day-brief-foot { margin-top: 10px; }

.hk-day-brief-more { list-style: none; margin-left: -18px; color: var(--ink-soft); }

.child-day-plan {
  margin-bottom: 14px;
  padding: 14px 16px;
}

.child-day-plan h2 {
  font-family: var(--display);
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.child-day-plan-grid {
  display: grid;
  gap: 10px;
}

.child-day-plan-block strong {
  display: block;
  font-size: 0.82rem;
  color: #0b6b45;
  margin-bottom: 4px;
}

.child-day-plan-block ul {
  margin: 0;
  padding-left: 18px;
  font-weight: 700;
  font-size: 0.9rem;
}

.child-day-plan-block li { margin: 3px 0; }

.task-kind-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
}

.task-kind-chip.is-fixed {
  background: #dff5ea;
  color: #0b6b45;
}

/* Ebeveyn ekran izleme */
.screen-watch-page { padding: 14px; }
.screen-watch-tip { margin: 6px 0 10px !important; font-size: 0.88rem; }
.screen-watch-frame {
  position: relative;
  background: #0a1612;
  border-radius: 18px;
  min-height: min(72vh, 820px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 10px 0 14px;
  border: 3px solid #1a3d30;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.screen-watch-frame:fullscreen {
  min-height: 100vh;
  border-radius: 0;
  border: none;
}
.screen-watch-frame img {
  width: 100%;
  height: 100%;
  max-height: min(72vh, 820px);
  object-fit: contain;
  display: block;
}
.screen-watch-frame:fullscreen img {
  max-height: 100vh;
}
.watch-empty-msg {
  color: #9cb8ad !important;
  text-align: center;
  padding: 24px;
  font-size: 1rem;
  max-width: 320px;
}
.watch-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}
.watch-fullscreen-btn:hover { background: rgba(255,255,255,0.22); }
.watch-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
}
.watch-online { background: #dff5ea; color: #0b6b45; }
.watch-connecting { background: #fff6d6; color: #8a6200; }
.watch-offline { background: #fde8e8; color: #c62828; }

/* Çocuk başına bağlantı rozeti (ana / liste / izleme) */
.hg-link-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  vertical-align: middle;
}
.hg-link-watching { background: #c8f0dc; color: #0b6b45; }
.hg-link-ready { background: #dff5ea; color: #166534; }
.hg-link-online { background: #e8f0fe; color: #1a56db; }
.hg-link-connecting { background: #fff6d6; color: #8a6200; }
.hg-link-needs_permission { background: #ffe8cc; color: #b45309; }
.hg-link-offline { background: #fde8e8; color: #c62828; }
.kid-info .hg-link-badge { margin-left: 0; margin-top: 6px; }
.hk-meta-bar .hg-link-badge { margin-left: 4px; vertical-align: middle; }
.hg-conn-badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.hg-conn-on { color: #128a4d; }
.hg-conn-unstable { color: #d97706; }
.hg-conn-off { color: #c62828; }
.hg-link-unstable { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.z3x-status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.z3x-live-board { background: #f7fbf9; border: 1px solid #d7ebe2; border-radius: 16px; }
.z3x-live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.z3x-live-col h3 { margin: 0 0 8px; font-size: 0.95rem; }
.z3x-live-list { list-style: none; margin: 0; padding: 0; }
.z3x-live-list li { padding: 6px 0; border-bottom: 1px solid #e5f0eb; font-size: 0.9rem; }
.screen-watch-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.screen-watch-actions .btn-lg { flex: 1; min-height: 48px; font-size: 1rem; min-width: 120px; }
.watch-debug-line {
  margin: 4px 0 10px !important;
  padding: 8px 10px;
  background: #f0faf4;
  border: 1px solid #b8dcc8;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #1a4632;
}
.screen-watch-recent-head { margin-top: 20px; }
.screen-watch-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.screen-watch-gallery img {
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 9/16;
  object-fit: cover;
  background: #eef2f0;
}
.child-watch-tv {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 9999;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(16, 32, 24, 0.88);
  color: #ffc933;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
  pointer-events: none;
  animation: child-watch-tv-pulse 2s ease-in-out infinite;
}
@keyframes child-watch-tv-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.96); }
}
.child-watch-banner { display: none !important; }
.allowance-period-stats .plus { color: #0b6b45; }
.allowance-period-stats .minus { color: #c62828; }

.task-kind-chip.is-once {
  background: #e8f0ff;
  color: #1d4f91;
}
