/* ==========================================================================
   Donna Calendar — Design system v2 (2026-11)
   Navy authority + brass accent, serif display, quiet surfaces.
   Previous design backed up in /backups/design-2026-11-17/
   ========================================================================== */

/* Yazı tipleri HTML <head> içinde <link> ile yüklenir (zincirleme @import sayfa açılışını geciktiriyordu). */

:root {
  /* Surfaces */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --surface-3: #e8edf4;

  /* Text */
  --ink: #0f172a;
  --ink-2: #1e293b;
  --mute: #526075;
  --faint: #8a96a8;

  /* Lines */
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  /* Brand */
  --navy-950: #0a1530;
  --navy-900: #0f1d3d;
  --navy-800: #172a55;
  --accent: #1e3a8a;
  --accent-hover: #172f73;
  --accent-soft: #e8edf8;
  --accent-ring: rgba(30, 58, 138, 0.22);
  --brass: #b7791f;
  --brass-soft: #fbf3e4;

  /* Status */
  --ok: #047857;
  --ok-soft: #e6f4ee;
  --warn: #b45309;
  --warn-soft: #fdf3e6;
  --danger: #b91c1c;
  --danger-soft: #fdeeee;

  /* Legacy aliases (inline styles in pages/JS use these) */
  --panel: var(--surface);
  --panel-solid: var(--surface);
  --panel-2: var(--surface-2);
  --accent-2: var(--brass);

  /* Shape & type */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow: 0 2px 6px rgba(15, 23, 42, 0.05), 0 18px 40px rgba(15, 23, 42, 0.10);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sidebar-w: 252px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(30, 58, 138, 0.16); }

:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { width: min(1160px, calc(100% - 2.5rem)); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem 1.05rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { border-color: var(--faint); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--mute); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.28);
}
.btn-danger:hover { background: var(--danger-soft); border-color: rgba(185, 28, 28, 0.45); }
.btn-sm { min-height: 32px; padding: 0.38rem 0.72rem; font-size: 0.84rem; border-radius: var(--radius-xs); }

.icon-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--mute);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f5e6c8;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-950));
  box-shadow: inset 0 0 0 1px rgba(183, 121, 31, 0.55);
}

/* ==========================================================================
   Landing
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-actions { display: flex; gap: 0.55rem; }

.landing-page { background: var(--surface); color: var(--ink); }

.landing-page .lp-header {
  position: absolute;
  inset: 0 0 auto 0;
  background: transparent;
  backdrop-filter: none;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.landing-page .lp-header.scrolled {
  position: fixed;
  background: rgba(10, 21, 48, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}
.landing-page .lp-header .brand,
.landing-page .lp-header .landing-nav a { color: #fff; }
.landing-page .lp-header .landing-nav a { opacity: 0.82; }
.landing-page .lp-header .landing-nav a:hover { opacity: 1; }
.landing-page .lp-nav-cta {
  background: #fff;
  color: var(--navy-900);
  box-shadow: none;
}
.landing-page .lp-nav-cta:hover { background: #eef2fa; }

.landing-nav { display: flex; align-items: center; gap: 1.8rem; }
.landing-nav a {
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--mute);
  position: relative;
  padding: 0.35rem 0;
}
.landing-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.1rem;
  height: 1.5px;
  background: var(--brass);
  transition: right 0.25s var(--ease);
}
.landing-nav a:hover::after { right: 0; }

/* Hero */
.lp-hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--navy-950);
}
.lp-hero-media { position: absolute; inset: 0; z-index: 0; }
.lp-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.55;
  filter: grayscale(0.35) contrast(1.05);
}
.lp-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(10, 21, 48, 0.96) 0%, rgba(10, 21, 48, 0.78) 45%, rgba(10, 21, 48, 0.35) 100%),
    linear-gradient(180deg, rgba(10, 21, 48, 0.2) 0%, rgba(10, 21, 48, 0.75) 100%);
}
.lp-hero-copy {
  position: relative;
  z-index: 2;
  padding: 8rem 0 5rem;
  width: min(1160px, calc(100% - 2.5rem));
  margin-inline: auto;
}
.lp-hero-copy > * { max-width: 40rem; }
.lp-brand-signal {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e9cf9f;
}
.lp-brand-signal::before {
  content: '';
  width: 2rem;
  height: 1px;
  background: currentColor;
}
.lp-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin-bottom: 1.2rem;
  color: #fff;
}
.lp-lede {
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 34rem !important;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }
.lp-hero .btn { min-height: 46px; padding: 0.75rem 1.35rem; font-size: 0.97rem; }
.lp-hero .btn-primary { background: #fff; color: var(--navy-900); }
.lp-hero .btn-primary:hover { background: #eef2fa; }
.lp-hero .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}
.lp-hero .btn-secondary:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.6); }

/* Stats strip */
.lp-stats {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 2.6rem 0;
}
.lp-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.6rem 2rem;
}
.lp-stats-grid > div { padding-left: 1rem; border-left: 2px solid var(--brass); }
.lp-stats-grid strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.5vw, 2.05rem);
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 0.4rem;
  color: var(--navy-900);
}
.lp-stats-grid span { display: block; color: var(--mute); font-size: 0.88rem; line-height: 1.45; }

/* Manifesto */
.lp-manifesto { padding: 6rem 0 4.5rem; background: var(--surface); }
.lp-eyebrow,
.kicker {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}
.lp-manifesto h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
  max-width: 30ch;
  color: var(--ink);
  margin-bottom: 1.6rem;
}
.lp-accent-bar { display: block; width: 3.5rem; height: 3px; background: var(--brass); }

/* Sections */
.section { padding: 4rem 0; }
.lp-section { padding: 5.5rem 0; }
.lp-section-alt { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 0.7rem;
}
.section-sub { color: var(--mute); font-size: 1.02rem; max-width: 38rem; margin-bottom: 2.6rem; }

.lp-pillars,
.lp-audience {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.lp-pillars article,
.lp-audience article {
  padding: 1.75rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.lp-pillars article:hover,
.lp-audience article:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.lp-pillars article::before,
.lp-audience article::before {
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 1.2rem;
  border-radius: 10px;
  background-color: var(--accent-soft);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}
.lp-pillars article:nth-child(1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='M7 21h10M12 3v18M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2'/%3E%3C/svg%3E"); }
.lp-pillars article:nth-child(2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01'/%3E%3C/svg%3E"); }
.lp-pillars article:nth-child(3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='12' x='2' y='6' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E"); }
.lp-audience article::before {
  width: auto;
  height: auto;
  background: none;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 0.9rem;
}
.lp-audience article:nth-child(1)::before { content: 'I.'; }
.lp-audience article:nth-child(2)::before { content: 'II.'; }
.lp-audience article:nth-child(3)::before { content: 'III.'; }
.lp-pillars h3,
.lp-audience h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.55rem;
}
.lp-pillars p,
.lp-audience p { color: var(--mute); font-size: 0.97rem; line-height: 1.65; }

/* Dark band */
.lp-band {
  padding: 5rem 0;
  background:
    radial-gradient(700px 300px at 85% 0%, rgba(183, 121, 31, 0.14), transparent 70%),
    var(--navy-950);
  color: #fff;
}
.lp-band .section-title { color: #fff; }
.lp-band .section-sub { color: rgba(255, 255, 255, 0.7); margin-bottom: 0; }
.lp-band-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.lp-checklist { list-style: none; display: grid; gap: 0.7rem; }
.lp-checklist li {
  position: relative;
  padding: 0.95rem 1rem 0.95rem 2.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  line-height: 1.45;
}
.lp-checklist li::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9cf9f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Foundation */
.lp-foundation {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.lp-foundation > div { padding: 1.6rem 1.4rem; background: var(--surface); }
.lp-foundation strong {
  display: block;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--navy-900);
}
.lp-foundation span { color: var(--mute); font-size: 0.93rem; line-height: 1.55; }

/* CTA */
.lp-cta { padding: 5rem 0; background: var(--surface); }
.lp-cta-inner {
  padding: 3.5rem 2rem;
  border-radius: 20px;
  background:
    radial-gradient(500px 220px at 50% 0%, rgba(183, 121, 31, 0.18), transparent 70%),
    var(--navy-900);
  color: #fff;
  text-align: center;
}
.lp-cta-inner h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.lp-cta-inner p { color: rgba(255, 255, 255, 0.72); max-width: 32rem; margin: 0 auto; }
.lp-cta-inner .hero-cta { justify-content: center; margin-top: 1.6rem; }
.lp-cta-inner .btn-primary { background: #fff; color: var(--navy-900); min-height: 46px; padding: 0.75rem 1.5rem; }
.lp-cta-inner .btn-primary:hover { background: #eef2fa; }

/* Footer */
.lp-footer {
  padding: 2.8rem 0 3rem;
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
}
.lp-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.lp-footer .brand { margin-bottom: 0.6rem; color: #fff; }
.lp-footer p { max-width: 28rem; }
.lp-footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.6rem; }
.lp-footer-links a:hover { color: #fff; }

/* Reveal (used with Motion on landing) */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(14px); }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
}
.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 2.6rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  color: #fff;
  background:
    radial-gradient(600px 360px at 90% 110%, rgba(183, 121, 31, 0.22), transparent 65%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy-950) 70%);
}
.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual .brand { color: #fff; }
.auth-visual h2 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 3.8vw, 3.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 13ch;
  margin-bottom: 1rem;
}
.auth-visual h2 + p { font-size: 1.05rem; color: rgba(255, 255, 255, 0.75); max-width: 32ch; }
.auth-visual > p { color: rgba(255, 255, 255, 0.55); }

.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg);
}
.auth-card {
  width: min(420px, 100%);
  padding: 2.2rem 2rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.auth-card .kicker { margin-bottom: 0.4rem; }
.auth-card h1 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.3rem;
}
.auth-card .hint { color: var(--mute); margin-bottom: 1.5rem; }
.auth-card .btn-primary { min-height: 46px; margin-top: 0.4rem; }

.demo-note {
  margin-top: 1.3rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.84rem;
  line-height: 1.65;
}
.auth-switch { margin-top: 1rem; text-align: center; color: var(--mute); font-size: 0.92rem; }
.auth-switch a { color: var(--accent); font-weight: 600; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea,
.party-row input,
.party-row select,
.session-row input,
input.date-tr,
input.date-tr-alt,
.toolbar select,
.toolbar input[type="month"],
.toolbar input[type="search"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  outline: none;
  font-size: 0.94rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.form-group textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.form-group input::placeholder,
.form-group textarea::placeholder,
.party-row input::placeholder,
.toolbar input::placeholder { color: var(--faint); }
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover,
.party-row input:hover,
.toolbar select:hover,
.toolbar input:hover { border-color: var(--faint); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.party-row input:focus,
.party-row select:focus,
.session-row input:focus,
input.date-tr:focus,
input.date-tr-alt:focus,
.toolbar select:focus,
.toolbar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.mode-switch button {
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  padding: 0.55rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--mute);
}
.mode-switch button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }

.error-box {
  display: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(185, 28, 28, 0.2);
  font-size: 0.9rem;
}
.error-box.show { display: block; }

.checkbox-row { margin-top: 0.25rem; }
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.check-label input,
.toggle input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
.field-hint { margin: 0; font-size: 0.82rem; color: var(--mute); }
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--mute);
  cursor: pointer;
}

/* Flatpickr theme */
.flatpickr-calendar {
  font-family: var(--font);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  z-index: 10000 !important;
}
.flatpickr-calendar.open { display: inline-block; }
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange { background: var(--accent); border-color: var(--accent); }
.flatpickr-day.today { border-color: var(--brass); }
.flatpickr-months .flatpickr-month,
.flatpickr-current-month { font-family: var(--font); }

/* ==========================================================================
   App shell — left sidebar on desktop, top bar on smaller screens
   ========================================================================== */
.app-shell { min-height: 100vh; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.app-topbar-inner {
  width: min(1280px, calc(100% - 2rem));
  margin-inline: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.app-topbar .brand { color: #fff; font-size: 1.15rem; margin-right: 0.4rem; white-space: nowrap; }
.app-nav { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; min-width: 0; }
.app-nav a.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-xs);
  font-weight: 500;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.app-nav a.nav-link::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
  opacity: 0.9;
}
.app-nav a.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.app-nav a.nav-link.active { background: rgba(255, 255, 255, 0.1); color: #fff; }

.app-nav a.nav-link[href="/davalarim.html"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='14' x='2' y='7' rx='2'/%3E%3Cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3C/svg%3E"); }
.app-nav a.nav-link[href="/takvim.html"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.app-nav a.nav-link[href="/odemeler.html"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='12' x='2' y='6' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E"); }
.app-nav a.nav-link[href="/admin.html"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.app-nav a.nav-link[href="/platform.html"] { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3C/svg%3E"); }

.nav-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: var(--brass);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}
.firm-tag {
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(233, 207, 159, 0.35);
  color: #e9cf9f;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.user-chip { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.user-meta { line-height: 1.25; min-width: 0; }
.user-meta strong { display: block; font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 0.76rem; color: var(--mute); }
.app-topbar .user-meta strong { color: #fff; }
.app-topbar .user-meta span { color: rgba(255, 255, 255, 0.55); }
.app-topbar .btn-ghost { color: rgba(255, 255, 255, 0.7); }
.app-topbar .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.app-main {
  width: min(1280px, calc(100% - 2rem));
  margin: 1.75rem auto 3rem;
  min-width: 0;
}

@media (min-width: 1024px) {
  /* Masaüstü: tek satır üst menü — solda marka ve bağlantılar, sağda kullanıcı */
  .app-topbar-inner { min-height: 66px; flex-wrap: nowrap; }
  .app-nav { flex-wrap: nowrap; gap: 0.2rem; }
  .firm-tag { margin-right: 1rem; }
  .app-nav a.nav-link { white-space: nowrap; }
  .app-nav a.nav-link.active { box-shadow: inset 0 -2px 0 var(--brass); border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
  .nav-badge { margin-left: 0.15rem; }
  .user-chip { flex: 0 0 auto; }
  .app-main {
    width: min(1280px, calc(100% - 4rem));
    margin: 2rem auto 3.5rem;
  }
}

/* Orta genişlikte üst menü sığmazsa ikonları gizle */
@media (min-width: 1024px) and (max-width: 1240px) {
  .app-nav a.nav-link::before { display: none; }
  .app-nav a.nav-link { padding: 0.45rem 0.65rem; }
  .user-meta span { display: none; }
  .app-topbar .brand > span:not(.brand-mark) { display: none; }
}

/* ---------- Page head & toolbar ---------- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 2.8vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.page-head p { color: var(--mute); margin-top: 0.35rem; max-width: 60ch; }
.page-head p a[href] { color: var(--accent) !important; font-weight: 600; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.1rem;
  padding: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.toolbar select,
.toolbar input[type="month"],
.toolbar input[type="search"] { width: auto; min-height: 36px; padding: 0.4rem 0.7rem; }
.toolbar input[type="search"] { min-width: 260px !important; flex: 1 1 260px; max-width: 420px; }
.toolbar .btn-sm { min-height: 36px; }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-left: auto; }
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Calendar ---------- */
.calendar-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.cal-weekdays span {
  padding: 0.7rem;
  text-align: left;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day {
  min-height: 122px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem;
  min-width: 0;
  transition: background 0.15s;
}
.cal-day:hover { background: #fafbfd; }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day:nth-child(7n),
.cal-day:nth-child(7n - 1) { background: #fbfcfd; }
.cal-day.muted { background: var(--surface-2); color: var(--faint); }
.cal-day.today { background: #f6f8fd; box-shadow: inset 0 2px 0 var(--accent); }
.day-num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-variant-numeric: tabular-nums;
}
.cal-day.today .day-num { background: var(--accent); color: #fff; border-radius: 50%; }
.cal-event {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cal-event:hover { box-shadow: var(--shadow-soft); border-top-color: var(--line-strong); border-right-color: var(--line-strong); border-bottom-color: var(--line-strong); }
.cal-event strong { display: block; font-size: 0.76rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event .cal-event-meta { color: var(--mute); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.is-procedure { background: var(--brass-soft); border-left-style: dashed; }
.cal-lawyer-row { display: flex; align-items: center; gap: 0.28rem; margin-top: 0.18rem; flex-wrap: wrap; }
.cal-lawyer-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.cal-lawyer-names { color: var(--mute); font-size: 0.68rem; line-height: 1.2; }

/* ---------- Lists & cards ---------- */
.list-view { display: none; gap: 0.6rem; }
.list-view.show { display: grid; }

.hearing-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.hearing-card.case-card-no-date { grid-template-columns: minmax(0, 1fr) auto; }
a.hearing-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
a.hearing-card:hover .actions .btn { border-color: var(--accent); color: var(--accent); }
.hearing-date-box {
  text-align: center;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.3rem;
  background: var(--accent-soft);
  color: var(--accent);
}
.hearing-date-box strong {
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
}
.hearing-date-box span { font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.hearing-card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.hearing-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; color: var(--mute); font-size: 0.85rem; }
.hearing-meta .badge + .badge { margin-left: -0.35rem; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0.16rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.neutral { background: var(--surface-2); color: var(--mute); }

.lawyer-assign-badge { gap: 0.35rem; margin: 0 0.25rem 0.25rem 0; }
.lawyer-unassign {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.1rem;
  opacity: 0.7;
}
.lawyer-unassign:hover { opacity: 1; }

.party-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.5rem 0 0.65rem;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.party-preview strong {
  display: block;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.empty {
  text-align: center;
  padding: 2.75rem 1rem;
  color: var(--mute);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* ---------- Panels ---------- */
.panel {
  border-radius: var(--radius);
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.panel h2 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.detail-section-head h2,
.panel .detail-section-head h2 { margin: 0; padding: 0; border: none; }

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.85fr);
  gap: 1.1rem;
  align-items: start;
}
.detail-layout > aside.panel { position: sticky; top: 1.5rem; }
.detail-stack { display: grid; gap: 1.1rem; min-width: 0; }
.detail-block { color: var(--ink); font-size: 0.95rem; }
.muted-line { color: var(--mute); font-size: 0.86rem; margin-top: 0.15rem; }

.kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.6rem 0.9rem;
  font-size: 0.95rem;
}
.kv dt { color: var(--mute); font-size: 0.85rem; }
.kv dd { font-weight: 600; }

.case-info-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.9fr);
  gap: 1rem 1.5rem;
  align-items: start;
}
.info-list { display: grid; }
.info-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0.75rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-row:first-child { padding-top: 0; }
.info-label { color: var(--mute); font-size: 0.84rem; font-weight: 500; padding-top: 0.1rem; }
.info-value { color: var(--ink); font-size: 0.96rem; font-weight: 600; line-height: 1.5; word-break: break-word; }
.info-value .numbered-list { margin: 0; padding-left: 1.1rem; gap: 0.15rem; }

.finance-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.finance-card h3 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.finance-list .info-row { grid-template-columns: 130px minmax(0, 1fr); padding: 0.6rem 0; }
.finance-list .info-value { font-variant-numeric: tabular-nums; font-size: 1rem; }
.money-due { color: var(--warn); }
.money-ok { color: var(--ok); }

/* Sessions timeline */
.session-feed { display: grid; gap: 0; position: relative; }
.session-entry {
  position: relative;
  padding: 0.2rem 0 1.1rem 0;
  border: none;
  background: transparent;
}
.session-entry + .session-entry { padding-top: 1.1rem; border-top: 1px solid var(--line); }
.session-entry-top { display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 0.4rem; }
.session-entry-dates { flex: 1; min-width: 0; }
.session-edit-btn { margin-left: auto; flex: 0 0 auto; }
.session-index {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}
.session-date { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.session-meta,
.session-meta-row { color: var(--mute); font-size: 0.84rem; }
.session-desc { margin: 0.15rem 0 0.5rem 2.55rem; line-height: 1.55; font-size: 0.95rem; color: var(--ink-2); }
.session-meta-row { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-left: 2.55rem; }
.time-spent-row { display: grid; grid-template-columns: 1fr 120px; gap: 0.55rem; }
.time-spent-row input,
.time-spent-row select { width: 100%; }

/* Payments */
.payments-panel { margin-bottom: 1rem; }
.payment-list { display: grid; gap: 0.6rem; }
.payment-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.payment-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.payment-card.is-overdue { border-color: rgba(180, 83, 9, 0.35); box-shadow: inset 3px 0 0 var(--warn); }
.payment-card.is-due-today { border-color: rgba(180, 83, 9, 0.45); box-shadow: inset 3px 0 0 var(--brass); background: #fffdf8; }
.payment-card h3 { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 600; }

.admin-alert {
  background: var(--warn-soft);
  border-color: rgba(180, 83, 9, 0.3);
  color: #7c3a06;
  font-size: 0.92rem;
}
.admin-payment-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  max-width: min(440px, calc(100vw - 2rem));
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  animation: fadeUp 0.25s var(--ease);
}
.admin-payment-toast strong { display: block; margin-bottom: 0.15rem; }
.admin-payment-toast span { font-size: 0.9rem; color: var(--mute); }
.admin-payment-toast-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }

/* Firms (platform) */
.firm-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 0.6rem;
  overflow: hidden;
  transition: border-color 0.15s;
}
.firm-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.firm-card-head:hover { background: var(--surface-2); }
.firm-card-head strong { display: block; font-size: 0.98rem; font-weight: 600; }
.firm-card-head span { display: block; color: var(--mute); font-size: 0.82rem; margin-top: 0.1rem; }
.firm-card-chevron { color: var(--mute); font-size: 1rem; }
.firm-card.is-open { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.firm-card-body { padding: 0 1rem 0.9rem; border-top: 1px solid var(--line); }
.firm-card-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; margin: 0.8rem 0 0.55rem; }
.firm-lawyer-row { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.firm-lawyer-row:last-child { border-bottom: none; }

.deleted-case-card { cursor: default; }
.deleted-case-card .hearing-date-box { background: var(--warn-soft); color: var(--warn); }

/* Documents */
.doc-list { display: grid; gap: 0.5rem; }
.doc-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.doc-item:hover { border-color: var(--line-strong); }
.doc-item > div:first-child { min-width: 0; }
.doc-item strong { display: block; font-size: 0.9rem; font-weight: 600; word-break: break-word; }
.doc-item span { font-size: 0.8rem; color: var(--mute); }
.doc-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }

.upload-zone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover { border-color: var(--accent); background: #f6f8fd; }
.upload-zone input[type="file"] { margin: 0.55rem auto 0; max-width: 100%; font-size: 0.85rem; }
.upload-zone input[type="file"]::file-selector-button {
  margin-right: 0.6rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}

/* Admin */
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 1.1rem;
  align-items: start;
}
.invite-box {
  margin-top: 0.85rem;
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: var(--accent-soft);
}
.invite-box code { display: block; font-family: var(--display); font-size: 1.35rem; margin: 0.35rem 0 0.75rem; }
.member-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem 0.8rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.member-row + .member-row { margin-top: 0.5rem; }
.member-main { display: flex; gap: 0.75rem; align-items: center; min-width: 0; flex: 1 1 220px; }
.member-main > div { min-width: 0; }
.member-main span { overflow-wrap: anywhere; }
.member-row > div:last-child:not(.member-main) { flex: 0 1 auto; }
.member-main strong { display: block; font-weight: 600; }
.member-main span { font-size: 0.8rem; color: var(--mute); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 21, 48, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  backdrop-filter: blur(3px);
}
.modal-backdrop.show { display: flex; animation: fadeIn 0.18s var(--ease); }
.modal {
  width: min(640px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 30px 80px rgba(10, 21, 48, 0.35);
  animation: modalIn 0.22s var(--ease);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: -0.1rem 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-family: var(--display); font-size: 1.4rem; font-weight: 600; letter-spacing: -0.01em; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* Party / repeating rows */
.party-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.45rem; }
.party-head label { margin-bottom: 0; }
.party-list { display: grid; gap: 0.45rem; }
.party-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.45rem; align-items: center; }
.party-row.contact-row { grid-template-columns: 1.15fr 1fr auto; }
.party-row.lawyer-row { grid-template-columns: minmax(0, 1fr) auto; }
.party-row.expense-row { grid-template-columns: 1.4fr 0.8fr auto; }
.fee-subtotal { margin-top: 0.45rem; font-size: 0.86rem; color: var(--mute); }
.fee-totals {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.fee-totals strong { font-weight: 600; }

.session-list { display: grid; gap: 0.7rem; }
.session-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 0.9fr auto;
  gap: 0.45rem;
  align-items: end;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.session-field { display: grid; gap: 0.28rem; min-width: 0; }
.session-field span { font-size: 0.74rem; font-weight: 600; color: var(--mute); }

.numbered-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.25rem; }
.numbered-list li { line-height: 1.45; }

/* ---------- Document editor ---------- */
.editor-shell { padding: 0; overflow: hidden; }
.editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.editor-toolbar button {
  min-height: 32px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-xs);
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink-2);
}
.editor-toolbar button:hover { background: var(--surface); border-color: var(--line); }
.toolbar-sep { width: 1px; align-self: stretch; background: var(--line-strong); margin: 0.2rem 0.3rem; }
.doc-editor {
  min-height: 560px;
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 2.5rem 3rem;
  outline: none;
  font-family: var(--display);
  font-size: 1.08rem;
  line-height: 1.75;
  background: var(--surface);
}
.doc-editor:focus { box-shadow: none; }
.doc-editor h2 { font-size: 1.45rem; font-weight: 600; margin: 1.2rem 0 0.6rem; }
.doc-editor p { margin: 0 0 0.8rem; }
.doc-editor ul, .doc-editor ol { margin: 0 0 0.9rem 1.3rem; }

/* ---------- Motion ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-layout > aside.panel { min-width: 0; }
  .detail-layout > aside.panel { position: static; }
}

@media (max-width: 1023px) {
  /* Üst satır: marka + firma etiketi (solda), kullanıcı (sağda). Alt satır: menü bağlantıları. */
  .app-topbar-inner { position: relative; display: block; padding: 0.65rem 0 0.55rem; }
  .app-nav { flex-wrap: wrap; gap: 0.15rem 0.25rem; }
  .app-topbar .brand { min-height: 40px; order: 1; }
  .app-nav .firm-tag { order: 1; }
  .app-nav::after { content: ''; order: 2; flex-basis: 100%; height: 0.25rem; }
  .app-nav a.nav-link { order: 3; white-space: nowrap; }
  .user-chip { position: absolute; top: 0.65rem; right: 0; }
}

@media (max-width: 960px) {
  .lp-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-pillars,
  .lp-audience,
  .lp-band-inner,
  .auth-page,
  .admin-grid { grid-template-columns: 1fr; }
  .lp-foundation { grid-template-columns: 1fr 1fr; }
  .landing-nav { display: none; }
  .auth-visual { min-height: 260px; padding: 2rem 1.5rem; }
  .auth-visual > p:last-child { display: none; }
  .cal-day { min-height: 92px; padding: 0.35rem; }
  .cal-event span { display: none; }
  .hearing-card,
  .payment-card { grid-template-columns: 64px minmax(0, 1fr); }
  .hearing-card.case-card-no-date { grid-template-columns: 1fr; }
  .hearing-card .actions,
  .payment-card .actions { grid-column: 1 / -1; }
  .page-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 900px) {
  .session-row { grid-template-columns: 1fr 1fr; }
  .session-field-wide { grid-column: 1 / -1; }
  .session-row .party-remove { justify-self: start; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .container { width: calc(100% - 2rem); }
  .form-row,
  .case-info-split,
  .party-preview,
  .session-row { grid-template-columns: 1fr; }
  .legend { margin-left: 0; width: 100%; }
  .user-meta { display: none; }
  .kv,
  .info-row,
  .finance-list .info-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .firm-tag { display: none; }
  .app-main { width: calc(100% - 2rem); margin: 1.25rem auto 2.5rem; }
  .app-topbar-inner { width: calc(100% - 2rem); }
  .app-nav a.nav-link { padding: 0.4rem 0.6rem; font-size: 0.86rem; min-height: 36px; }
  .app-nav a.nav-link::before { display: none; }
  .toolbar input[type="search"] { min-width: 0 !important; flex-basis: 100%; max-width: none; }
  .panel { padding: 1.1rem; }
  .modal { width: 100%; max-height: calc(100vh - 1rem); border-radius: 16px 16px 0 0; padding: 1.2rem; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .party-row.contact-row { grid-template-columns: 1fr; }
  .party-row.contact-row .party-remove { justify-self: start; }
  .hearing-card,
  .payment-card { gap: 0.75rem; padding: 0.9rem; }
  .member-row { grid-template-columns: 1fr; align-items: start; }
  .member-row .actions,
  .member-row > div:last-child { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-start !important; }
  .admin-payment-toast { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; max-width: none; flex-direction: column; align-items: stretch; }
  .admin-payment-toast-actions { justify-content: flex-end; }
  .lp-hero { min-height: 82vh; }
  .lp-hero-copy { padding: 7rem 0 3.5rem; }
  .lp-stats-grid,
  .lp-foundation { grid-template-columns: 1fr; }
  .lp-section { padding: 4rem 0; }
  .lp-cta-inner { padding: 2.4rem 1.3rem; }
  .cal-weekdays span { padding: 0.5rem 0.3rem; font-size: 0.66rem; letter-spacing: 0.04em; text-align: center; }
  .cal-day { min-height: 74px; }
  .cal-event { padding: 0.2rem 0.3rem; font-size: 0.68rem; }
  .cal-lawyer-row { display: none; }
  .session-desc,
  .session-meta-row { margin-left: 0; }
  .doc-editor { padding: 1.5rem 1.2rem 2rem; }
  .cal-toolbar { flex-direction: column; align-items: stretch; }
}

/* ==========================================================================
   Jessica AI — kardeş ürün bağlantısı ve tanıtım bölümü
   ========================================================================== */
.app-nav a.nav-link.nav-ai {
  margin-left: 0.35rem;
  color: #f5e2bd;
  border: 1px solid rgba(233, 207, 159, 0.45);
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.28), rgba(99, 102, 241, 0.18));
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2l1.9 5.6L19.5 9.5l-5.6 1.9L12 17l-1.9-5.6L4.5 9.5l5.6-1.9z'/%3E%3Cpath d='M19 14l.9 2.6 2.6.9-2.6.9L19 21l-.9-2.6-2.6-.9 2.6-.9z'/%3E%3C/svg%3E");
}
.app-nav a.nav-link.nav-ai::after {
  content: '';
  width: 12px; height: 12px; margin-left: -0.25rem; opacity: 0.7;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
}
.app-nav a.nav-link.nav-ai:hover { color: #fff; border-color: rgba(233, 207, 159, 0.8); background: linear-gradient(135deg, rgba(183, 121, 31, 0.4), rgba(99, 102, 241, 0.28)); }
@media (min-width: 1024px) and (max-width: 1240px) {
  .app-nav a.nav-link.nav-ai::before { display: block; }
}

/* Landing header button */
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.lp-ai-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 40px; padding: 0.5rem 0.9rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(183, 121, 31, 0.55);
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.14), rgba(99, 102, 241, 0.1));
  color: #f5e2bd; font-weight: 600; font-size: 0.9rem; white-space: nowrap;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.lp-ai-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.lp-ai-btn:hover { color: #fff; border-color: #e9cf9f; background: linear-gradient(135deg, rgba(183, 121, 31, 0.24), rgba(99, 102, 241, 0.16)); }

/* Promo section */
.lp-ai {
  padding: 5.5rem 0;
  background:
    radial-gradient(600px 320px at 12% 10%, rgba(99, 102, 241, 0.22), transparent 70%),
    radial-gradient(560px 300px at 90% 90%, rgba(183, 121, 31, 0.2), transparent 70%),
    var(--navy-950);
  color: #fff;
  overflow: hidden;
}
.lp-ai-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; align-items: center; }
.lp-ai-badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.3rem 0.7rem; margin-bottom: 1.1rem;
  border-radius: 999px; border: 1px solid rgba(233, 207, 159, 0.4);
  color: #e9cf9f; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
}
.lp-ai-badge svg { width: 14px; height: 14px; }
.lp-ai h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 600; line-height: 1.15; margin-bottom: 1rem;
}
.lp-ai h2 em { font-style: normal; color: #e9cf9f; }
.lp-ai-lede { color: rgba(255, 255, 255, 0.74); font-size: 1.05rem; line-height: 1.65; max-width: 34rem; }
.lp-ai-list { list-style: none; display: grid; gap: 0.6rem; margin: 1.5rem 0 1.8rem; }
.lp-ai-list li { position: relative; padding-left: 1.9rem; color: rgba(255, 255, 255, 0.9); line-height: 1.5; }
.lp-ai-list li::before {
  content: ''; position: absolute; left: 0; top: 0.2rem; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9cf9f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lp-ai .hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.lp-ai .btn-primary { background: #fff; color: var(--navy-900); min-height: 46px; padding: 0.75rem 1.4rem; gap: 0.45rem; }
.lp-ai .btn-primary:hover { background: #eef2fa; }
.lp-ai .btn-primary svg { width: 16px; height: 16px; }
.lp-ai-domain { color: rgba(255, 255, 255, 0.55); font-size: 0.85rem; }
.lp-ai-note { margin-top: 1.4rem; color: rgba(255, 255, 255, 0.45); font-size: 0.8rem; line-height: 1.5; max-width: 34rem; }

/* Chat mock */
.lp-ai-mock {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  padding: 1.1rem;
}
.lp-ai-mock-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.2rem 0.3rem 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 1rem; }
.lp-ai-mock-head .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #b7791f, #6366f1); }
.lp-ai-mock-head .dot svg { width: 16px; height: 16px; }
.lp-ai-mock-head strong { font-size: 0.95rem; }
.lp-ai-mock-head span { display: block; font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); }
.lp-ai-msg { max-width: 88%; padding: 0.75rem 0.95rem; border-radius: 14px; font-size: 0.9rem; line-height: 1.55; margin-bottom: 0.75rem; }
.lp-ai-msg.user { margin-left: auto; background: rgba(255, 255, 255, 0.92); color: var(--navy-900); border-bottom-right-radius: 4px; }
.lp-ai-msg.bot { background: rgba(99, 102, 241, 0.16); border: 1px solid rgba(129, 140, 248, 0.25); color: rgba(255, 255, 255, 0.92); border-bottom-left-radius: 4px; }
.lp-ai-cite { display: grid; gap: 0.45rem; margin-top: 0.65rem; }
.lp-ai-cite div { padding: 0.5rem 0.65rem; border-radius: 8px; background: rgba(10, 21, 48, 0.55); font-size: 0.8rem; color: rgba(255, 255, 255, 0.78); }
.lp-ai-cite b { color: #e9cf9f; font-weight: 600; }

@media (max-width: 960px) {
  .lp-ai { padding: 4rem 0; }
  .lp-ai-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}
.lp-header .brand { white-space: nowrap; }
@media (max-width: 480px) {
  .lp-ai-btn .lp-ai-long { display: none; }
  .lp-ai-btn { padding: 0.5rem 0.65rem; }
  .lp-header .brand { font-size: 1.02rem; gap: 0.5rem; }
  .lp-header .nav-actions { gap: 0.4rem; }
}

/* ==========================================================================
   Sayfa geçişleri — tarayıcının View Transitions özelliği (Chrome/Edge/Safari).
   Üst menü sabit kalır, içerik yumuşakça değişir, aktif sekme vurgusu kayar.
   Desteklemeyen tarayıcılarda (.no-vt) yalnız içerik hafifçe belirir.
   ========================================================================== */
@view-transition { navigation: auto; }

.app-topbar { view-transition-name: app-topbar; }
.app-main { view-transition-name: app-main; }
.app-nav a.nav-link.active { view-transition-name: nav-active; }

::view-transition-group(root) { animation-duration: 260ms; }
::view-transition-group(app-topbar) { animation: none; }
::view-transition-old(app-topbar),
::view-transition-new(app-topbar) { animation: none; }

::view-transition-old(app-main) { animation: dc-page-out 160ms cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(app-main) { animation: dc-page-in 340ms cubic-bezier(0.2, 0.7, 0.2, 1) 60ms both; }
::view-transition-group(app-main) { animation-duration: 340ms; }

::view-transition-group(nav-active) { animation-duration: 320ms; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
::view-transition-old(nav-active),
::view-transition-new(nav-active) { height: 100%; }

@keyframes dc-page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes dc-page-in { from { opacity: 0; transform: translateY(14px); } }

.no-vt .app-main { animation: dc-page-in 340ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .no-vt .app-main { animation: none; }
}
