/* ================================================================
   PSIKO-ASISTAN — Premium Clinical Design System v3.0
   Modern, Interactive, Mobile-First
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  /* Core Colors */
  --sage: #3d7a6b;
  --sage-hover: #336658;
  --sage-light: #e4f0ec;
  --sage-mid: #6bab9a;
  --sage-glow: rgba(61,122,107,0.15);
  
  /* Backgrounds */
  --cream: #f7f5f2;
  --warm: #f0ede8;
  --white: #ffffff;
  
  /* Text */
  --text: #1a1d1c;
  --text-secondary: #3d4543;
  --text-muted: #6b7572;
  
  /* Borders */
  --border: #e2e5e4;
  --border-hover: #ccd1cf;
  
  /* Semantic Colors */
  --accent: #c17f5a;
  --accent-light: #f9f0e8;
  --danger: #d94848;
  --danger-light: #fbecec;
  --success: #2d8a5e;
  --success-light: #e6f5ee;
  --info: #3472c7;
  --info-light: #eaf2fd;
  --warning: #c89b2d;
  --warning-light: #fdf7e6;
  --purple: #7c5cbf;
  --purple-light: #f0ecfa;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 0 3px var(--sage-glow);
  
  /* Radius */
  --r: 14px;
  --rs: 10px;
  --r-full: 9999px;
  
  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--sage-light); color: var(--sage); }

/* ================================================================
   LAYOUT SYSTEM
   ================================================================ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #1a2824 0%, #243832 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.35s var(--ease);
}

.main {
  margin-left: 260px;
  flex: 1;
  width: calc(100% - 260px);
  overflow-x: hidden;
  min-height: 100vh;
}

.topbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 14px;
  flex-wrap: wrap;
}

.mobile-header {
  display: none;
  height: 56px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
}

.content {
  padding: 24px 28px;
  overflow-x: hidden;
  max-width: 100%;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 950;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

/* ================================================================
   SIDEBAR COMPONENTS
   ================================================================ */
.sb-logo { padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sb-icon { width: 40px; height: 40px; background: var(--sage); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.sb-icon svg { width: 20px; height: 20px; fill: white; }
.sb-title { font-family: 'DM Serif Display', serif; font-size: 15px; color: white; line-height: 1.3; word-wrap: break-word; }
.sb-sub { font-size: 10px; color: var(--sage-mid); margin-top: 4px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.sb-nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav-sec { font-size: 10px; color: rgba(255,255,255,0.3); letter-spacing: 0.12em; text-transform: uppercase; padding: 14px 12px 6px; margin-top: 6px; font-weight: 700; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--rs);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: left;
  margin-bottom: 2px;
}
.nav-btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); transform: translateX(2px); }
.nav-btn.aktif { background: var(--sage); color: white; box-shadow: 0 4px 12px rgba(61,122,107,0.3); }
.nav-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.icon-3d { object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.sb-icon .icon-3d { width: 28px; height: 28px; }
.nav-badge { margin-left: auto; background: rgba(255,255,255,0.15); padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.sb-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.sb-user { background: rgba(255,255,255,0.06); border-radius: var(--rs); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.sb-avatar { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: white; flex-shrink: 0; }
.sb-name { font-size: 13px; color: white; font-weight: 600; word-break: break-word; }
.sb-role { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ================================================================
   TOPBAR COMPONENTS
   ================================================================ */
.tb-title { font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--text); word-break: break-word; }
.tb-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.tb-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ================================================================
   BUTTONS — Premium Touch Targets
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--rs);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s var(--ease);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 40px;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
  pointer-events: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--sage); color: white; box-shadow: 0 2px 8px rgba(61,122,107,0.25); }
.btn-primary:hover { background: var(--sage-hover); box-shadow: 0 4px 16px rgba(61,122,107,0.35); transform: translateY(-1px); }

.btn-secondary { background: var(--white); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--warm); border-color: var(--border-hover); transform: translateY(-1px); }

.btn-danger { background: var(--danger-light); color: var(--danger); border: 1px solid #f5c6c4; }
.btn-danger:hover { background: #fad5d3; transform: translateY(-1px); }

.btn-info { background: var(--info-light); color: var(--info); border: 1px solid #bfd4f5; }
.btn-sm { padding: 6px 14px; font-size: 12px; min-height: 34px; }
.btn svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

/* ================================================================
   CARDS — Glassmorphism Premium
   ================================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.card-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }

/* Modular Card (Danışan panel) */
.modular-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.modular-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ================================================================
   STATS GRID
   ================================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  transition: all 0.25s var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.stat-value { font-family: 'DM Serif Display', serif; font-size: 30px; color: var(--text); margin: 6px 0 2px; }
.stat-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ================================================================
   TABLES
   ================================================================ */
table { width: 100%; border-collapse: collapse; }
thead { background: var(--warm); }
th { padding: 10px 16px; font-size: 10px; font-weight: 700; color: var(--text-muted); text-align: left; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s var(--ease); }
tbody tr:hover td { background: var(--sage-light); }

.table-responsive { overflow-x: auto; display: block; width: 100%; -webkit-overflow-scrolling: touch; }

/* ================================================================
   BADGES
   ================================================================ */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-active { background: var(--success-light); color: var(--success); }
.badge-passive { background: var(--warm); color: var(--text-muted); }
.badge-new { background: var(--accent-light); color: var(--accent); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }

/* ================================================================
   AVATAR
   ================================================================ */
.avatar { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: white; flex-shrink: 0; }
.avatar-cell { display: flex; align-items: center; gap: 12px; }
.avatar-name { font-weight: 600; font-size: 13px; word-break: break-word; }
.avatar-detail { font-size: 12px; color: var(--text-muted); word-break: break-word; }

/* ================================================================
   FORMS — Modern Input Design
   ================================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-grid.full { grid-template-columns: 1fr; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.form-input, .form-select, .form-textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--rs);
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: all 0.2s var(--ease);
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--sage);
  box-shadow: var(--shadow-glow);
}
.form-input::placeholder { color: var(--text-muted); opacity: 0.6; }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

/* ================================================================
   ALERTS
   ================================================================ */
.alert { padding: 12px 16px; border-radius: var(--rs); font-size: 13px; margin-bottom: 16px; word-break: break-word; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.alert-success { background: var(--success-light); color: var(--success); border: 1px solid #b8ddc9; }
.alert-danger { background: var(--danger-light); color: var(--danger); border: 1px solid #f5c6c4; }
.alert-info { background: var(--info-light); color: var(--info); border: 1px solid #bfd4f5; }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid #f0d080; }

/* ================================================================
   ICON BUTTON — Premium Interactive
   ================================================================ */
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
  color: var(--text-muted);
  text-decoration: none !important;
  flex-shrink: 0;
  font-size: 16px;
  box-shadow: var(--shadow-xs);
}
.icon-btn:hover { background: var(--sage-light); border-color: var(--sage-mid); color: var(--sage); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.icon-btn.red:hover { background: var(--danger-light); border-color: #f5c6c4; color: var(--danger); }
.icon-btn svg { width: 15px; height: 15px; fill: currentColor; }

/* İşlem Buton Grubu */
.islem-btns { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }

/* ================================================================
   GRID LAYOUTS
   ================================================================ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.section-title { font-family: 'DM Serif Display', serif; font-size: 18px; margin-bottom: 14px; word-break: break-word; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); font-size: 14px; font-weight: 500; }

/* ================================================================
   MISC COMPONENTS
   ================================================================ */
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; font-weight: 500; }
.breadcrumb a { color: var(--sage); }
.breadcrumb a:hover { text-decoration: underline; }

.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--warm); border: 1.5px solid var(--border);
  border-radius: var(--rs); padding: 8px 12px;
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}
.search-bar:focus-within { border-color: var(--sage); box-shadow: var(--shadow-glow); background: var(--white); }
.search-bar input { border: none; background: transparent; font-family: 'Inter', sans-serif; font-size: 13px; color: var(--text); outline: none; width: 140px; min-width: 0; }

.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ================================================================
   SEANS / APPOINTMENT ITEMS
   ================================================================ */
.seans-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; transition: box-shadow 0.2s; }
.seans-item:hover { box-shadow: var(--shadow-sm); }
.seans-date-box { background: var(--sage-light); border-radius: var(--rs); padding: 8px 12px; text-align: center; min-width: 52px; flex-shrink: 0; }
.seans-date-num { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--sage); }
.seans-date-mon { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.seans-note { font-size: 12px; color: var(--text-muted); line-height: 1.5; background: var(--warm); padding: 5px 9px; border-left: 3px solid var(--sage-mid); margin-top: 5px; border-radius: 0 4px 4px 0; }

/* ================================================================
   TEST SKALA COLORS
   ================================================================ */
.skala-green { background: var(--success-light); color: var(--success); border: 1px solid #b8ddc9; }
.skala-yellow { background: var(--warning-light); color: var(--warning); border: 1px solid #f0d080; }
.skala-orange { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.skala-red { background: var(--danger-light); color: var(--danger); border: 1px solid #f5c6c4; }
.skala-gray { background: var(--warm); color: var(--text-muted); border: 1px solid var(--border); }

.row-link { cursor: pointer; transition: background 0.15s; }
.row-link:hover { background: var(--warm) !important; }

/* ================================================================
   MOOD COMPONENTS
   ================================================================ */
.mood-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.mood-btn {
  width: 60px; height: 60px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 24px;
  transition: all 0.3s var(--ease-spring);
  gap: 3px;
  flex-shrink: 0;
}
.mood-btn:hover { transform: translateY(-3px); border-color: var(--sage-mid); background: var(--warm); box-shadow: var(--shadow-sm); }
.mood-btn.selected { border-color: var(--sage); background: var(--sage-light); transform: scale(1.08); box-shadow: 0 6px 20px rgba(61,122,107,0.15); }
.mood-btn span { font-size: 9px; color: var(--text-muted); font-weight: 600; }

/* ================================================================
   TASK CARD
   ================================================================ */
.gorev-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; margin-bottom: 10px; display: flex; gap: 14px; align-items: flex-start; transition: all 0.2s var(--ease); }
.gorev-card:hover { box-shadow: var(--shadow-sm); }

/* ================================================================
   JOURNAL
   ================================================================ */
.gunluk-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s var(--ease); }
.gunluk-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--cream) 0%, var(--sage-light) 100%); padding: 20px; }
.login-box { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 40px; width: 400px; max-width: 100%; box-shadow: var(--shadow-lg); }
.login-logo { text-align: center; margin-bottom: 28px; }

/* ================================================================
   HAMBURGER — Animated
   ================================================================ */
.hamburger { width: 36px; height: 36px; display: flex; flex-direction: column; justify-content: center; gap: 5px; cursor: pointer; background: none; border: none; padding: 6px; flex-shrink: 0; border-radius: 8px; transition: background 0.2s; }
.hamburger:hover { background: var(--warm); }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s var(--ease); }
.sb-open .hamburger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.sb-open .hamburger span:nth-child(2) { opacity: 0; }
.sb-open .hamburger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ================================================================
   Q&A / SORU-CEVAP SYSTEM
   ================================================================ */
.qa-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 12px;
  transition: all 0.2s var(--ease);
  position: relative;
}
.qa-card:hover { box-shadow: var(--shadow-sm); }
.qa-card.unread { border-left: 4px solid var(--accent); }
.qa-card.answered { border-left: 4px solid var(--success); }
.qa-question { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.5; margin-bottom: 8px; }
.qa-answer { background: var(--sage-light); border-radius: var(--rs); padding: 14px; margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.qa-answer-label { font-size: 11px; font-weight: 700; color: var(--sage); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.qa-meta { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ================================================================
   RESPONSIVE — TABLET (max-width: 1024px)
   ================================================================ */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; width: 100%; max-width: 100vw; }
  .mobile-header { display: flex; }
  .topbar { position: relative; top: 0; padding: 14px 16px; }
  .content { padding: 16px; }
  
  body.sb-open .sidebar { transform: translateX(0); box-shadow: 10px 0 40px rgba(0,0,0,0.2); }
  body.sb-open .sidebar-overlay { display: block; opacity: 1; pointer-events: auto; }
}

/* ================================================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ================================================================ */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }

  .quick-stats { grid-template-columns: 1fr 1fr 1fr !important; gap: 8px !important; }
  .q-stat-card { padding: 12px 8px !important; }
  .q-val { font-size: 18px !important; }
  .q-lbl { font-size: 8px !important; }

  .table-responsive { overflow-x: auto; }
  
  .testler-table thead { display: none; }
  .testler-table tbody tr { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 10px; padding: 14px; gap: 6px; }
  .testler-table tbody tr:hover td { background: transparent; }
  .testler-table td { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; white-space: normal; }
  .testler-table td:last-child { border-bottom: none; }
  .testler-table td::before { content: attr(data-label); font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; margin-right: 8px; }

  /* Danışanlar tablosu mobil kart düzeni */
  .danisanlar-table thead { display: none; }
  .danisanlar-table tbody tr { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 10px; padding: 14px; gap: 6px; }
  .danisanlar-table tbody tr:hover td { background: transparent; }
  .danisanlar-table td { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; white-space: normal; min-width: 0; }
  .danisanlar-table td:last-child { border-bottom: none; }
  .danisanlar-table td::before { content: attr(data-label); font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; margin-right: 8px; }
  .danisanlar-table .avatar-cell { flex-direction: row; flex-wrap: nowrap; }
  .danisanlar-table .avatar-name { word-break: break-word; white-space: normal; }
  .danisanlar-table td[data-label="Danışan"] { flex-direction: column; align-items: flex-start; }
  .danisanlar-table td[data-label="Danışan"]::before { margin-bottom: 6px; }
  .danisanlar-table td[data-label="Başvuru Sebebi"] { white-space: normal !important; max-width: 100% !important; }

  /* Kullanıcılar tablosu mobil kart düzeni */
  .kullanicilar-table thead { display: none; }
  .kullanicilar-table tbody tr { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 10px; padding: 14px; gap: 6px; }
  .kullanicilar-table tbody tr:hover td { background: transparent; }
  .kullanicilar-table td { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; white-space: normal; min-width: 0; }
  .kullanicilar-table td:last-child { border-bottom: none; }
  .kullanicilar-table td::before { content: attr(data-label); font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; margin-right: 8px; }
  .kullanicilar-table td[data-label="Kullanıcı"] { flex-direction: column; align-items: flex-start; }
  .kullanicilar-table td[data-label="Kullanıcı"]::before { margin-bottom: 6px; }
  .kullanicilar-table td[data-label="Şifre Değiştir"] { flex-direction: column; align-items: flex-start; }
  .kullanicilar-table td[data-label="Şifre Değiştir"]::before { margin-bottom: 6px; }
  .kullanicilar-table td[data-label="Şifre Değiştir"] form { width: 100%; }
  .kullanicilar-table td[data-label="Şifre Değiştir"] .form-input { flex: 1; min-width: 0; }

  .tb-title { font-size: 18px; }
  .tb-actions { width: 100%; }
  .tb-actions form { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .tb-actions .search-bar { width: 100%; flex: 1; }
  .tb-actions .search-bar input { width: 100%; flex: 1; }
  .tb-actions .form-select { max-width: 100%; min-width: 0; flex: 1; }
  
  .login-box { width: 100%; max-width: 400px; padding: 28px; }
  
  /* Bottom Navigation */
  .mobile-bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(64px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    z-index: 1000;
    align-items: center; justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  }
  .mobile-bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--text-muted); gap: 3px; flex: 1; height: 100%;
    transition: all 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
    min-width: 0; padding: 6px 2px;
  }
  .mobile-bottom-nav a.aktif { color: var(--sage); }
  .mobile-bottom-nav a svg { width: 22px; height: 22px; flex-shrink: 0; }
  .mobile-bottom-nav a span { font-size: 9px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  
  .mobile-bottom-nav a[style*="border-radius: 50%"],
  .mobile-bottom-nav a[style*="border-radius:50%"] {
    width: 48px !important; height: 48px !important;
    margin-top: -20px !important;
    flex: 0 0 48px !important;
    padding: 0 !important;
  }
  
  .main { padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
  
  select.form-select { max-width: 100%; }
}

@media (min-width: 769px) {
  .mobile-bottom-nav { display: none !important; }
}

/* ================================================================
   RESPONSIVE — SMALL MOBILE (max-width: 480px)
   ================================================================ */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  
  .quick-stats { grid-template-columns: 1fr !important; }
  .q-stat-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px !important; text-align: left !important; }

  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 16px; }
  .tb-actions { flex-direction: column; align-items: stretch; width: 100%; gap: 8px; }
  .tb-actions form { flex-direction: column; width: 100%; }
  .tb-actions .btn { width: 100%; justify-content: center; }
  
  .stat-value { font-size: 24px; }
  
  .seans-item { flex-direction: column; }
  .seans-date-box { flex-direction: row; width: 100%; justify-content: center; gap: 6px; }
  
  .gorev-card { flex-direction: column; align-items: stretch; }
  .gorev-card form { width: 100%; }
  .gorev-card form select { width: 100% !important; }
  
  .content { padding: 12px; }
  .search-bar { width: 100%; }
  .search-bar input { width: 100%; }
  .mobile-header { padding: 0 12px; }
  .mobile-header .sb-title { font-size: 12px !important; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ================================================================
   RESPONSIVE — VERY SMALL (max-width: 360px)
   ================================================================ */
@media (max-width: 360px) {
  .content { padding: 8px; }
  .card-body { padding: 14px; }
  .btn { padding: 8px 12px; font-size: 12px; min-height: 36px; }
  .mobile-header .sb-title { font-size: 11px !important; max-width: 150px; }
  .stat-value { font-size: 20px; }
  .tb-title { font-size: 16px; }
  .mood-btn { width: 50px; height: 50px; }
  .mood-btn span { font-size: 8px; }
  .mobile-bottom-nav a span { font-size: 8px; }
  .mobile-bottom-nav a svg { width: 20px; height: 20px; }
}

/* ================================================================
   SCROLLBAR STYLING
   ================================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ================================================================
   FOCUS VISIBLE (Accessibility)
   ================================================================ */
:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 4px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }

/* ================================================================
   PSIKO-ASISTAN v4.0 — MODERN ANIMATION & INTERACTION SYSTEM
   ================================================================ */

/* --- Keyframe Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseBadge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(193,127,90,0.5); }
  50%       { transform: scale(1.08); box-shadow: 0 0 0 5px rgba(193,127,90,0); }
}
@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61,122,107,0.4); }
  60%       { box-shadow: 0 0 0 7px rgba(61,122,107,0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* --- Page Entry Animation --- */
.content, .tab-pane.aktif {
  animation: fadeUp 0.35s var(--ease) both;
}
.topbar {
  animation: slideInDown 0.3s var(--ease) both;
}

/* --- Alert / Flash Toast --- */
.alert {
  animation: toastIn 0.3s var(--ease) both;
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
}
.alert::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.alert-success::before { background: var(--success); }
.alert-danger::before  { background: var(--danger); }
.alert-info::before    { background: var(--info); }
.alert-warning::before { background: var(--warning); }

/* --- Notification Badge Pulse --- */
.nav-badge {
  animation: pulseBadge 2.4s ease-in-out infinite;
}
.notif-badge {
  animation: pulseBadge 2.4s ease-in-out infinite;
}
.mobile-bottom-nav a .dot-badge {
  position: absolute;
  top: 1px; right: 1px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid white;
  animation: pulseBadge 2s ease-in-out infinite;
}

/* --- Button Ripple Effect --- */
.btn {
  position: relative;
  overflow: hidden;
}
.btn .ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple 0.55s linear;
  pointer-events: none;
  width: 100px; height: 100px;
  margin-top: -50px; margin-left: -50px;
}
.btn-secondary .ripple-wave { background: rgba(61,122,107,0.12); }

/* Enhanced button hover */
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(61,122,107,0.38);
}
.btn-primary:active { transform: scale(0.96); }
.btn-secondary:active { transform: scale(0.96); }

/* --- Card entrance stagger --- */
.stats-grid .stat-card:nth-child(1) { animation: fadeUp 0.3s 0.05s var(--ease) both; }
.stats-grid .stat-card:nth-child(2) { animation: fadeUp 0.3s 0.10s var(--ease) both; }
.stats-grid .stat-card:nth-child(3) { animation: fadeUp 0.3s 0.15s var(--ease) both; }
.stats-grid .stat-card:nth-child(4) { animation: fadeUp 0.3s 0.20s var(--ease) both; }

/* --- Stat card icon bar --- */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sage), var(--sage-mid));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  border-radius: var(--r) var(--r) 0 0;
}
.stat-card:hover::before { opacity: 1; }

/* --- Card hover enhancement --- */
.card {
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.09);
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--warm) 25%, var(--border) 50%, var(--warm) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--rs);
}

/* --- Modern Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
  animation: fadeIn 0.4s var(--ease);
}
.empty-state-icon {
  width: 56px; height: 56px;
  background: var(--warm);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 4px;
}
.empty-state-title {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 15px;
}

/* --- Form input enhancements --- */
.form-input, .form-select, .form-textarea {
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.form-input:hover:not(:focus), .form-select:hover:not(:focus), .form-textarea:hover:not(:focus) {
  border-color: var(--border-hover);
  background: var(--cream);
}

/* --- Search bar improvement --- */
.search-bar {
  transition: all 0.25s var(--ease);
}
.search-bar:focus-within {
  background: var(--white);
  transform: none;
}

/* --- Sidebar nav active pill glow --- */
.nav-btn.aktif {
  box-shadow: 0 4px 14px rgba(61,122,107,0.28), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* --- Tab nav underline animation --- */
.tab-btn {
  position: relative;
  transition: color 0.2s var(--ease);
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%; right: 50%;
  height: 2px;
  background: var(--sage);
  transition: left 0.25s var(--ease), right 0.25s var(--ease);
  border-radius: 2px;
}
.tab-btn.aktif::after { left: 0; right: 0; }

/* --- Mobile bottom nav enhanced --- */
.mobile-bottom-nav a {
  position: relative;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease-spring);
}
.mobile-bottom-nav a:active {
  transform: scale(0.88);
}
.mobile-bottom-nav a.aktif {
  color: var(--sage);
}
.mobile-bottom-nav a.aktif svg {
  filter: drop-shadow(0 2px 6px rgba(61,122,107,0.35));
}

/* --- Admin Mobile Bottom Nav --- */
.admin-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(64px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 1000;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.07);
}
.admin-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 3px;
  flex: 1;
  height: 100%;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
  padding: 6px 2px;
  position: relative;
  letter-spacing: 0.02em;
}
.admin-bottom-nav a svg {
  width: 22px; height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-bottom-nav a.aktif {
  color: var(--sage);
}
.admin-bottom-nav a.aktif svg {
  filter: drop-shadow(0 2px 6px rgba(61,122,107,0.35));
}
.admin-bottom-nav a:active {
  transform: scale(0.88);
}
.admin-bottom-nav .abn-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 16px);
  background: var(--accent);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: pulseBadge 2.2s ease-in-out infinite;
}

@media (max-width: 1024px) {
  .admin-bottom-nav { display: flex; }
  .admin-page .main { padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important; }
}
@media (min-width: 1025px) {
  .admin-bottom-nav { display: none !important; }
}

/* --- Icon button enhancement --- */
.icon-btn {
  transition: all 0.2s var(--ease-spring);
}
.icon-btn:active {
  transform: scale(0.88);
}

/* --- Table row animation --- */
tbody tr {
  transition: background 0.15s var(--ease);
}

/* --- Badge colors --- */
.badge {
  transition: transform 0.15s var(--ease);
}
.badge:hover { transform: scale(1.04); }

/* --- Progress bar --- */
.progress-bar-wrap {
  background: var(--warm);
  border-radius: var(--r-full);
  height: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--sage-mid));
  border-radius: var(--r-full);
  transition: width 0.6s var(--ease);
}

/* --- Mood button modern --- */
.mood-btn {
  transition: all 0.25s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.mood-btn:active { transform: scale(0.9); }

/* --- QA card answer highlight --- */
.qa-answer {
  border-left: 3px solid var(--sage-mid);
  background: linear-gradient(135deg, var(--sage-light) 0%, rgba(228,240,236,0.4) 100%);
}

/* --- Login page modernization --- */
.login-page {
  background: linear-gradient(135deg, #f0ede8 0%, #e4f0ec 50%, #f7f5f2 100%);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  position: relative;
}
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(61,122,107,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(193,127,90,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.login-box {
  animation: fadeUp 0.5s var(--ease-spring) both;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* --- Seans item hover --- */
.seans-item {
  transition: all 0.2s var(--ease);
}
.seans-item:hover {
  transform: translateX(3px);
  border-left: 3px solid var(--sage-mid);
  box-shadow: var(--shadow-sm);
}

/* --- Gorev card hover --- */
.gorev-card {
  transition: all 0.22s var(--ease);
}
.gorev-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* --- Mobile: touch feedback --- */
@media (hover: none) {
  .btn:active      { transform: scale(0.95) !important; }
  .card:active     { transform: scale(0.99); }
  .nav-btn:active  { background: rgba(255,255,255,0.14); }
  .icon-btn:active { transform: scale(0.86); }
  /* Disable hover animations that look wrong on touch */
  .stat-card:hover   { transform: none; }
  .modular-card:hover{ transform: none; }
  .gunluk-item:hover { transform: none; }
}

/* --- Safe area padding for notched devices --- */
.sidebar {
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-header {
  padding-top: env(safe-area-inset-top, 0px);
}

/* --- Topbar sticky shadow --- */
.topbar {
  transition: box-shadow 0.2s var(--ease);
}

/* --- Section title spacing --- */
.section-title {
  line-height: 1.3;
}

/* ================================================================
   ADMIN MOBILE — Specific responsive fixes
   ================================================================ */
@media (max-width: 768px) {
  /* Topbar stacks cleanly */
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  .topbar > div:first-child { width: 100%; }
  .tb-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .tb-actions .btn {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }

  /* Stat cards 2 col on mobile */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-value { font-size: 26px; }

  /* Cards smaller padding */
  .card-body { padding: 16px; }

  /* Section title smaller */
  .section-title { font-size: 16px; }

  /* Mod card border radius */
  .modular-card { border-radius: 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-value { font-size: 22px; }
  .stat-card { padding: 14px; }
  .tb-actions .btn { font-size: 12px; padding: 8px 12px; }
  .content { padding: 12px; }
}

/* ================================================================
   FLEX RESPONSIVE UTILITY
   ================================================================ */
.flex-responsive {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.flex-responsive > * { flex: 1; min-width: 200px; }

/* ================================================================
   TWO-COL / THREE-COL — inline style override for mobile
   ================================================================ */
@media (max-width: 768px) {
  [class*="two-col"],
  [class*="three-col"],
  .panel-two-col {
    grid-template-columns: 1fr !important;
  }
  /* Panel iki sütun → tek sütun */
  .panel-two-col { display: grid !important; grid-template-columns: 1fr !important; gap: 20px; }
}

/* ================================================================
   GOREV / TEST CARDS — mobile stacking
   ================================================================ */
@media (max-width: 600px) {
  .gorev-card { flex-direction: column; }
  .gorev-card form select { width: 100% !important; }
}

/* ================================================================
   RANDEVU — mobile calendar cards
   ================================================================ */
@media (max-width: 600px) {
  .seans-item { flex-direction: column; }
  .seans-date-box { flex-direction: row; width: 100%; justify-content: center; gap: 8px; align-items: center; }
}
