/* TheraHub Arşiv - Main Stylesheet */
/* Color Palette: TheraHub Blue */
:root {
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2C72B8;
  --blue-700: #1D4ED8;
  --blue-800: #1A4F8A;
  --blue-900: #1E3A5F;

  --accent: #2C72B8;
  --accent-light: #4A90D9;
  --accent-dark: #1A4F8A;

  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --bg-main: #F0F4FA;
  --bg-card: #FFFFFF;
  --text-main: #2D3748;
  --text-muted: #6B7280;
  --border: #E5E7EB;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-main);
  background: var(--bg-main);
  line-height: 1.6;
  min-height: 100vh;
}

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

a:hover {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
  height: auto;
}

svg {
  display: inline-block;
  vertical-align: middle;
}

/* ────────────────────────────────────────── */
/* NAVBAR */
/* ────────────────────────────────────────── */
.navbar {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--accent-dark) 50%, var(--blue-600) 100%);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.nav-brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 10px;
  border-radius: 20px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.nav-link svg {
  width: 16px;
  height: 16px;
}

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

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-username {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
}

.nav-username svg {
  width: 15px;
  height: 15px;
}

.role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

.role-badge.admin {
  background: rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
}

.role-badge.staff {
  background: rgba(16, 185, 129, 0.25);
  color: #6EE7B7;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
  border-color: rgba(239, 68, 68, 0.5);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

/* ────────────────────────────────────────── */
/* MAIN CONTENT */
/* ────────────────────────────────────────── */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ────────────────────────────────────────── */
/* LOGIN PAGE */
/* ────────────────────────────────────────── */
.login-body {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-600) 50%, var(--accent-light) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem 2rem;
  width: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  height: 48px;
  margin-bottom: 1rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-footer {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  text-align: center;
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--blue-700) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px 0 rgba(44, 114, 184, 0.4);
  margin-top: 0.25rem;
}

.btn-login svg {
  width: 18px;
  height: 18px;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(44, 114, 184, 0.5);
}

.btn-login:active {
  transform: translateY(0);
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  transition: color var(--transition);
}

.toggle-password svg {
  width: 17px;
  height: 17px;
}

.toggle-password:hover {
  color: var(--accent);
}

/* ────────────────────────────────────────── */
/* FORM GROUPS & INPUTS */
/* ────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--gray-400);
  pointer-events: none;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: 0.6rem 0.875rem;
  padding-left: 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text-main);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text-main);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus,
.input-wrapper input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 114, 184, 0.12);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236B7280' d='M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.col-span-2 {
  grid-column: span 2;
}

.col-span-3 {
  grid-column: span 3;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.patient-view-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* ────────────────────────────────────────── */
/* BUTTONS */
/* ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--blue-700));
  color: #fff;
  box-shadow: 0 2px 8px rgba(44, 114, 184, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 114, 184, 0.4);
  color: #fff;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #DC2626;
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #059669;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--blue-50);
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
}

.btn-icon {
  padding: 0.45rem;
  border-radius: var(--radius-sm);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

/* ────────────────────────────────────────── */
/* CARDS */
/* ────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 0 3px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.08), 0 0 4px rgba(0, 0, 0, 0.03);
  transform: translateY(-2px);
}

.card-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: rgba(249, 250, 251, 0.5);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--gray-50);
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-left: 4px solid var(--accent);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px -4px rgba(0, 0, 0, 0.08);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-900);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ────────────────────────────────────────── */
/* ALERTS */
/* ────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-width: 1px;
  border-style: solid;
}

.alert svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.alert-error {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FECACA;
}

.alert-success {
  background: #ECFDF5;
  color: #065F46;
  border-color: #A7F3D0;
}

.alert-warning {
  background: #FFFBEB;
  color: #92400E;
  border-color: #FDE68A;
}

.alert-info {
  background: var(--blue-50);
  color: var(--blue-800);
  border-color: var(--blue-200);
}

/* ────────────────────────────────────────── */
/* TABLES */
/* ────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  transition: background var(--transition), transform 0.2s ease;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--blue-50);
  transform: translateY(-1px) scale(1.002);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  position: relative;
  z-index: 10;
}

tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
}

.td-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ────────────────────────────────────────── */
/* PAGE HEADER */
/* ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--gray-300);
}

/* ────────────────────────────────────────── */
/* SEARCH & FILTERS */
/* ────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--gray-400);
}

.search-input-wrap input {
  padding-left: 2.5rem;
}

/* ────────────────────────────────────────── */
/* BADGES */
/* ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.73rem;
  font-weight: 600;
}

.badge-blue {
  background: var(--blue-100);
  color: var(--blue-700);
}

.badge-green {
  background: #DCFCE7;
  color: #15803D;
}

.badge-red {
  background: #FEE2E2;
  color: #B91C1C;
}

.badge-gray {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge-orange {
  background: #FEF3C7;
  color: #92400E;
}

/* ────────────────────────────────────────── */
/* FORM SECTION DIVIDERS */
/* ────────────────────────────────────────── */
.form-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.form-section-header {
  background: linear-gradient(135deg, var(--blue-900), var(--accent-dark));
  color: #fff;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-section-header svg {
  width: 17px;
  height: 17px;
  opacity: 0.9;
}

.form-section-body {
  padding: 1.25rem;
}

.form-section-body .form-grid,
.form-section-body .form-grid-3 {
  gap: 0.875rem;
}

/* Checkboxes */
.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.875rem;
}

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

/* VAS slider */
.vas-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.vas-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.vas-value {
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

/* ────────────────────────────────────────── */
/* SEANS TAKİP TABLOSU */
/* ────────────────────────────────────────── */
.seans-table {
  width: 100%;
  border-collapse: collapse;
}

.seans-table th,
.seans-table td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.85rem;
}

.seans-table thead th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-600);
}

.seans-table td input,
.seans-table td textarea {
  border: none;
  background: transparent;
  width: 100%;
  padding: 0;
  min-height: unset;
  resize: none;
}

.seans-table td input:focus,
.seans-table td textarea:focus {
  outline: 1px solid var(--accent);
  border-radius: 2px;
}

.btn-add-row {
  margin-top: 0.5rem;
}

/* ────────────────────────────────────────── */
/* PATIENT CARD (list view) */
/* ────────────────────────────────────────── */
.patient-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.625rem;
  transition: all var(--transition);
  cursor: pointer;
}

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

.patient-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--blue-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.patient-info {
  flex: 1;
}

.patient-name {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.95rem;
}

.patient-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.patient-counts {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ────────────────────────────────────────── */
/* ASSESSMENT HISTORY TIMELINE */
/* ────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
  transform: translateX(-4px);
}

.timeline-card {
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.5);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.03);
}

.timeline-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -4px rgba(0, 0, 0, 0.08);
}

.timeline-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline-author {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
}

.timeline-complaint {
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-top: 4px;
}

/* ────────────────────────────────────────── */
/* MODAL */
/* ────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 480px;
  width: 100%;
  padding: 1.75rem;
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* ────────────────────────────────────────── */
/* PRINT STYLES */
/* ────────────────────────────────────────── */
@media print {

  .navbar,
  .site-footer,
  .btn,
  .no-print,
  .breadcrumb {
    display: none !important;
  }

  .main-content {
    padding: 0;
    max-width: 100%;
  }

  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
  }

  .card,
  .form-section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .form-section-header {
    background: var(--accent) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .print-header h1 {
    font-size: 16pt;
    color: var(--blue-900);
  }

  .print-header p {
    font-size: 10pt;
    color: #555;
  }
}

.print-header {
  display: none;
}

.print-only {
  display: none;
}

@media print {
  .print-only {
    display: block !important;
  }
}

/* ────────────────────────────────────────── */
/* FOOTER */
/* ────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: 1rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: #fff;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ────────────────────────────────────────── */
/* UTILITY */
/* ────────────────────────────────────────── */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent);
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.flex-wrap {
  flex-wrap: wrap;
}

.w-full {
  width: 100%;
}

.hidden {
  display: none !important;
}

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

/* ────────────────────────────────────────── */
/* RESPONSIVE */
/* ────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--blue-900);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    overflow-y: auto;
    z-index: 99;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
  }

  .nav-user {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
  }

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

  .col-span-2,
  .col-span-3 {
    grid-column: span 1;
  }

  .dashboard-grid,
  .patient-view-grid {
    grid-template-columns: 1fr !important;
  }

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

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-content {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 1.75rem 1.25rem;
  }

  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }
}