/* ============================================================
   ErustArge — Corporate Minimal Theme
   ============================================================ */

:root {
  --primary: #1a7a5a;
  --primary-dark: #145e45;
  --primary-soft: rgba(26, 122, 90, 0.09);
  --primary-border: rgba(26, 122, 90, 0.22);
  --secondary: #e8a32e;
  --body-bg: #f4f5f7;
  --panel-bg: #ffffff;
  --surface-bg: #ffffff;
  --surface-muted: #f8f9fa;
  --border: #e2e5e9;
  --border-strong: #d0d4da;
  --text: #1a1d21;
  --text-secondary: #5f6975;
  --text-muted: #8b939e;
  --danger: #d04848;
  --warning: #c07b1a;
  --success: #1a7a5a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --z-content: 1;
  --z-topbar: 20;
  --z-sidebar: 30;
  --z-mobile-nav: 40;
  --z-dropdown: 1080;
  --z-toast: 1090;
  --z-offcanvas: 1200;
}

/* ---- Base ---- */
html { font-size: 14px; min-height: 100%; }

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

h1,h2,h3,h4,h5,h6,
.display-1,.display-2,.display-3,.display-4 {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

h1,.h1 { font-size: 1.5rem; }
h2,.h2 { font-size: 1.25rem; }
h3,.h3 { font-size: 1.1rem; }
h4,.h4 { font-size: 1rem; }
h5,.h5 { font-size: 0.9rem; }
h6,.h6 { font-size: 0.85rem; }
a { color: var(--primary); }

/* ---- App Shell ---- */
.app-body { overflow-x: hidden; }
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
  width: 240px;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #111827;
  color: #e5e7eb;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: var(--z-sidebar);
}

.app-main {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: var(--z-content);
  padding: 0.75rem;
}

/* ---- Topbar ---- */
.app-topbar {
  position: relative;
  z-index: var(--z-topbar);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow-sm);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.app-page-title {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.app-page-subtitle {
  display: none; /* Kaldırıldı — alan tasarrufu */
}

/* ---- Content ---- */
.app-content {
  position: relative;
  z-index: var(--z-content);
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

.content-panel {
  position: relative;
  z-index: var(--z-content);
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow-sm);
}

/* ---- Sidebar Brand ---- */
.app-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.app-brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
}

.app-brand-mark .material-symbols-outlined {
  font-size: 20px;
}

.app-brand-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.app-brand-subtitle {
  color: rgba(229,231,235,0.55);
  font-size: 0.78rem;
}

/* ---- Sidebar Navigation ---- */
.app-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-nav-caption {
  margin: 0.5rem 0 0.3rem;
  color: rgba(229,231,235,0.45);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  color: rgba(229,231,235,0.8);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-nav-link:hover,
.app-nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.app-nav-link.active {
  background: rgba(26,122,90,0.35);
}

.app-nav-text {
  display: flex;
  flex-direction: column;
}

.app-nav-text small {
  display: none; /* Description satırları kaldırıldı */
}

.app-nav-footer {
  margin-top: auto;
  padding: 0.5rem 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.app-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.07);
  color: #e5e7eb;
  font-size: 0.78rem;
}

/* ---- Offcanvas (Mobile Sidebar) ---- */
.app-offcanvas {
  --bs-offcanvas-zindex: var(--z-offcanvas);
  background: #111827;
  color: #e5e7eb;
  z-index: var(--z-offcanvas);
}

.app-icon-button,
.app-install-button {
  border-radius: var(--radius-sm);
}

.app-install-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---- User Button ---- */
.app-user-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.app-user-avatar {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
}

.app-user-menu {
  z-index: var(--z-dropdown);
  min-width: 14rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ---- Mobile Bottom Nav ---- */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-mobile-nav);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: var(--panel-bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.mobile-bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 2.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
}

.mobile-bottom-link .material-symbols-outlined {
  font-size: 20px;
}

.mobile-bottom-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

/* ---- Alerts ---- */
.app-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: var(--shadow-sm);
  padding: 0.6rem 0.85rem;
}

.app-alert .btn-close { margin-left: auto; }

.app-connection-toast {
  color: #fff;
  background: #111827;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.toast-container {
  z-index: var(--z-toast);
}

/* ---- Login ---- */
.login-body { min-height: 100vh; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-panel { width: min(100%, 480px); }

/* ---- Page Header ---- */
.page-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header .back-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.page-header-info h2 { margin: 0; font-size: 1rem; }
.page-header-info small { color: var(--text-secondary); }

.page-header-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---- Cards ---- */
.card,
.card-custom {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-bg);
  box-shadow: var(--shadow-sm);
}

.card-custom .card-header,
.card .card-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.card-custom .card-body,
.card .card-body { padding: 0.85rem; }

.card-custom .card-footer,
.card .card-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}

/* ---- Tables ---- */
.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(0,0,0,0.015);
  font-size: 0.88rem;
}

.table > :not(caption) > * > * {
  padding: 0.55rem 0.65rem;
  border-bottom-color: var(--border);
}

.table-hover tbody tr:hover {
  background: rgba(26,122,90,0.03);
}

/* ---- Forms ---- */
.form-control,
.form-select,
.input-group-text {
  min-height: 2.35rem;
  border-color: var(--border);
  border-radius: var(--radius-xs);
  background-color: #fff;
  font-size: 0.88rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

/* ---- Buttons ---- */
.btn {
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-primary,
.btn-success,
.btn-custom-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff !important;
  box-shadow: none;
}

.btn-primary:hover,
.btn-success:hover,
.btn-custom-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }

.alert-success { background: rgba(26,122,90,0.08); color: var(--primary-dark); }
.alert-danger { background: rgba(208,72,72,0.08); color: #9c2e2e; }

.badge.bg-primary,
.badge.bg-success { color: #fff !important; }

/* ---- Stepper ---- */
.stepper-wrapper { position: relative; }

.stepper-track {
  position: absolute;
  top: 1.1rem;
  left: 1.5rem;
  right: 1.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
}

.stepper-track-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.stepper-steps {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  flex: 1;
}

.stepper-circle {
  width: 2.3rem;
  height: 2.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
}

.stepper-step.active .stepper-circle,
.stepper-step.completed .stepper-circle {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.stepper-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stepper-step.active .stepper-label {
  color: var(--primary);
}

/* ---- Rating / Toggle Groups ---- */
.rating-btn-group,
.toggle-btn-group {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.rating-btn-group .btn,
.toggle-btn-group .btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary);
}

.rating-btn-group .btn-check:checked + .btn,
.toggle-btn-group .btn-check:checked + .btn {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ---- Range Slider ---- */
.custom-range-slider {
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}

.custom-range-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.custom-range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--primary);
}

.range-value-display {
  font-size: 1.25rem;
  font-weight: 700;
}

.range-value-display.percent {
  color: var(--primary);
}

/* ---- File Upload ---- */
.file-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  background: var(--surface-muted);
  transition: border-color 0.15s ease;
  cursor: pointer;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
  border-color: var(--primary);
}

.upload-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

.image-thumbnail {
  width: 72px;
  height: 72px;
  position: relative;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
}

.image-thumbnail .remove-btn {
  position: absolute;
  top: -0.3rem;
  right: -0.3rem;
  width: 1.3rem;
  height: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.image-viewer-header {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
}

.image-viewer-img {
  max-height: 82vh;
  object-fit: contain;
}

/* ---- Result Cards ---- */
.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.result-card:hover {
  box-shadow: var(--shadow-sm);
}

.result-card .result-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

input[name="GeneralRating"]:checked + .result-card.result-fail,
input[name="result"]:checked + .result-card.result-fail {
  border-color: rgba(208,72,72,0.35);
  background: rgba(208,72,72,0.05);
}

input[name="GeneralRating"]:checked + .result-card.result-average,
input[name="result"]:checked + .result-card.result-average {
  border-color: rgba(192,123,26,0.35);
  background: rgba(192,123,26,0.05);
}

input[name="GeneralRating"]:checked + .result-card.result-pass,
input[name="result"]:checked + .result-card.result-pass {
  border-color: rgba(26,122,90,0.35);
  background: rgba(26,122,90,0.05);
}

.result-fail .result-icon { background: rgba(208,72,72,0.08); color: var(--danger); }
.result-average .result-icon { background: rgba(192,123,26,0.08); color: var(--warning); }
.result-pass .result-icon { background: var(--primary-soft); color: var(--primary); }

/* ---- Growth Card ---- */
.growth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.7rem;
}

.growth-number {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ---- Tabs ---- */
.nav-tabs { border-bottom: 1px solid var(--border); }

.nav-tabs .nav-link {
  border: none;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 0.88rem;
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  background: transparent;
  border-bottom-color: var(--primary);
}

/* ---- Empty State ---- */
.empty-state { padding: 1.5rem 1rem; }

.empty-state-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---- Material Icons ---- */
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(0,0,0,0.15); }

/* ---- Filter Toolbar ---- */
.filter-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-toolbar > * {
  min-width: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.filter-chip:hover { background: var(--surface-muted); color: var(--text); }
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-chip-label { border: none; background: transparent; color: var(--text-muted); cursor: default; }

.filter-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.filter-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
}

.filter-dropdown-toggle:hover,
.filter-dropdown-toggle:focus,
.filter-dropdown-toggle:active,
.show > .filter-dropdown-toggle {
  border-color: var(--primary-border) !important;
  background: #fff !important;
  color: var(--text) !important;
}

.filter-dropdown-toggle::after { margin-left: 0.2rem; }

.filter-dropdown-menu {
  width: min(100vw - 1.5rem, 320px);
  margin-top: 0.35rem !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.filter-dropdown-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
}

.filter-dropdown-section {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-dropdown-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-dropdown-select {
  min-height: 2.25rem;
  border-color: var(--border);
  border-radius: var(--radius-xs);
  font-weight: 500;
  font-size: 0.85rem;
}

.filter-dropdown-select:focus {
  border-color: var(--primary-border);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.filter-dropdown-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.2rem;
  border-top: 1px solid var(--border);
}

.filter-search-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
}

.filter-search-box {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-height: 2.25rem;
  min-width: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fff;
  color: var(--text);
}

.filter-search-box .material-symbols-outlined {
  color: var(--text-muted);
  font-size: 18px;
}

.filter-search-input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  min-width: 0;
  width: 100%;
  font-size: 0.85rem;
}

.filter-search-input::placeholder { color: var(--text-muted); }

.filter-type-form {
  display: flex;
  align-items: center;
}

.filter-type-box {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}

.filter-type-box .material-symbols-outlined {
  color: var(--text-muted);
  font-size: 18px;
}

.filter-type-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
}

.filter-type-select {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

/* ---- Surface Section ---- */
.surface-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-bg);
  box-shadow: var(--shadow-sm);
}

.surface-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.surface-section-body {
  padding: 0.65rem 0.85rem;
}

.section-kicker {
  display: none; /* Kaldırıldı — gereksiz label */
}

.section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.section-text {
  display: none; /* Kaldırıldı — gereksiz açıklama */
}

/* ---- Minimal Card ---- */
.minimal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.minimal-card-body {
  padding: 0.75rem;
}

/* ---- Status Pill ---- */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.status-pill.waiting,
.status-pill.planning { background: rgba(59,130,246,0.1); color: #1d4ed8; }
.status-pill.sowing { background: rgba(243,167,56,0.1); color: #a76716; }
.status-pill.germination { background: rgba(16,185,129,0.1); color: #047857; }
.status-pill.planting { background: rgba(26,122,90,0.1); color: var(--primary); }
.status-pill.growth { background: rgba(192,123,26,0.1); color: #a55e0f; }
.status-pill.harvest { background: rgba(16,82,59,0.1); color: #14583f; }
.status-pill.completed { background: rgba(31,41,55,0.08); color: #374151; }

/* ---- Detail Chip / Stack ---- */
.detail-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.2;
}

/* ---- Action Grid ---- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.action-grid .btn { min-height: 2.35rem; }

.action-grid.completed .btn-outline-primary {
  color: #4b5563;
  border-color: rgba(75,85,99,0.2);
}

.action-grid.completed .btn-primary {
  background: #374151;
  box-shadow: none;
}

/* ---- Table Shell ---- */
.table-shell {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.table-shell .table-responsive { margin-bottom: 0; }

.table-shell table thead th {
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-shell table tbody td {
  vertical-align: middle;
}

/* ---- Code Pill ---- */
.code-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  font-family: "SF Mono", "Consolas", monospace;
}

/* ---- Meta Pills ---- */
.meta-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  min-width: 0;
  overflow: hidden;
}

.meta-pills span {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* ---- Row Actions ---- */
.row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.3rem;
}

.row-actions .btn { min-width: 2rem; }

/* ---- Form Shell ---- */
.form-shell {
  max-width: 780px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.form-shell-body { padding: 0.85rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

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

.form-note {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* ---- Option Switch ---- */
.option-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.option-switch-card {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s;
}

.option-switch-card:hover,
.option-switch-card.active {
  border-color: var(--primary-border);
}

/* ---- Split Layout ---- */
.split-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

/* ---- Simple List ---- */
.simple-list { display: grid; }

.simple-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.simple-list-row:last-child { border-bottom: none; }

.simple-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.simple-list-meta span {
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 0.78rem;
}

/* ---- Type Grid / Tile ---- */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.type-tile {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.type-tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

/* ---- Compact Utilities ---- */
.min-w-0 { min-width: 0; }
.md-18 { font-size: 18px; }

.compact-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}

.compact-subtitle {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.25;
}

.compact-note {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-stack { gap: 0.35rem; }

.compact-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  white-space: nowrap;
}

.entity-icon-chip {
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
}

.entity-icon-chip .material-symbols-outlined {
  font-size: 18px;
}

/* ---- Workflow Action Grid ---- */
.workflow-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem;
}

.workflow-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 2.6rem;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fff;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s;
}

.workflow-action span { font-size: 16px; }

.workflow-action small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 600;
}

.workflow-action.current {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.workflow-action.done {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---- Summary Tile ---- */
.summary-tile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.summary-tile > .material-symbols-outlined {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 18px;
}

.summary-tile strong,
.summary-tile small { display: block; }

/* ---- Compact Table ---- */
.compact-table {
  table-layout: fixed;
  min-width: 100%;
}

.compact-table th,
.compact-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* ---- Icon Action ---- */
.icon-action {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-action .material-symbols-outlined { font-size: 16px; }

/* ---- Table Cell Utilities ---- */
.table-title-cell {
  display: inline-block;
  max-width: min(28vw, 16rem);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.table-meta-cell { max-width: min(24vw, 14rem); }
.table-counter { font-size: 0.78rem; }
.section-title-sm { font-size: 0.9rem; }

/* ---- Compact Upload ---- */
.compact-upload {
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.65rem;
}

/* ---- Compact Tabs ---- */
.compact-tabs {
  flex-wrap: nowrap;
  gap: 0.15rem;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.compact-tabs .nav-link {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
}

/* ---- Toggle Card Group ---- */
.toggle-card-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.toggle-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

.toggle-card-icon {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
}

.toggle-card-icon .material-symbols-outlined { font-size: 16px; }

.toggle-card-title { font-weight: 600; font-size: 0.88rem; }

.toggle-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* ---- Compact List ---- */
.compact-list .simple-list-row { gap: 0.5rem; }

/* ---- Unit Select ---- */
.unit-select { max-width: 80px; flex: 0 0 80px; }

/* ---- Stepper Icon ---- */
.stepper-icon { font-size: 16px; }

/* ---- Sidebar / Offcanvas overrides ---- */
.app-offcanvas .app-brand,
.app-sidebar .app-brand {
  padding: 0.65rem 0.65rem 0.55rem;
}

.app-offcanvas .app-nav-group,
.app-sidebar .app-nav-group {
  padding: 0 0.2rem;
}

.app-offcanvas .app-nav-footer {
  margin-top: auto;
  padding: 0.5rem 0.65rem 0.65rem;
}

.app-offcanvas .offcanvas-header {
  padding: 0.55rem 0.75rem;
}

.app-status-chip { justify-content: center; }

/* ---- List Card (Compact Row Layout) ---- */
.list-card-group {
  display: flex;
  flex-direction: column;
}

.list-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.list-card:last-child { border-bottom: none; }

.list-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.list-card-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-card-date {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.list-card-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  margin-left: 0.25rem;
}

.list-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

/* ---- Meta Tag (Inline Badge) ---- */
.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.meta-tag .material-symbols-outlined {
  font-size: 14px;
  flex-shrink: 0;
}

/* ---- Compact Card (Grid Layout) ---- */
.compact-card {
  display: flex;
  flex-direction: column;
  padding: 0.85rem;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.compact-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.compact-card-title {
  margin: 0 0 0.4rem 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

.compact-card-date {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.compact-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.compact-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-top: auto;
  padding-top: 0.6rem;
}

/* ---- Minimal Card (Region/AreaType pages) ---- */
.minimal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.minimal-card-body {
  padding: 0.75rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991.98px) {
  .app-main { padding: 0.5rem; }

  .app-topbar {
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-md);
  }

  .content-panel {
    padding: 0.5rem;
    border-radius: var(--radius-md);
  }

  .page-header { flex-wrap: wrap; }
  .page-header-badge { margin-left: 0; }

  .split-layout,
  .form-grid,
  .option-switch {
    grid-template-columns: 1fr;
  }

  .table-title-cell { max-width: 14rem; }
  .table-meta-cell { max-width: 12rem; }
}

@media (max-width: 767.98px) {
  .mobile-bottom-nav { gap: 0; }

  .stepper-track { left: 1rem; right: 1rem; }

  .workflow-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-tile { padding: 0.45rem; }

  .toggle-card-group { grid-template-columns: 1fr; }

  .compact-tabs .nav-link {
    padding: 0.35rem 0.55rem;
  }

  .mobile-bottom-link { font-size: 0.65rem; }
  .stepper-label { font-size: 0.68rem; }

  .table-shell table thead th,
  .table > :not(caption) > * > * {
    font-size: 0.82rem;
  }

  .table-title-cell { max-width: 11rem; }
  .table-meta-cell { max-width: 10rem; }

  .filter-toolbar { align-items: stretch; }
  .filter-toolbar { flex-wrap: wrap; }
  .filter-dropdown,
  .filter-search-form { width: 100%; }
  .filter-dropdown-toggle,
  .filter-dropdown-menu,
  .filter-search-box { width: 100%; }
  .filter-search-form { flex-wrap: wrap; }
  .filter-dropdown-menu { min-width: 100%; }
  .filter-dropdown-actions { flex-direction: column-reverse; }
  .filter-dropdown-actions .btn,
  .filter-search-form .btn { width: 100%; }
  .filter-search-input { min-width: 0; width: 100%; }

  .list-card { padding: 0.5rem 0.65rem; }
  .list-card-top { flex-wrap: wrap; gap: 0.3rem; }
  .list-card-title { font-size: 0.84rem; }
  .list-card-actions { width: 100%; justify-content: flex-end; margin-left: 0; margin-top: 0.15rem; }
  .meta-tag { max-width: 180px; font-size: 0.72rem; }
}

@media (min-width: 992px) {
  html { font-size: 14.5px; }
}

/* ============================================================
   2026 Kurumsal Arayuz Duzenlemesi
   Ortak layout, form, tablo ve mobil davranis icin son katman.
   ============================================================ */

:root {
  --primary: #176b4d;
  --primary-dark: #124f3a;
  --primary-soft: rgba(23, 107, 77, 0.09);
  --primary-border: rgba(23, 107, 77, 0.28);
  --secondary: #b7791f;
  --info: #2f6fbd;
  --body-bg: #f5f6f4;
  --panel-bg: #ffffff;
  --surface-bg: #ffffff;
  --surface-muted: #f7f8f6;
  --sidebar-bg: #15231d;
  --sidebar-muted: rgba(236, 241, 237, 0.64);
  --border: #e0e5df;
  --border-strong: #c8d0c8;
  --text: #18211d;
  --text-secondary: #59655f;
  --text-muted: #7a857f;
  --danger: #bf3d3d;
  --warning: #b7791f;
  --success: #176b4d;
  --shadow-sm: 0 1px 2px rgba(18, 31, 25, 0.05);
  --shadow-md: 0 10px 24px rgba(18, 31, 25, 0.08);
  --shadow-lg: 0 20px 44px rgba(18, 31, 25, 0.11);
  --radius-lg: 8px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
}

* {
  letter-spacing: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 246, 244, 0) 260px),
    var(--body-bg);
}

a,
.btn,
.app-nav-link,
.mobile-bottom-link,
.workflow-action,
.compact-card,
.summary-tile,
.surface-section,
.form-shell,
.minimal-card {
  transition:
    color 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

:focus-visible {
  outline: 3px solid rgba(47, 111, 189, 0.28);
  outline-offset: 2px;
}

.app-shell {
  align-items: stretch;
}

.app-sidebar {
  width: 256px;
  gap: 0.75rem;
  padding: 0.9rem;
  background: var(--sidebar-bg);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.07);
}

.app-main {
  padding: 0.9rem;
}

.app-topbar {
  position: sticky;
  top: 0.75rem;
  z-index: var(--z-topbar);
  min-height: 4.25rem;
  margin-bottom: 0.9rem;
  padding: 0.72rem 0.9rem;
  border-color: rgba(224, 229, 223, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.app-topbar-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.app-page-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.28rem);
  font-weight: 750;
  line-height: 1.18;
}

.app-page-subtitle {
  display: block;
  max-width: 60rem;
  margin: 0.18rem 0 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-brand {
  min-height: 4.25rem;
  padding: 0.75rem 0.55rem 0.85rem;
}

.app-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1a7f5c, #124f3a);
  box-shadow: 0 10px 22px rgba(23, 107, 77, 0.32);
}

.app-brand-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 760;
}

.app-brand-subtitle {
  color: var(--sidebar-muted);
  font-size: 0.76rem;
}

.app-nav-group {
  gap: 0.2rem;
}

.app-nav-caption {
  margin: 0.7rem 0 0.35rem;
  padding: 0 0.55rem;
  color: rgba(236, 241, 237, 0.48);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.app-nav-link {
  position: relative;
  min-height: 2.7rem;
  padding: 0.58rem 0.68rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(236, 241, 237, 0.8);
}

.app-nav-link .material-symbols-outlined {
  width: 1.4rem;
  color: rgba(236, 241, 237, 0.7);
  font-size: 1.2rem;
}

.app-nav-link:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.app-nav-link.active {
  border-color: rgba(68, 180, 128, 0.42);
  background: rgba(23, 107, 77, 0.45);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #58c08d;
}

.app-nav-link.active .material-symbols-outlined {
  color: #ffffff;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.app-nav-footer {
  padding: 0.65rem 0.55rem 0;
}

.app-status-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(236, 241, 237, 0.82);
}

.app-offcanvas {
  background: var(--sidebar-bg);
}

.app-offcanvas .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.app-user-button {
  min-height: 2.65rem;
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  box-shadow: var(--shadow-sm) !important;
}

.app-user-button:hover {
  border-color: var(--primary-border) !important;
}

.app-user-avatar {
  background: #20352c;
}

.mobile-bottom-nav {
  border-top-color: rgba(224, 229, 223, 0.95);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.mobile-bottom-link {
  min-width: 0;
  color: var(--text-secondary);
}

.mobile-bottom-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.page-header {
  margin-bottom: 0.9rem;
  padding: 0.75rem 0;
  border-bottom-color: var(--border);
}

.page-header .back-btn {
  flex: 0 0 auto;
  background: #ffffff;
}

.page-header .back-btn:hover {
  border-color: var(--primary-border);
  color: var(--primary);
}

.page-header-info {
  min-width: 0;
}

.page-header-info h2 {
  font-size: 1.05rem;
  font-weight: 720;
}

.page-header-info small {
  color: var(--text-secondary);
}

.page-header-badge {
  border: 1px solid var(--primary-border);
  border-radius: 6px;
  background: var(--primary-soft);
}

.surface-section,
.form-shell,
.minimal-card,
.compact-card,
.card,
.card-custom {
  border-color: var(--border);
  border-radius: 8px;
  background: var(--panel-bg);
}

.surface-section,
.form-shell,
.minimal-card {
  box-shadow: var(--shadow-sm);
}

.surface-section-header {
  min-height: 3.25rem;
  padding: 0.72rem 0.88rem;
  border-bottom-color: var(--border);
  background: #ffffff;
}

.surface-section-body {
  padding: 0.88rem;
}

.section-kicker {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.section-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 720;
}

.section-title-sm {
  font-size: 0.92rem;
}

.section-text {
  display: block;
  margin: 0.18rem 0 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.summary-tile {
  min-height: 4.4rem;
  padding: 0.7rem 0.75rem;
  border-radius: 8px;
  background: #ffffff;
}

.summary-tile:hover,
.compact-card:hover,
.minimal-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.summary-tile strong {
  color: var(--text);
  font-size: 1.02rem;
}

.summary-tile small {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.summary-tile > .material-symbols-outlined,
.entity-icon-chip,
.empty-state-icon,
.upload-icon,
.growth-number {
  background: var(--primary-soft);
  color: var(--primary);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.dashboard-hero-main,
.dashboard-hero-side {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.dashboard-hero-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

.dashboard-hero-title {
  margin: 0;
  max-width: 42rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 780;
  line-height: 1.12;
}

.dashboard-hero-text {
  max-width: 48rem;
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
}

.dashboard-hero-metric {
  display: grid;
  place-items: center;
  min-width: 8.5rem;
  align-self: stretch;
  border-radius: 8px;
  background: #eff6f2;
  color: var(--primary);
  text-align: center;
}

.dashboard-hero-metric strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.dashboard-hero-metric span {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard-hero-side {
  padding: 0.85rem;
}

.quick-action-list {
  display: grid;
  gap: 0.45rem;
}

.quick-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 2.9rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
}

.quick-action:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary);
}

.compact-card {
  min-height: 11rem;
  border-radius: 8px;
}

.compact-card-title {
  color: var(--text);
  font-weight: 720;
}

.compact-card-footer {
  border-top: 1px solid var(--border);
}

.meta-tag {
  min-height: 1.7rem;
  border-radius: 6px;
  background: var(--surface-muted);
}

.status-pill {
  min-height: 1.55rem;
  border-radius: 999px;
  font-size: 0.73rem;
}

.table-shell {
  border-radius: 8px;
}

.table-shell table thead th {
  background: #f4f6f3;
  color: #425049;
}

.table > :not(caption) > * > * {
  padding: 0.62rem 0.7rem;
}

.compact-table th,
.compact-table td {
  max-width: 18rem;
}

.row-actions {
  gap: 0.35rem;
}

.form-shell {
  width: 100%;
  max-width: 920px;
}

.form-shell-body {
  padding: 0.95rem;
}

.form-grid {
  gap: 0.78rem;
}

.form-control,
.form-select,
.input-group-text {
  min-height: 2.55rem;
  border-radius: 6px;
}

.form-control::placeholder {
  color: #9aa39e;
}

.form-label {
  color: #2d3a34;
}

.btn {
  min-height: 2.35rem;
  border-radius: 6px;
}

.btn-sm {
  min-height: 2rem;
}

.btn-primary,
.btn-success,
.btn-custom-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-success:hover,
.btn-custom-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary-border);
}

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

.btn-outline-secondary {
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background: #edf1ed;
  border-color: var(--border-strong);
  color: var(--text);
}

.icon-action {
  width: 2.1rem;
  min-height: 2.1rem;
}

.icon-action .material-symbols-outlined {
  font-size: 17px;
}

.stepper-wrapper {
  margin-bottom: 1rem;
  padding: 0.65rem 0.3rem 0;
}

.stepper-track {
  top: 1.24rem;
}

.stepper-circle {
  width: 2.45rem;
  height: 2.45rem;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 5px #ffffff;
}

.stepper-step.completed .stepper-circle {
  background: #20352c;
  border-color: #20352c;
}

.stepper-label {
  max-width: 5.5rem;
  color: var(--text-secondary);
}

.filter-dropdown-toggle,
.filter-search-box,
.filter-type-box {
  min-height: 2.45rem;
  border-radius: 8px;
}

.workflow-action {
  min-height: 2.85rem;
  border-radius: 8px;
}

.workflow-action:hover {
  border-color: var(--primary-border);
  color: var(--primary);
}

.workflow-action.current {
  background: var(--primary);
  border-color: var(--primary);
}

.workflow-action.done {
  background: #edf6f1;
}

.file-upload-zone {
  border-radius: 8px;
  background: #f8faf7;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
  background: #f2f8f4;
}

.toggle-card,
.option-switch-card {
  border-radius: 8px;
}

.toggle-card:hover,
.option-switch-card:hover,
.option-switch-card.active,
.toggle-card:has(input:checked) {
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

.toggle-card-icon.material-symbols-outlined,
.toggle-card-icon .material-symbols-outlined {
  font-size: 17px;
}

.empty-state {
  padding: 2rem 1rem;
}

.empty-state h5 {
  font-size: 1rem;
}

.code-pill {
  border-radius: 6px;
}

.login-body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(245, 246, 244, 0) 320px),
    #f3f5f1;
}

.login-shell {
  padding: clamp(1rem, 3vw, 2.2rem);
}

.login-panel {
  width: min(100%, 1080px);
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 620px;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  background: #15231d;
  color: #ffffff;
}

.login-hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 780;
}

.login-hero p,
.login-feature span {
  color: rgba(255, 255, 255, 0.72);
}

.login-feature-grid {
  display: grid;
  gap: 0.65rem;
}

.login-feature {
  padding: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.login-form-panel {
  display: flex;
  align-items: center;
  padding: clamp(1.4rem, 4vw, 2.5rem);
}

.login-logo {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
  overflow: hidden;
  border: 1px solid var(--border);
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.login-submit {
  min-height: 3rem;
}

@media (max-width: 1199.98px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-main {
    align-items: stretch;
  }
}

@media (max-width: 991.98px) {
  .app-main {
    padding: 0.6rem;
  }

  .app-topbar {
    top: 0.5rem;
    min-height: 3.75rem;
    border-radius: 8px;
  }

  .app-page-subtitle {
    max-width: 74vw;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
  }
}

@media (max-width: 767.98px) {
  .app-page-subtitle {
    display: none;
  }

  .app-user-button {
    min-height: 2.35rem;
    padding: 0.25rem;
  }

  .dashboard-hero-main {
    flex-direction: column;
  }

  .dashboard-hero-metric {
    min-height: 6rem;
  }

  .surface-section-header {
    align-items: flex-start;
  }

  .surface-section-body,
  .form-shell-body {
    padding: 0.72rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    min-height: auto;
  }

  .stepper-wrapper {
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .stepper-steps {
    min-width: 620px;
  }

  .login-form-panel {
    padding: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---- Operational simplification pass ---- */
.app-nav-group + .app-nav-group { margin-top: 0.75rem; }

.mobile-bottom-nav { grid-template-columns: repeat(5, 1fr); }

.mobile-manage-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(4.7rem + env(safe-area-inset-bottom));
  z-index: calc(var(--z-mobile-nav) + 1);
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-md);
}

.mobile-management-grid {
  display: grid;
  gap: 0.5rem;
}

.mobile-management-link {
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: #fff;
}

.mobile-management-link:hover {
  border-color: var(--primary-border);
  color: var(--primary);
  background: var(--primary-soft);
}

.definitions-card {
  border-color: rgba(23, 107, 77, 0.2);
  background:
    linear-gradient(180deg, rgba(23, 107, 77, 0.075), rgba(255, 255, 255, 0) 70%),
    #ffffff;
}

.definitions-card > .material-symbols-outlined {
  color: var(--primary);
}

.definitions-card .action-hub-links a {
  min-height: 1.9rem;
  border-color: var(--primary-border);
  color: var(--primary);
  background: #ffffff;
}

.app-brand-mark {
  overflow: hidden;
  background: #ffffff;
  box-shadow: none;
}

.app-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.mobile-bottom-button {
  border: 0;
  background: transparent;
  font-family: inherit;
}

.mobile-bottom-button:hover,
.mobile-bottom-button:focus {
  color: var(--primary);
  background: var(--primary-soft);
}

.plan-flow-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-card-text {
  display: block;
  margin-top: 0.12rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.is-soft-hidden {
  display: none !important;
}

.report-filter-panel {
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.report-search-box {
  flex: 1 1 320px;
}

.report-status-filter {
  flex: 0 0 210px;
  min-height: 2.35rem;
}

.trial-image-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
}

.trial-image-card {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  overflow: hidden;
}

.trial-image-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.trial-image-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--surface-muted);
  background-position: center;
  background-size: cover;
}

.trial-image-meta {
  display: grid;
  gap: 0.12rem;
  padding: 0 0.7rem 0.7rem;
}

.trial-image-meta strong {
  font-size: 0.88rem;
}

.trial-image-meta small,
.trial-image-meta span {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.trial-image-meta span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 991.98px) {
  .app-topbar-heading {
    min-height: 2.35rem;
  }

  .filter-toolbar.compact-filter-toolbar {
    position: sticky;
    top: 4.4rem;
    z-index: 10;
    box-shadow: var(--shadow-sm);
  }

  .compact-card {
    min-height: 0;
  }

  .compact-card-actions {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 575.98px) {
  .plan-flow-options {
    grid-template-columns: 1fr;
  }

  .report-status-filter,
  .report-search-box {
    width: 100%;
    flex-basis: 100%;
  }

  .mobile-bottom-link {
    font-size: 0.62rem;
  }

  .mobile-bottom-link .material-symbols-outlined {
    font-size: 19px;
  }

  .trial-image-rail {
    grid-template-columns: 1fr;
  }
}

.action-hub {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.action-hub-card {
  min-height: 5.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.action-hub-card:hover {
  border-color: var(--primary-border);
  color: var(--primary);
}

.action-hub-card.primary {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.action-hub-card.muted { background: var(--surface-muted); }

.action-hub-card > .material-symbols-outlined { font-size: 22px; }

.action-hub-card strong,
.action-hub-card small { display: block; }

.action-hub-card small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.action-hub-card.primary small { color: rgba(255, 255, 255, 0.82); }

.action-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.action-hub-links a {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}

.compact-filter-toolbar {
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.compact-filter-toolbar .filter-dropdown-toggle {
  min-height: 2.1rem;
  padding-block: 0.35rem;
}

.compact-filter-toolbar .filter-search-form { flex: 1 1 auto; }

.compact-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
}

.action-card-primary {
  justify-content: center;
  min-width: 0;
}

.app-action-menu .material-symbols-outlined { color: var(--text-muted); }

.empty-state { padding: 1rem; }

.empty-state-icon { display: none; }

@media (max-width: 1199.98px) {
  .action-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .action-hub { grid-template-columns: 1fr; }

  .compact-filter-toolbar { align-items: stretch; }

  .compact-filter-toolbar .filter-search-form { width: 100%; }
}
