/* Akademi Takip Paneli — Tek Tip Aydınlık Akademik & Klinik Tasarım Sistemi */

:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --surface-hover: #f2f4f7;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-secondary: #475467;
  --text-muted: #667085;

  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-soft: #f0fdfa;
  --accent-border: #99f6e4;
  --accent-text: #0f766e;

  --blue-bg: #eff6ff;
  --blue-text: #1d4ed8;
  --blue-border: #bfdbfe;

  --emerald-bg: #ecfdf5;
  --emerald-text: #047857;
  --emerald-border: #a7f3d0;

  --amber-bg: #fffbeb;
  --amber-text: #b45309;
  --amber-border: #fde68a;

  --rose-bg: #fff1f2;
  --rose-text: #be123c;
  --rose-border: #fecdd3;

  --violet-bg: #f5f3ff;
  --violet-text: #6d28d9;
  --violet-border: #ddd6fe;

  --slate-bg: #f1f5f9;
  --slate-text: #475569;
  --slate-border: #cbd5e1;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 2px 6px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 18px 40px -12px rgba(16, 24, 40, 0.16), 0 4px 12px rgba(16, 24, 40, 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --sidebar-w: 272px;
  --topbar-h: 64px;
  --font-sans: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* App Shell Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: transform 0.22s ease;
}

.sidebar-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.22);
}

.brand-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 10px 10px 6px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: var(--accent-border);
  font-weight: 600;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-count {
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.nav-item.active .nav-count {
  background: var(--surface);
  color: var(--accent-text);
  border-color: var(--accent-border);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.storage-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.storage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.storage-dot.local {
  background: #f59e0b;
}

/* Main Area */
.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.mobile-menu-btn {
  display: none;
  padding: 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 60px 9px 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 13.5px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  pointer-events: none;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.22);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: transparent;
}

.btn-danger {
  color: var(--rose-text);
  border-color: var(--rose-border);
  background: var(--rose-bg);
}

.btn-danger:hover {
  filter: brightness(0.96);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12.5px;
}

.btn-icon {
  padding: 7px;
}

/* Page Content */
.content {
  padding: 24px 28px 48px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* Cards & Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.card-header {
  padding: 15px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-body {
  padding: 18px 20px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-breakdown {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.kpi-break-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, color 0.14s;
}

.kpi-break-item:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.kpi-break-item strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.kpi-break-item:hover strong {
  color: var(--accent-text);
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  text-align: left;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon svg {
  width: 15px;
  height: 15px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

/* Bars & Mini Charts */
.bar-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.bar-row {
  cursor: pointer;
  padding: 4px 6px;
  margin: -4px -6px;
  border-radius: 8px;
  transition: background 0.14s;
}

.bar-row:hover {
  background: var(--surface-hover);
}

.bar-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 5px;
  gap: 8px;
}

.bar-row-name {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-row-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-hover);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.stacked-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 14px;
}

.stacked-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.legend-item:hover {
  background: var(--surface-hover);
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-val {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Focus List */
.focus-list {
  display: flex;
  flex-direction: column;
}

.focus-item {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: background 0.14s;
}

.focus-item:last-child {
  border-bottom: none;
}

.focus-item:hover {
  background: var(--surface-hover);
}

.focus-item-main {
  flex: 1;
  min-width: 0;
}

.focus-item-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.focus-item-action {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.focus-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.5;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-emerald { background: var(--emerald-bg); color: var(--emerald-text); border-color: var(--emerald-border); }
.badge-blue    { background: var(--blue-bg);    color: var(--blue-text);    border-color: var(--blue-border); }
.badge-amber   { background: var(--amber-bg);   color: var(--amber-text);   border-color: var(--amber-border); }
.badge-rose    { background: var(--rose-bg);    color: var(--rose-text);    border-color: var(--rose-border); }
.badge-violet  { background: var(--violet-bg);  color: var(--violet-text);  border-color: var(--violet-border); }
.badge-slate   { background: var(--slate-bg);   color: var(--slate-text);   border-color: var(--slate-border); }
.badge-teal    { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-border); }

/* 6 Distinct Warning Colors */
.badge-warn-ethics-none    { background: #fff1f2; color: #be123c; border-color: #fda4af; }
.badge-warn-ethics-file    { background: #fff7ed; color: #c2410c; border-color: #fdba74; }
.badge-warn-ethics-authors { background: #ecfeff; color: #0e7490; border-color: #67e8f9; }
.badge-warn-congress-none  { background: #f5f3ff; color: #6d28d9; border-color: #c4b5fd; }
.badge-warn-congress-file  { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.badge-warn-power          { background: #fefce8; color: #a16207; border-color: #fde047; }

/* Read-only Viewer Mode styling */
.viewer-notice {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--slate-bg);
  border: 1px solid var(--slate-border);
  color: var(--slate-text);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.admin-pill.is-admin {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
  color: var(--emerald-text);
  font-weight: 600;
}

/* Dedicated Person Print Sheet (hidden on screen, shown only during print) */
#print-person-sheet {
  display: none;
}

/* Case Progress Mini Widget */
.case-progress {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.case-progress-bar {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.18);
  overflow: hidden;
}

.case-progress-fill {
  height: 100%;
  background: var(--accent);
}

/* Segmented Tabs (Kanban type switcher & Belirlenmedi/Belirlendi) */
.seg-control {
  display: inline-flex;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  background: var(--surface);
  color: var(--accent-text);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* Filter Toolbar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.filter-select {
  padding: 7px 26px 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.active-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 500;
}

/* Table View */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-xs);
}

table.study-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

table.study-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-subtle);
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}

table.study-table th.sortable {
  cursor: pointer;
}

table.study-table th.sortable:hover {
  color: var(--text);
}

table.study-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 13px;
}

table.study-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}

table.study-table tbody tr:hover {
  background: var(--surface-hover);
}

table.study-table tbody tr:last-child td {
  border-bottom: none;
}

table.study-table tbody tr.is-passive {
  opacity: 0.72;
}

.cell-title {
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  max-width: 380px;
}

.cell-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cell-action {
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.45;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}

.avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 14px;
  align-items: flex-start;
}

.kanban-col {
  flex: 1 0 265px;
  max-width: 340px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 225px);
}

.kanban-col.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.kanban-col-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kanban-col-title {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-cards {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  min-height: 90px;
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 0.14s, border-color 0.14s, box-shadow 0.14s;
}

.kanban-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.kanban-card.dragging {
  opacity: 0.45;
}

.kanban-card-title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-action {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* People View ("Kimde Ne Bekliyor?") */
.people-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.person-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.person-card-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-subtle);
}

.person-card-id {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.avatar-lg {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.person-name {
  font-weight: 700;
  font-size: 15px;
}

.person-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.person-studies {
  max-height: 410px;
  overflow-y: auto;
}

.person-study-row {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}

.person-study-row:last-child {
  border-bottom: none;
}

.person-study-row:hover {
  background: var(--surface-hover);
}

.person-study-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 3px;
}

.person-study-action {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* Slide-over Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(680px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-subtle);
}

.form-section {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.form-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

/* Interactive Stage Stepper */
.stage-stepper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.stage-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.14s ease;
}

.stage-step-btn:hover {
  border-color: var(--accent-border);
  color: var(--text);
}

.stage-step-btn.passed {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
  color: var(--emerald-text);
}

.stage-step-btn.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.stage-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 24, 40, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.stage-step-btn.current .stage-step-num {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.stage-arrow {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}

/* Toggle Switch Row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.toggle-label-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.toggle-label-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.checkbox-pill input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Ethics Verification Box & File Uploads */
.ethics-status-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ethics-status-box.approved {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
}

.ethics-status-box.missing {
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

.ethics-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.file-row-info {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.file-row-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-row-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

/* Author Chips Editor */
.chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  font-weight: 500;
}

.author-chip .chip-order {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 0 5px;
  border-radius: 999px;
}

.chip-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0 2px;
  font-size: 13px;
  line-height: 1;
}

.chip-btn:hover {
  color: var(--text);
}

.chip-btn.remove:hover {
  color: var(--rose-text);
}

.inline-add-row {
  display: flex;
  gap: 8px;
}

/* Progress Counter Editor (Clean numeric inputs only) */
.progress-editor {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.progress-editor input {
  width: 120px;
}

/* Notes Timeline */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.note-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.note-text {
  font-size: 13px;
  white-space: pre-wrap;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(560px, 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.io-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.io-option-title {
  font-weight: 600;
  font-size: 13.5px;
}

.io-option-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #101828;
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideUp 0.2s ease;
}

.toast-action {
  background: transparent;
  border: none;
  color: #5eead4;
  font-weight: 700;
  padding: 2px 6px;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-muted);
}

.empty-state h3 {
  margin: 10px 0 4px;
  color: var(--text);
  font-size: 15px;
}

/* Upcoming Dates Card */
.upcoming-list {
  display: flex;
  flex-direction: column;
}

.upcoming-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.14s;
}

.upcoming-item:last-child {
  border-bottom: none;
}

.upcoming-item:hover {
  background: var(--surface-hover);
}

.upcoming-date-box {
  width: 54px;
  padding: 6px 4px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  text-align: center;
  flex-shrink: 0;
  line-height: 1.15;
}

.upcoming-date-box.urgent {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber-text);
}

.upcoming-date-box.overdue {
  background: var(--rose-bg);
  border-color: var(--rose-border);
  color: var(--rose-text);
}

.upcoming-day {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.upcoming-month {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.upcoming-main {
  flex: 1;
  min-width: 0;
}

.upcoming-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1240px) {
  .kpi-breakdown {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-grid, .dashboard-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .main-area {
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .people-grid {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 18px 16px 40px;
  }
}

@media (max-width: 600px) {
  .kpi-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .search-kbd {
    display: none;
  }
}

/* Print Styles */
@media print {
  .sidebar, .topbar, .filter-bar, .btn, .toast-container, .drawer, .drawer-backdrop, .modal-backdrop {
    display: none !important;
  }
  .main-area {
    margin-left: 0 !important;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
  .card, .table-wrap, .person-card {
    box-shadow: none;
    border-color: #d0d5dd;
    break-inside: avoid;
  }
  body.printing-person .app-shell {
    display: none !important;
  }
  body.printing-person #print-person-sheet {
    display: block !important;
    padding: 8px 4px;
    color: #101828;
  }
  .print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #0f766e;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }
  .print-brand {
    font-size: 12px;
    font-weight: 600;
    color: #0f766e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .print-title {
    font-size: 20px;
    font-weight: 700;
    margin: 2px 0 0;
  }
  .print-date {
    font-size: 12px;
    color: #475467;
    text-align: right;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
  }
  .print-table th, .print-table td {
    border: 1px solid #d0d5dd;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
  }
  .print-table th {
    background: #f2f4f7;
    font-weight: 700;
  }
}
