/* Ev İlaç Dolabı — Modern panel teması */
:root {
  --primary: #6366f1;
  --primary-2: #8b5cf6;
  --primary-dark: #4f46e5;
  --accent: #14b8a6;
  --accent-warm: #f472b6;
  --bg: #eef1fb;
  --bg-grad-1: #e0e7ff;
  --bg-grad-2: #fce7f3;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: rgba(99, 102, 241, 0.12);
  --text: #1e1b4b;
  --text-muted: #64748b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(79, 70, 229, 0.08);
  --shadow-lg: 0 20px 50px rgba(79, 70, 229, 0.12);
  --sidebar-w: 268px;
  --topbar-h: 72px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body.app-body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-grad-1) 0%, var(--bg) 40%, var(--bg-grad-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  transition: transform var(--transition);
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-content {
  padding: 1.5rem 2rem 2.5rem;
  max-width: 1400px;
  width: 100%;
}

/* Sidebar brand */
.sidebar-brand {
  padding: 1.35rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent-warm));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.sidebar-brand-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-brand-text small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.sidebar-nav {
  padding: 0.5rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 1rem;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all var(--transition);
}

.sidebar-nav .nav-link .nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--primary);
  transition: all var(--transition);
}

.sidebar-nav .nav-link:hover {
  color: var(--primary-dark);
  background: rgba(99, 102, 241, 0.06);
}

.sidebar-nav .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.sidebar-nav .nav-link.active .nav-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sidebar-nav .nav-link.nav-danger {
  color: #e11d48;
}

.sidebar-nav .nav-link.nav-danger:hover {
  background: rgba(225, 29, 72, 0.08);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Topbar */
.app-topbar {
  height: var(--topbar-h);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.topbar-search {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1rem 0.55rem 2.6rem;
  background: var(--surface);
  font-size: 0.88rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.topbar-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.topbar-search .search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35);
}

.user-meta strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.2;
}

.user-meta small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.role-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  color: var(--primary-dark);
}

.sidebar-toggle {
  display: none;
  border: none;
  background: var(--surface);
  border-radius: 10px;
  padding: 0.5rem;
  color: var(--text);
  box-shadow: var(--shadow);
}

/* Page header */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 560px;
}

.page-badge {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  box-shadow: var(--shadow);
}

/* Cards */
.panel-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.panel-card-header {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.panel-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.panel-card-body {
  padding: 1.35rem;
}

/* Stat cards */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  height: 100%;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.stat-primary .stat-icon { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.stat-success .stat-icon { background: linear-gradient(135deg, #10b981, #14b8a6); }
.stat-danger .stat-icon { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.stat-warning .stat-icon { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat-accent .stat-icon { background: linear-gradient(135deg, #ec4899, #f472b6); }

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Welcome hero */
.welcome-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 50%, var(--accent-warm) 100%);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  color: #fff;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.35);
}

.welcome-hero::before,
.welcome-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.welcome-hero::before {
  width: 200px;
  height: 200px;
  top: -60px;
  right: -40px;
}

.welcome-hero::after {
  width: 120px;
  height: 120px;
  bottom: -30px;
  left: 40%;
}

.welcome-hero h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  position: relative;
}

.welcome-hero p {
  margin: 0;
  opacity: 0.92;
  font-size: 0.95rem;
  position: relative;
  max-width: 520px;
}

.welcome-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  position: relative;
}

/* Buttons */
.btn-app {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border: none;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-app-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-app-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.45);
}

.btn-app-ghost {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-app-ghost:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.btn-app-outline {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

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

.btn-app-success {
  background: linear-gradient(135deg, #10b981, var(--accent));
  color: #fff;
}

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

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

/* Alerts */
.alert-app {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
  font-size: 0.92rem;
}

.alert-app.alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.alert-app.alert-danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.alert-app.alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.alert-app.alert-info {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.alert-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.info-banner {
  background: linear-gradient(90deg, #eef2ff, #fdf4ff);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.info-banner strong {
  color: var(--primary-dark);
}

/* Medicine cards grid */
.medicine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.medicine-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.medicine-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.medicine-card.status-gecmis::before { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.medicine-card.status-yakinda::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.medicine-card.status-gecerli::before { background: linear-gradient(90deg, #10b981, #14b8a6); }

.medicine-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.medicine-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.medicine-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.medicine-meta span strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
}

.medicine-tags {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Badges */
.badge-skt {
  font-weight: 600;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  font-size: 0.72rem;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #ffe4e6; color: #9f1239; }

/* Tables */
.table-modern {
  width: 100%;
  margin: 0;
  font-size: 0.88rem;
}

.table-modern thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border: none;
}

.table-modern tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.table-modern tbody tr:hover {
  background: rgba(99, 102, 241, 0.03);
}

.tarih-gecmis td { background: rgba(244, 63, 94, 0.06) !important; }
.tarih-yakinda td { background: rgba(245, 158, 11, 0.08) !important; }
.tarih-gecerli td { background: rgba(16, 185, 129, 0.05) !important; }

/* DataTables override */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.35rem 0.65rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
  border-radius: 8px;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.view-toggle .btn {
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Scanner card */
.scanner-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  border-radius: var(--radius);
  padding: 2rem;
  color: #fff;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.scanner-hero .scan-ring {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.selected-medicine {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ecfdf5, var(--surface));
}

/* Modals */
.modal-content {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  padding: 0.6rem 0.85rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
}

/* Tabs */
.nav-tabs-modern {
  border: none;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.nav-tabs-modern .nav-link {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.nav-tabs-modern .nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
}

.auth-visual {
  flex: 1;
  background: linear-gradient(145deg, #4f46e5 0%, #7c3aed 45%, #ec4899 100%);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.auth-visual::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  top: -100px;
  right: -100px;
}

.auth-visual h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  letter-spacing: -0.03em;
}

.auth-visual p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 400px;
  line-height: 1.6;
  position: relative;
}

.auth-features {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  position: relative;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

.auth-features .feat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.auth-card .auth-sub {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

.auth-card .btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: none;
  border-radius: 999px;
  padding: 0.7rem;
  font-weight: 600;
}

.auth-card .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.auth-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  color: var(--primary-dark);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.45s ease forwards;
}

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

/* Mobile */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .app-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }

  .app-content {
    padding: 1rem;
  }

  .app-topbar {
    padding: 0 1rem;
  }

  .topbar-search {
    display: none;
  }

  .auth-visual {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .page-title {
    font-size: 1.35rem;
  }

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

/* İlaç gruplu liste */
.warning-panel {
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}

.warning-panel-danger {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border-color: #fecdd3;
}

.warning-panel-warning {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #fde68a;
}

.warning-panel h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warning-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 0.88rem;
}

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

.medicine-group-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.medicine-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.medicine-group.status-gecmis {
  border-color: #fecdd3;
}

.medicine-group.status-yakinda {
  border-color: #fde68a;
}

.medicine-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  user-select: none;
}

.medicine-group-header:hover {
  background: rgba(99, 102, 241, 0.04);
}

.medicine-group-title {
  flex: 1;
  min-width: 0;
}

.medicine-group-title h4 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.medicine-group-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.medicine-group-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.medicine-group-chevron {
  transition: transform var(--transition);
  color: var(--text-muted);
}

.medicine-group.open .medicine-group-chevron {
  transform: rotate(180deg);
}

.medicine-group-body {
  display: none;
  padding: 0 1.2rem 1rem;
  border-top: 1px solid var(--border);
}

.medicine-group.open .medicine-group-body {
  display: block;
}

.kutu-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

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

.kutu-row.kutu-gecmis {
  background: rgba(244, 63, 94, 0.06);
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 8px;
}

.kutu-row.kutu-yakinda {
  background: rgba(245, 158, 11, 0.08);
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 8px;
}

.kutu-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
}
