:root {
  --sinoai-green: #50ab93;
  --sinoai-green-soft: #e5f4ee;
  --sinoai-green-dark: #39917a;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --text-main: #0f172a;
  --text-muted: #6b7280;
}

/* ===== GLOBAL ===== */

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

body {
  margin: 0;
  padding: 24px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f3f4f6; /* juda och kulrang – kartalar ko‘rinishi yaxshi bo‘ladi */
  color: var(--text-main);
}

.page {
  max-width: 1320px;
  margin: 0 auto 40px;
}

/* HEADER / TOP STRIP */

.top-strip {
  margin-top: 16px;
  margin-bottom: 18px;
  padding: 18px 24px;
  border-radius: 32px;
  background: linear-gradient(90deg, #50ab93, #39917a);
  color: #0b172a;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.35);
}

.top-strip-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sino-logo {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sino-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1); /* logoni oq ko'rinishda saqlash */
}

.top-strip-text .top-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.top-strip-text .top-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

/* markazdagi nav pill – sendagi ko‘rinishga mos */

.top-strip-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav {
  padding: 6px;
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.95);
  display: flex;
  gap: 8px;
}

.nav-link {
  white-space: nowrap;
  font-size: 14px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #4b5563;
  text-decoration: none;
  border: 1px solid rgba(209, 213, 219, 0.9);
  transition:
    background 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.08s ease,
    border-color 0.14s ease;
}

.nav-link:hover {
  background: #e5f4ee;
  color: #39917a;
  border-color: #c1decf;
  box-shadow: 0 8px 20px rgba(80, 171, 147, 0.25);
  transform: translateY(-1px);
}

.nav-link.active {
  background: linear-gradient(135deg, #50ab93, #39917a);
  color: #f9fafb;
  border-color: #39917a;
  box-shadow: 0 10px 26px rgba(80, 171, 147, 0.35);
}

.nav-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.9);
  border-style: dashed;
}

.top-strip-right {
  margin-left: 12px;
}

/* TG / APP toggle */

.top-strip-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-group {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 999px;
  padding: 2px;
  display: inline-flex;
  gap: 2px;
}

.toggle-btn {
  border: none;
  background: transparent;
  color: #e5f9ee;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.toggle-btn:hover {
  transform: translateY(-1px);
}

.toggle-btn.active {
  background: #ecfdf5;
  color: var(--sinoai-green-dark);
}

.logout-btn {
  margin-left: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(80, 171, 147, 0.6);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(209, 245, 230, 0.95));
  color: #1f7a63;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s, border-color 0.2s;
}

.logout-btn:hover {
  transform: translateY(-1px);
  border-color: #39917a;
  box-shadow: 0 10px 24px rgba(57, 145, 122, 0.25);
}

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

/* ===== KPI STRIP – SinoAI neon style ===== */

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 30px;
  padding: 18px 22px 22px;
  background: linear-gradient(
    to bottom,
    #e7f3ed 0%,
    #edf1f7 55%,
    transparent 100%
  );
  border-radius: 24px 24px 32px 32px;
}

/* Bitta karta */
.kpi-chip {
  position: relative;
  background: #ffffff;
  border-radius: 22px;
  padding: 12px 14px 10px;
  box-shadow: none;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

/* Yashil glow uchun ichki gradient chiziq */
.kpi-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(80, 171, 147, 0.14), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.kpi-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(57, 145, 122, 0.18);
  border-color: rgba(57, 145, 122, 0.22);
}

.kpi-chip:hover::before {
  opacity: 1;
}

/* Header: icon + label */
.kpi-chip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.kpi-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #d8efe9, #50ab93);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #39917a;
  font-size: 17px;
  box-shadow: 0 0 0 2px #e5f4ee;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-chip:hover .kpi-icon {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(80, 171, 147, 0.45);
}

.kpi-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

/* Qiymat */
.kpi-value {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  padding-left: 2px;
}

.loading-placeholder {
  position: relative;
  color: transparent !important;
}

.loading-placeholder::after {
  content: "";
  display: inline-block;
  width: var(--loading-width, 44px);
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(80, 171, 147, 0.15),
    rgba(80, 171, 147, 0.6),
    rgba(80, 171, 147, 0.15)
  );
  background-size: 200% 100%;
  animation: kpiShimmer 1.2s ease-in-out infinite;
}

#kpi-mau-dau.loading-placeholder,
#kpi-users.loading-placeholder,
#kpi-retention.loading-placeholder,
#regionUsersMap.loading-placeholder,
#regionExtraMap.loading-placeholder {
  --loading-width: 64px;
}

@keyframes kpiShimmer {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

/* Responsiv: 4 -> 3 -> 2 -> 1 */
@media (max-width: 1280px) {
  .kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .kpi-strip {
    grid-template-columns: 1fr;
  }
}

/* ===== MAP + REGION CARD LAYOUT ===== */

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.1fr);
  gap: 20px;
}

/* CHAP TOMON – XARITA PANELI */

.map-panel {
  background: radial-gradient(circle at top left, #ecfdf5, #ffffff 40%, #e5f8ee);
  border-radius: 24px;
  padding: 16px 18px 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.legend-box {
  width: 34px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, #50ab93, #39917a);
}

.legend-text {
  font-size: 16px;
  font-weight: 600;
}

/* Xarita oynasi */
.map-wrapper {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 16px;
  border: 1px solid #e5e7eb;
}

/* SVG o‘zi */
.uz-map-svg {
  width: 100%;
  height: auto;
  max-height: 460px;
  display: block;
}

/* INLINE filllarni bosish uchun !important */
.uz-map-svg .region {
  fill: #e5f4ee !important;          /* juda och yashil */
  stroke: #50ab93 !important;
  stroke-width: 1.8;
  cursor: pointer;
  transition: fill 0.18s ease, stroke 0.18s ease, stroke-width 0.18s ease,
    transform 0.1s ease;
}

.uz-map-svg .region:hover {
  fill: #d2ece3 !important;
  transform: translateY(-0.5px);
}

.uz-map-svg .region.active {
  fill: #50ab93 !important;
  stroke: #000000 !important;
  stroke-width: 2.2;
}

/* Xarita ichida ko‘rsatiladigan karta (o‘ng yuqori) */
.uz-map-inner {
  position: relative;
}

.uz-map-info {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.uz-info-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 14px 16px 12px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16);
  min-width: 240px;
  border: 1px solid #e5e7eb;
}

.uz-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.uz-info-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.uz-region-pin {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e5f4ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #50ab93;
  font-size: 18px;
}

.uz-info-body {
  display: grid;
  gap: 6px;
}

.uz-info-row {
  display: flex;
  flex-direction: column;
}

.uz-info-row .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.uz-info-row .value {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

/* Pastdagi holat legendi */

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: #4b5563;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-color {
  width: 24px;
  height: 14px;
  border-radius: 3px;
}

.status-excellent {
  background: #50ab93;
}
.status-good {
  background: #a3e635;
}
.status-bad {
  background: #fde68a;
}

/* O‘NG TOMON – REGION CARD */

.region-panel {
  display: flex;
  align-items: stretch;
}

.region-card {
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: none;
  padding: 18px 20px;
  width: 100%;
  border: 1px solid #e5e7eb;
  position: relative;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

/* Neon “halo” pastda */
.region-card::after {
  content: "";
  position: absolute;
  inset: auto 10% -14px;
  height: 28px;
  background: radial-gradient(circle, rgba(57, 145, 122, 0.4), transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.region-card:hover {
  box-shadow: 0 14px 28px rgba(57, 145, 122, 0.16);
  border-color: rgba(57, 145, 122, 0.2);
  transform: translateY(-1px);
}

.region-card:hover::after {
  opacity: 0.8;
}

.region-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.region-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.region-pin {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--sinoai-green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sinoai-green);
  font-size: 18px;
}

.region-pin.filter-refresh-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  box-shadow: 0 10px 22px rgba(57, 145, 122, 0.35);
}

.region-pin.filter-refresh-btn i {
  font-size: 16px;
}

.region-card-body {
  display: grid;
  gap: 8px;
}

.region-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.region-row .label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.region-row .value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.region-row.small .label {
  font-size: 10px;
}

.region-row.small .value {
  font-size: 13px;
}

.region-card hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 10px 0;
}

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

@media (max-width: 1024px) {
  body {
    padding: 16px;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .region-panel {
    margin-top: 14px;
  }

  .uz-map-svg {
    max-height: 380px;
  }
}

@media (max-width: 800px) {
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .top-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
/* REGION PANEL UMUMIY */

.region-panel {
  display: flex;
}

/* Katta card */

.neon-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 20px 22px;
  box-shadow: 0 16px 40px rgba(57, 145, 122, 0.18);
  border: 1px solid #e5e7eb;
  width: 100%;
}

.region-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.region-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.region-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.region-pin {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #e5f4ee;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #50ab93;
  font-size: 20px;
}

/* 2 ta table yonma-yon */

.region-tables-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* Table cardlar */

.table-card {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.table-card.compact {
  box-shadow: none;
}

.table-card.compact:hover {
  box-shadow: 0 10px 22px rgba(57, 145, 122, 0.16);
  border-color: rgba(57, 145, 122, 0.2);
  transform: translateY(-1px);
}

/* Header qatori */

.table-header-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 60%, #ecfdf5 100%);
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  align-items: center;
  letter-spacing: 0.01em;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  flex-wrap: wrap;
}

.th-name {
  text-align: left;
}

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

/* Scroll */

.table-scroll {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 12px;
}

/* Jadval va qatorlar */

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

.stat-table tr {
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease;
}

.stat-table tr:last-child {
  border-bottom: none;
}

.stat-table tr:hover {
  background: #f9fafb;
  transform: translateY(-1px);
}

.stat-table tr.active {
  background: #e5f4ee;
  box-shadow: inset 0 0 0 1px #d2e8de;
}

.stat-table td {
  padding: 9px 12px;
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
}

.stat-table td:first-child {
  text-align: left;
}

.stat-table td:nth-child(2) {
  text-align: right;
  white-space: nowrap;
}

/* Responsiv */

@media (max-width: 1024px) {
  .region-tables-row {
    grid-template-columns: 1fr;
  }
}


/* ===== GLOBAL NAVBAR (1–6 sahifa uchun) ===== */

.nav-shell {
  margin: 16px 0 22px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.95); /* juda engil yashil fonda */
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

/* scroll bo'lsa ham chiroyli bo'lsin */
.nav-shell::-webkit-scrollbar {
  height: 4px;
}
.nav-shell::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

/* umumiy pill linklar */

.nav-link {
  white-space: nowrap;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #4b5563;
  text-decoration: none;
  border: 1px solid rgba(209, 213, 219, 0.8);
  transition:
    background 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.08s ease,
    border-color 0.14s ease;
}

.nav-link:hover {
  background: #e5f4ee;
  color: #39917a;
  border-color: #c1decf;
  box-shadow: 0 8px 20px rgba(80, 171, 147, 0.25);
  transform: translateY(-1px);
}

/* active – SinoAI yashil gradient pill */

.nav-link.active {
  background: linear-gradient(135deg, #50ab93, #39917a);
  color: #f9fafb;
  border-color: #39917a;
  box-shadow: 0 10px 26px rgba(80, 171, 147, 0.35);
}

/* disabled – kelajakdagi sahifalar */

.nav-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.85);
  border-style: dashed;
}
.nav-link.disabled:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.9);
  color: #9ca3af;
}





/* ===== PAGE 2 – CHARTS LAYOUT ===== */

.charts-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Chart card */

.chart-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 18px 18px 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09);
  border: 1px solid #e5e7eb;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.chart-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.chart-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  color: #6b7280;
}

/* Filter panel */

.chart-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: #6b7280;
}

.filter-item select,
.filter-item input[type="date"],
.filter-item input[type="number"] {
  min-width: 120px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 12px;
  color: #111827;
  background: #f9fafb;
  outline: none;
}

.filter-item select:focus,
.filter-item input[type="date"]:focus,
.filter-item input[type="number"]:focus {
  border-color: #50ab93;
  box-shadow: 0 0 0 1px #d2e8de;
}

.filter-apply {
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #50ab93;
  color: #0b172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(122, 184, 159, 0.35);
  transition:
    background 0.12s ease,
    transform 0.08s ease,
    box-shadow 0.12s ease;
}

.filter-apply:hover {
  background: #39917a;
  transform: translateY(-1px);
}

/* New users filters: professional compact panel */
#newUsersForm.new-users-filters {
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(
    135deg,
    rgba(248, 250, 252, 0.95),
    rgba(240, 253, 250, 0.92)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  gap: 8px;
}

#newUsersForm .filter-item {
  gap: 4px;
}

#newUsersForm .filter-item > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

#newUsersForm #newUsersChannel {
  min-width: 108px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: #ffffff;
}

#newUsersForm .new-users-range-shell {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

#newUsersForm #newUsersRange {
  width: 240px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  padding: 8px 34px 8px 12px;
  font-size: 12px;
  letter-spacing: 0.02em;
}

#newUsersForm #newUsersRange:focus {
  border: none;
  background: transparent;
  box-shadow: 0 0 0 2px rgba(80, 171, 147, 0.2);
}

#newUsersForm .new-users-range-shell .date-icon {
  right: 10px;
  color: #64748b;
}

#newUsersForm .new-users-apply {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0ea5a4);
  box-shadow: 0 10px 22px rgba(14, 165, 164, 0.28);
}

#newUsersForm .new-users-apply:hover {
  background: linear-gradient(135deg, #115e59, #0f766e);
  box-shadow: 0 14px 26px rgba(15, 118, 110, 0.32);
}

/* Canvas container */

.chart-body {
  margin-top: 8px;
  padding-top: 4px;
}

.chart-body canvas {
  width: 100% !important;
  height: 320px !important;
}

#sessionsForm .sessions-range-shell {
  border-radius: 999px;
}

#sessionsForm #sessionsRange {
  width: 240px;
}

/* Orders chart filter: compact, clean and denser than default filters */
#ordersForm {
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(
    135deg,
    rgba(248, 250, 252, 0.96),
    rgba(239, 246, 255, 0.92)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(15, 23, 42, 0.06);
  gap: 7px;
}

#ordersForm .filter-item {
  gap: 4px;
}

#ordersForm .filter-item > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

#ordersForm #ordersService,
#ordersForm #ordersFrom,
#ordersForm #ordersTo {
  height: 32px;
  min-width: 116px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: #ffffff;
  font-size: 12px;
}

#ordersForm #ordersFrom,
#ordersForm #ordersTo {
  min-width: 126px;
  letter-spacing: 0.02em;
}

#ordersForm .filter-apply {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0ea5a4);
  box-shadow: 0 10px 20px rgba(14, 165, 164, 0.28);
}

#ordersForm .filter-apply:hover {
  background: linear-gradient(135deg, #115e59, #0f766e);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.32);
}

#sessionsForm #sessionsIdleTimeout {
  width: 130px;
}

#sessionsForm #sessionsPageSize {
  min-width: 90px;
}

.sessions-kpis {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sessions-kpi-card {
  border: 1px solid #dbe6e1;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbfa, #f3faf7);
  padding: 10px 12px;
}

.sessions-kpi-card span {
  display: block;
  font-size: 12px;
  color: #64748b;
}

.sessions-kpi-card strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  color: #0f172a;
  line-height: 1.15;
}

.user-active-pattern-card {
  border: 1px solid rgba(99, 102, 241, 0.14);
  background:
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff, #f8faff);
}

.user-active-pattern-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-active-pattern-kpi {
  background: linear-gradient(165deg, #eef2ff, #f8fafc);
  border-color: rgba(99, 102, 241, 0.08);
}

.user-active-pattern-kpi span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 700;
}

.user-active-pattern-kpi strong {
  font-size: 28px;
  letter-spacing: -0.03em;
  color: #1e1b4b;
}

.user-active-pattern-chart-body {
  position: relative;
}

.sessions-table-wrap {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: auto;
  max-height: 420px;
  background: #ffffff;
}

.sessions-table {
  min-width: 1220px;
}

.sessions-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f7f4;
}

.sessions-user-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sessions-user-name {
  font-weight: 700;
  color: #0f172a;
}

.sessions-user-id {
  font-size: 11px;
  color: #64748b;
}

.sessions-duration-pill,
.sessions-close-pill,
.sessions-platform-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}

.sessions-duration-pill {
  background: #ecfeff;
  color: #0f766e;
}

.sessions-platform-pill {
  background: #eef2ff;
  color: #4338ca;
  text-transform: uppercase;
}

.sessions-close-pill {
  background: #f8fafc;
  color: #475569;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.session-status-pill.active {
  background: #dcfce7;
  color: #166534;
}

.session-status-pill.inactive {
  background: #f1f5f9;
  color: #475569;
}

.sessions-table-empty {
  display: none;
  padding: 18px 14px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.sessions-table-empty.visible {
  display: block;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.chart-mini {
  background: #f8fbfa;
  border-radius: 18px;
  padding: 12px 12px 8px;
  border: 1px solid #e4efea;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.chart-mini-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin: 2px 0 6px;
}

.chart-mini-body {
  margin-top: 0;
}

.chart-mini-body canvas {
  width: 100% !important;
  height: 220px !important;
}

/* Responsiv */

@media (max-width: 900px) {
  .chart-body canvas {
    height: 260px !important;
  }

  .chart-mini-body canvas {
    height: 200px !important;
  }
}

@media (max-width: 640px) {
  .chart-card {
    padding: 14px 12px 18px;
  }

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

  .chart-filters {
    width: 100%;
  }

  .filter-item select,
  .filter-item input[type="date"],
  .filter-item input[type="number"] {
    min-width: 0;
  }

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

  .sessions-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-active-pattern-kpis {
    grid-template-columns: 1fr;
  }

  #newUsersForm.new-users-filters {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
  }

  #newUsersForm #newUsersChannel,
  #newUsersForm #newUsersRange {
    width: 100%;
    min-width: 0;
  }

  #sessionsForm #sessionsRange {
    width: 100%;
    min-width: 0;
  }

  #ordersForm {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
  }

  #ordersForm #ordersService,
  #ordersForm #ordersFrom,
  #ordersForm #ordersTo {
    width: 100%;
    min-width: 0;
  }
}

/* ===== Date range inputs ===== */

.date-range-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.date-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-field label {
  font-size: 13px;
  color: #6b7280;
}

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

.date-input input {
  width: 150px;
  padding: 8px 34px 8px 14px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: #f9fafb;
  font-size: 14px;
  color: #111827;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease,
    background 0.14s ease;
}

.date-input input:focus {
  border-color: #50ab93;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(122, 184, 159, 0.25);
}

#dauMauRange {
  width: 250px;
}

#newUsersRange {
  width: 240px;
}

.new-users-range-shell input {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.date-icon {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: #6b7280;
  font-size: 16px;
}

/* Refresh tugma */

.date-refresh-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #50ab93, #39917a);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(122, 184, 159, 0.5);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.date-refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(22, 163, 74, 0.6);
}

.date-refresh-btn i {
  font-size: 18px;
}

/* ===== Litepicker custom theme (SinoAI) ===== */

.litepicker {
  border-radius: 18px;
  border: 1px solid #d9e3dc;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    sans-serif;
  background: #ffffff;
}

.litepicker .container__main {
  padding: 12px 14px 16px;
  background: #ffffff;
}

.litepicker .month-item-header {
  font-weight: 600;
  color: #0f172a;
}

.litepicker select,
.litepicker .month-item-name select,
.litepicker .month-item-year select {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 4px 10px;
  box-shadow: none;
}

.litepicker .month-item-weekdays-row > div {
  color: #9ca3af;
  font-size: 11px;
}

/* Kunlar */

.litepicker .day-item {
  width: 38px;
  height: 32px;
  border-radius: 10px;
  margin: 2px;
  font-size: 13px;
  line-height: 32px;
}

.litepicker .day-item:hover {
  background: #eef7f2;
}

/* Tanlangan segment */

.litepicker .day-item.is-in-range {
  background: #e5f4ee;
  color: #39917a;
}

/* Start / end – gradient pill */

.litepicker .day-item.is-start-date,
.litepicker .day-item.is-end-date {
  background: linear-gradient(135deg, #50ab93, #39917a);
  color: #ffffff;
  border-radius: 999px;
}

/* Bugungi kun */

.litepicker .day-item.is-today:not(.is-in-range):not(.is-start-date):not(.is-end-date) {
  border: 1px solid rgba(80, 171, 147, 0.5);
}

/* Header tugmalari (oylar orasida yurish) */

.litepicker .button-next-month,
.litepicker .button-previous-month {
  color: #4b5563;
}
.litepicker .button-next-month:hover,
.litepicker .button-previous-month:hover {
  background: #e5f4ee;
  color: #39917a;
}



/* ==== 3-PAGE: FILTER STRIP ==== */

.filter-strip {
  margin-bottom: 18px;
  padding: 14px 20px;
  border-radius: 24px;
  background: linear-gradient(120deg, #ecfdf5, #f9fafb);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group.wide {
  flex: 1;
}

.filter-group label {
  font-size: 13px;
  color: #4b5563;
}

/* Select styling (channel, region) */

.fancy-select {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.fancy-select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 8px 34px 8px 12px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: #f9fafb;
  font-size: 14px;
  color: #111827;
  outline: none;
  cursor: pointer;
  min-width: 150px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease,
    background 0.14s ease;
}

.fancy-select select:focus {
  border-color: #50ab93;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(122, 184, 159, 0.25);
}

.fancy-select-icon {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: #6b7280;
  font-size: 16px;
}

/* Date range – avval yozganimizga mos tweaklar */

.date-label {
  font-size: 13px;
  color: #6b7280;
}

/* ==== 3-PAGE: LAYOUT + DARK CHART CARDS ==== */

.content-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 18px;
}

.grid-1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

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

.chart-card.dark {
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  color: #0f172a;
  position: relative;
}

.chart-card.dark::before {
  content: "";
  position: absolute;
  inset: auto;
  display: none;
}

.chart-card-header {
  position: relative;
  z-index: 1;
  padding: 16px 20px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.age-channel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(248, 250, 252, 0.9);
}

.age-channel-btn {
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.age-channel-btn:hover {
  color: #334155;
  background: rgba(226, 232, 240, 0.7);
}

.age-channel-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

.chart-refresh-btn {
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: #ffffff;
  color: #0f766e;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.chart-refresh-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.18);
}

.chart-refresh-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.chart-refresh-btn i {
  display: inline-block;
  line-height: 1;
  transform-origin: center center;
  will-change: transform;
}

.chart-card-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.chart-card-header p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.chart-card-body {
  position: relative;
  z-index: 1;
  padding: 4px 20px 18px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-card .chart-card-body {
  min-height: 320px;
}

.disease-card .chart-card-body {
  min-height: 440px;
  padding-bottom: 24px;
}

.disease-card .chart-card-body canvas {
  height: 360px;
  max-height: 440px;
}

/* Canvas responsive */
.chart-card-body canvas {
  width: 100%;
  max-height: 360px;
  height: 280px;
  flex: 1;
}

.doctor-range-btn {
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(239, 246, 255, 0.95));
  color: #0f766e;
  height: 34px;
  border-radius: 11px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.doctor-range-btn span {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doctor-range-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.16);
}

.doctor-range-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.doctor-range-btn i {
  font-size: 16px;
  transform-origin: center center;
}

.doctor-range-btn.is-spinning i {
  animation: spinRefresh 0.8s linear infinite;
}

.doctor-range-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.doctor-search-card .chart-card-body canvas {
  height: 300px;
}

@media (max-width: 640px) {
  .doctor-range-btn span {
    max-width: 96px;
  }
}

/* ================= LOGIN PAGE ================= */
.login-page {
  --login-bg: radial-gradient(circle at 0% 0%, rgba(7, 32, 40, 0.95), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(3, 64, 52, 0.95), transparent 55%),
    linear-gradient(135deg, #06191c 0%, #0a2b25 45%, #062019 100%);
  --login-card: rgba(10, 30, 28, 0.92);
  --login-card-border: rgba(32, 201, 152, 0.24);
  --login-text: #d9f8ef;
  --login-text-muted: rgba(217, 248, 239, 0.6);
  --login-input: rgba(9, 28, 26, 0.75);
  --login-input-border: rgba(32, 201, 152, 0.18);
  --login-accent: #19d0a3;
  --login-accent-soft: rgba(32, 201, 152, 0.18);
  --login-node: #19d0a3;
  --login-node-shadow: rgba(18, 199, 152, 0.38);
  --login-grid: rgba(25, 154, 125, 0.18);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  color: var(--login-text);
  background: #061b17;
}

.login-page[data-theme="light"] {
  --login-bg: radial-gradient(circle at 0% 0%, rgba(195, 238, 224, 0.8), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(171, 233, 218, 0.8), transparent 55%),
    linear-gradient(135deg, #effbf5 0%, #e1f6ed 55%, #f6fffb 100%);
  --login-card: rgba(237, 252, 246, 0.98);
  --login-card-border: rgba(80, 171, 147, 0.35);
  --login-text: #0f2a22;
  --login-text-muted: rgba(15, 42, 34, 0.6);
  --login-input: rgba(255, 255, 255, 0.9);
  --login-input-border: rgba(80, 171, 147, 0.38);
  --login-accent: #18b18b;
  --login-accent-soft: rgba(80, 171, 147, 0.18);
  --login-node: #18c197;
  --login-node-shadow: rgba(80, 171, 147, 0.3);
  --login-grid: rgba(80, 171, 147, 0.18);
  background: #eefaf4;
}

.login-scene {
  position: relative;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 80px) clamp(48px, 9vw, 160px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: var(--login-bg);
  overflow: hidden;
  isolation: isolate;
}

.login-scene::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(0deg, var(--login-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--login-grid) 1px, transparent 1px),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: rotate(-8deg);
  opacity: 0.45;
  pointer-events: none;
  animation: gridPulse 8s ease-in-out infinite;
  z-index: 0;
}

.login-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 25%, rgba(32, 201, 152, 0.28), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(32, 201, 152, 0.12), transparent 50%);
  filter: blur(80px);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

.login-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(0deg, var(--login-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--login-grid) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.18;
  animation: gridBlink 6s ease-in-out infinite, gridDrift 18s linear infinite;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.login-layout {
  position: relative;
  width: min(1200px, 100%);
  display: flex;
  align-items: center;
  gap: clamp(32px, 8vw, 140px);
  z-index: 2;
  margin-left: clamp(24px, 8vw, 140px);
}

.login-card {
  width: min(380px, 92vw);
  padding: 40px 34px 34px;
  border-radius: 24px;
  background: var(--login-card);
  border: 1px solid var(--login-card-border);
  box-shadow: 0 30px 80px rgba(6, 24, 20, 0.55);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 32px;
  background: radial-gradient(circle at 50% 10%, rgba(32, 201, 152, 0.22), transparent 55%);
  opacity: 0.6;
  pointer-events: none;
}

.login-card-ring {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid rgba(32, 201, 152, 0.35);
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
  animation: ringFloat 10s ease-in-out infinite;
}

.login-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #18cfa0, #0ea37f);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 16px 36px var(--login-node-shadow);
  margin: 6px auto 8px;
}

.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.login-subtitle {
  margin: 0 0 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--login-text-muted);
}

.login-error {
  background: rgba(248, 113, 113, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  display: none;
  z-index: 2;
}

.login-error.show {
  display: block;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  font-size: 12px;
  color: var(--login-text-muted);
}

.login-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--login-input);
  border: 1px solid var(--login-input-border);
  color: var(--login-text);
}

.login-input i {
  color: var(--login-accent);
  font-size: 16px;
}

.login-input input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-family: inherit;
}

.login-input input::placeholder {
  color: rgba(231, 255, 247, 0.45);
}

.login-page[data-theme="light"] .login-input input::placeholder {
  color: rgba(15, 42, 34, 0.4);
}

.password-toggle {
  border: none;
  background: transparent;
  color: var(--login-text-muted);
  cursor: pointer;
  padding: 4px;
}

.login-forgot {
  display: inline-flex;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--login-accent);
  text-decoration: none;
  margin-top: 4px;
}

.login-button {
  margin-top: 14px;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #13c79a, #0f9b7d);
  box-shadow: 0 14px 36px var(--login-node-shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px var(--login-node-shadow);
}

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

.login-theme-toggle,
.login-help {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 32, 28, 0.6);
  color: var(--login-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-page[data-theme="light"] .login-theme-toggle,
.login-page[data-theme="light"] .login-help {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(80, 171, 147, 0.4);
  color: #103126;
}

.login-help {
  top: auto;
  bottom: 24px;
  right: 24px;
  font-size: 16px;
  font-weight: 600;
}

.login-theme-toggle:hover,
.login-help:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.login-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.login-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(32, 201, 152, 0.5);
  animation: floatDots 10s ease-in-out infinite;
}

.dot-1 { top: 18%; left: 12%; animation-delay: 0s; }
.dot-2 { top: 30%; left: 40%; animation-delay: 1s; }
.dot-3 { top: 12%; left: 68%; animation-delay: 2s; }
.dot-4 { top: 55%; left: 75%; animation-delay: 3s; }
.dot-5 { top: 70%; left: 20%; animation-delay: 4s; }
.dot-6 { top: 35%; left: 85%; animation-delay: 5s; }

.login-network {
  position: absolute;
  right: clamp(20px, 6vw, 90px);
  top: 50%;
  transform: translateY(-50%);
  width: min(660px, 58vw);
  height: min(520px, 72vh);
  z-index: 1;
  animation: networkFloat 12s ease-in-out infinite;
  pointer-events: none;
}

.login-network-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.45;
  animation: linePulse 7s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(10, 150, 120, 0.25));
}

.login-network-lines .line {
  fill: none;
  stroke: rgba(32, 201, 152, 0.28);
  stroke-width: 1;
  stroke-dasharray: 6 8;
  stroke-linecap: round;
  animation: dashMove 12s linear infinite;
}

.login-network-lines .dna {
  fill: none;
  stroke: rgba(32, 201, 152, 0.34);
  stroke-width: 2;
  stroke-dasharray: 10 12;
  stroke-linecap: round;
  animation: dashMove 14s linear infinite;
}

.login-network-lines .wave {
  fill: none;
  stroke: rgba(32, 201, 152, 0.32);
  stroke-width: 2;
  stroke-dasharray: 16 12;
  stroke-linecap: round;
  animation: dashMove 16s linear infinite;
}

.login-node {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--login-node);
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 20px 48px var(--login-node-shadow);
}

.login-node i {
  font-size: 24px;
  animation: iconPulse 4s ease-in-out infinite;
}

.node-brain { width: 98px; height: 98px; top: 44%; left: 45%; animation-delay: 0s; }
.node-heart { width: 62px; height: 62px; top: 46%; left: 76%; animation-delay: 1s; }
.node-ecg { width: 58px; height: 58px; top: 72%; left: 58%; animation-delay: 2s; }
.node-bolt { width: 58px; height: 58px; top: 74%; left: 32%; animation-delay: 3s; }
.node-chip { width: 58px; height: 58px; top: 32%; left: 62%; animation-delay: 4s; }
.node-cross { width: 44px; height: 44px; top: 26%; left: 46%; animation-delay: 5s; }

.node-brain { animation-duration: 7s; }
.node-heart { animation-duration: 6.5s; }
.node-ecg { animation-duration: 7.5s; }
.node-bolt { animation-duration: 6s; }
.node-chip { animation-duration: 7s; }
.node-cross { animation-duration: 6.8s; }

.login-node.bob {
  animation: floatNodes 7s ease-in-out infinite;
}

.login-node.orbit {
  offset-path: circle(18px at 50% 50%);
  offset-distance: 0%;
  animation: orbitTrack 10s linear infinite;
}

.login-node.orbit-slow {
  offset-path: circle(24px at 50% 50%);
  offset-distance: 0%;
  animation: orbitTrack 14s linear infinite;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(32, 201, 152, 0.35);
  animation: ringSpin 18s linear infinite;
  pointer-events: none;
}

.ring-1 {
  width: 160px;
  height: 160px;
  top: 34%;
  left: 38%;
}

.ring-2 {
  width: 220px;
  height: 220px;
  top: 30%;
  left: 34%;
  opacity: 0.6;
  animation-duration: 26s;
}

.orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(32, 201, 152, 0.65);
  box-shadow: 0 0 18px rgba(32, 201, 152, 0.45);
  animation: orbitDot 12s linear infinite;
}

.dot-a {
  top: 36%;
  left: 68%;
}

.dot-b {
  top: 58%;
  left: 36%;
  animation-duration: 16s;
}

.network-plus {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 22%;
  left: 48%;
  opacity: 0.6;
  animation: plusSpin 12s ease-in-out infinite;
}

.network-plus::before,
.network-plus::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: rgba(32, 201, 152, 0.6);
}

.network-plus::before {
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.network-plus::after {
  width: 3px;
  height: 18px;
  border-radius: 999px;
}

.network-square {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(32, 201, 152, 0.35);
  border-radius: 6px;
  top: 64%;
  left: 56%;
  transform: rotate(18deg);
  opacity: 0.55;
  animation: squareFloat 10s ease-in-out infinite;
}

.login-orb {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(32, 201, 152, 0.6);
  box-shadow: 0 0 18px rgba(32, 201, 152, 0.4);
  animation: orbPulse 5s ease-in-out infinite;
}

.orb-1 { top: 20%; left: 50%; animation-delay: 1s; }
.orb-2 { top: 58%; left: 52%; animation-delay: 2s; }

.login-waves {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 140px;
  opacity: 0.35;
  z-index: 1;
}

.login-waves path {
  fill: none;
  stroke: rgba(32, 201, 152, 0.35);
  stroke-width: 2;
}

@keyframes floatNodes {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -10px); }
}

@keyframes floatDots {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(6px, -8px); opacity: 0.9; }
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.32; }
  50% { opacity: 0.6; }
}

@keyframes gridBlink {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.35; }
}

@keyframes gridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 120px 120px; }
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.4); opacity: 1; }
}

@keyframes dashMove {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 120; }
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ringFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(12px); }
}

@keyframes orbitTrack {
  to { offset-distance: 100%; }
}

@keyframes orbitDot {
  0% { transform: rotate(0deg) translateX(18px); }
  100% { transform: rotate(360deg) translateX(18px); }
}

@keyframes plusSpin {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
  50% { transform: translateY(-6px) rotate(20deg); opacity: 0.9; }
}

@keyframes squareFloat {
  0%, 100% { transform: translate(0, 0) rotate(18deg); opacity: 0.5; }
  50% { transform: translate(-6px, -10px) rotate(26deg); opacity: 0.85; }
}

@keyframes linePulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes networkFloat {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(calc(-50% - 8px)) translateX(6px); }
}

@media (max-width: 980px) {
  .login-layout {
    justify-content: center;
    margin-left: 0;
  }
  .login-network {
    display: none;
  }
}

/* Neon dots wordmark */
/* AI summary table */

.ai-summary-table-wrapper {
  max-height: 280px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
}

.ai-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #e5e7eb;
}

.ai-summary-table thead {
  background: rgba(15, 23, 42, 0.9);
  position: sticky;
  top: 0;
}

.ai-summary-table th,
.ai-summary-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
}

.ai-summary-table th {
  font-weight: 500;
  color: #9ca3af;
  font-size: 12px;
}

.ai-summary-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.85);
}

.ai-summary-table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.7);
}

.ai-summary-table tbody tr:hover {
  background: rgba(34, 197, 94, 0.18);
}

.ai-summary-table td:nth-child(1) {
  width: 36px;
  color: #9ca3af;
}

/* ==== 4-PAGE: RATING TABLES ==== */

.rating-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.table-card {
  border-radius: 28px;
  background: radial-gradient(circle at top left, #ecfdf5, #ffffff 40%, #f3f4f6);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.1);
  padding: 18px 18px 14px;
}

.table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 10px;
}

.table-card-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.table-card-header p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.table-card-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.table-card-filter label {
  font-size: 12px;
  color: #6b7280;
}

.clinic-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(209, 213, 219, 0.6);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.clinic-filters .table-card-filter {
  align-items: flex-start;
}

.clinic-filters .date-input-shell {
  min-width: 190px;
}

.clinic-filters .filter-refresh-btn {
  box-shadow: 0 10px 22px rgba(57, 145, 122, 0.25);
}

/* jadval o'zi */

.rating-table-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: #ffffff;
}

.rating-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rating-table thead {
  background: linear-gradient(90deg, #ecfdf5, #e5f9ff);
}

.rating-table th,
.rating-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.rating-table th {
  font-weight: 600;
  font-size: 12px;
  color: #4b5563;
}

.rating-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.rating-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.rating-table tbody tr:hover {
  background: rgba(80, 171, 147, 0.08);
}

.rating-table td:first-child {
  width: 40px;
  color: #6b7280;
}

/* yulduz reyting ko'rinishini ozgina ajratib turamiz */
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.rating-stars i {
  font-size: 14px;
  color: #facc15;
}

/* responsiv */
@media (max-width: 900px) {
  .table-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-card-filter {
    align-items: flex-start;
  }

  .rating-table th,
  .rating-table td {
    padding: 6px 8px;
  }
}


/* ==== 5-PAGE: KLINIKA ANALITIKASI ==== */

.clinic-analytics-page {
  margin-bottom: 24px;
}

.clinic-analytics-card {
  padding-bottom: 20px;
  background: linear-gradient(180deg, #f7fffb 0%, #ffffff 55%);
  border: 1px solid rgba(80, 171, 147, 0.18);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.clinic-analytics-card .table-card-header {
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(80, 171, 147, 0.15), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(80, 171, 147, 0.22);
}

.clinic-analytics-card .table-card-header > div {
  max-width: 55%;
}

/* all clinics summary cards */
.clinic-overall-summary {
  margin-top: 4px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(80, 171, 147, 0.2);
  background: linear-gradient(135deg, #f3fcf8, #ffffff 55%);
}

.overall-summary-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.overall-summary-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.overall-summary-head p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.overall-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.overall-summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(209, 213, 219, 0.8);
  background: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.overall-summary-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(57, 145, 122, 0.16);
  border-color: rgba(57, 145, 122, 0.35);
}

.overall-summary-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.overall-summary-card.is-completed .overall-summary-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.35));
  color: #0f766e;
}

.overall-summary-card.is-confirmed .overall-summary-icon {
  background: linear-gradient(135deg, rgba(80, 171, 147, 0.25), rgba(45, 212, 191, 0.3));
  color: #0f766e;
}

.overall-summary-card.is-cancelled .overall-summary-icon {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.18), rgba(251, 191, 36, 0.25));
  color: #b45309;
}

.overall-summary-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.overall-summary-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.overall-summary-value {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: #0f172a;
}

.overall-summary-value.loading-placeholder {
  --loading-width: 72px;
}

/* AI illness chart (5-page) */
.ai-illness-card {
  margin-top: 18px;
}

.ai-illness-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.ai-illness-filters .date-input input {
  width: 200px;
}

.illness-range-group {
  min-width: 200px;
}

.ai-illness-body {
  position: relative;
  padding: 8px 12px 16px;
  min-height: 360px;
}

.ai-illness-body canvas {
  width: 100%;
  height: 320px;
  max-height: 420px;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
}

.chart-empty.visible {
  opacity: 1;
}

/* klinika haqida qisqa meta satr */
.clinic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(209, 213, 219, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.clinic-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(80, 171, 147, 0.12);
  border: 1px solid rgba(80, 171, 147, 0.22);
  font-size: 12px;
  color: #1f6f60;
}

.clinic-meta-item .meta-label {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5b6b72;
}

.clinic-meta-item .meta-value {
  font-weight: 600;
  color: #0f172a;
}

/* metrikalar jadvali biroz kengroq ko'rinsin */
.metric-table-wrapper {
  margin-top: 6px;
  border: 1px solid rgba(209, 213, 219, 0.6);
  background: #f8fbfa;
}

.metric-table th:nth-child(2),
.metric-table td:nth-child(2) {
  width: 45%;
}

.metric-table th:nth-child(3),
.metric-table td:nth-child(3) {
  width: 45%;
}

.clinic-analytics-card .metric-table thead {
  background: linear-gradient(90deg, #e9faf5, #e8f4ff);
}

.clinic-analytics-card .metric-table tbody tr:hover {
  background: #f0fbf6;
}

.clinic-analytics-card .metric-table td:first-child {
  color: #64748b;
  font-weight: 600;
  width: 60px;
}

.metric-table tbody tr.clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}

.metric-table tbody tr.clickable:hover {
  background: #edf9f4;
}

.clinic-details-card .table-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clinic-details-body {
  position: relative;
}

.clinic-details-table {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
}

.clinic-details-card {
  background: linear-gradient(180deg, #f6fffb 0%, #ffffff 60%);
  border: 1px solid rgba(80, 171, 147, 0.22);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.12);
}

.clinic-details-card .table-card-header {
  align-items: center;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(
    90deg,
    rgba(80, 171, 147, 0.2),
    rgba(255, 255, 255, 0.95)
  );
  border: 1px solid rgba(80, 171, 147, 0.22);
}

.clinic-details-card .table-card-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
}

.clinic-details-card .table-card-header p {
  font-size: 13px;
  color: #5b6b72;
}

.clinic-details-table {
  border-radius: 18px;
  border: 1px solid rgba(209, 213, 219, 0.8);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.clinic-details-table .rating-table thead {
  background: linear-gradient(90deg, #e9faf5 0%, #e6f4ff 100%);
}

.clinic-details-table .rating-table th {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #485563;
}

.clinic-details-table .rating-table td {
  font-size: 13px;
  color: #0f172a;
}

.clinic-details-table .rating-table td:nth-child(4),
.clinic-details-table .rating-table td:nth-child(7),
.clinic-details-table .rating-table td:nth-child(8) {
  font-variant-numeric: tabular-nums;
}

.clinic-details-table .rating-table tbody tr:hover {
  background: rgba(80, 171, 147, 0.12);
}

.clinic-details-table .rating-table {
  table-layout: auto;
  min-width: 920px;
}

.clinic-details-table .rating-table .th-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.clinic-details-table .rating-table .th-label i {
  font-size: 14px;
  color: #6b7280;
}

.clinic-col-num {
  width: 60px;
}

.clinic-col-name,
.clinic-col-surname {
  min-width: 140px;
}

.clinic-col-phone {
  min-width: 170px;
}

.clinic-col-clinic {
  min-width: 170px;
}

.clinic-col-doctor {
  min-width: 200px;
}

.clinic-col-price {
  width: 140px;
  min-width: 140px;
}

.clinic-col-time {
  width: 180px;
}

.clinic-details-table .rating-table td:nth-child(4),
.clinic-details-table .rating-table td:nth-child(7),
.clinic-details-table .rating-table td:nth-child(8),
.clinic-details-table .rating-table th:nth-child(4),
.clinic-details-table .rating-table th:nth-child(7),
.clinic-details-table .rating-table th:nth-child(8) {
  text-align: right;
}

.clinic-details-table .rating-table td:nth-child(7),
.clinic-details-table .rating-table td:nth-child(8) {
  white-space: nowrap;
}

.clinic-time-main {
  display: block;
}

.clinic-time-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
}

.clinic-details-card .table-footnote {
  margin-top: 12px;
  font-size: 11px;
  color: #94a3b8;
}

/* ko'rsatkich ustunini biroz ajratamiz */
.metric-value-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(80, 171, 147, 0.14);
  border: 1px solid rgba(80, 171, 147, 0.3);
  font-size: 12px;
  font-weight: 600;
  color: #1f6f60;
  gap: 6px;
}

.metric-value-pill i {
  font-size: 14px;
}

@media (max-width: 800px) {
  .metric-table th,
  .metric-table td {
    padding: 6px 8px;
  }

  .metric-table th:nth-child(2),
  .metric-table td:nth-child(2),
  .metric-table th:nth-child(3),
  .metric-table td:nth-child(3) {
    width: auto;
  }

  .clinic-meta {
    flex-direction: column;
  }

  .clinic-analytics-card .table-card-header > div {
    max-width: 100%;
  }

  .overall-summary-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .overall-summary-grid {
    grid-template-columns: 1fr;
  }

  .clinic-filters {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==== 6-PAGE: KLIKLAR SONI ==== */

.clicks-page {
  margin-bottom: 24px;
}

.clicks-card {
  padding-bottom: 18px;
}

.clicks-daily-card {
  margin-bottom: 18px;
}

.clicks-daily-card .chart-card-body canvas {
  height: 260px !important;
}

.clicks-daily-card .chart-card-body,
.clicks-card .table-card-body {
  position: relative;
}

.section-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: rgba(248, 251, 250, 0.9);
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.section-loader.soft-loader {
  background:
    radial-gradient(circle at 20% 15%, rgba(80, 171, 147, 0.2), transparent 45%),
    linear-gradient(180deg, rgba(248, 251, 250, 0.92), rgba(240, 248, 245, 0.95));
  border: 1px solid rgba(80, 171, 147, 0.18);
  backdrop-filter: blur(2px);
}

.section-loader.show {
  opacity: 1;
  pointer-events: auto;
}

.loader-spinner {
  display: block;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  border-radius: 50%;
  border: 3px solid rgba(80, 171, 147, 0.25);
  border-top-color: #39917a;
  border-right-color: rgba(80, 171, 147, 0.65);
  transform-origin: center center;
  will-change: transform;
  animation: loader-spin 0.8s linear infinite;
}

.loader-text {
  font-size: 13px;
  color: #39917a;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pattern-kpi-value {
  display: inline-flex;
  align-items: center;
  min-height: 1.2em;
}

.pattern-kpi-value.is-loading {
  width: clamp(108px, 14vw, 160px);
  height: 28px;
  border-radius: 10px;
  color: transparent;
  background: linear-gradient(
    90deg,
    rgba(226, 232, 240, 0.75) 25%,
    rgba(248, 250, 252, 0.98) 50%,
    rgba(226, 232, 240, 0.75) 75%
  );
  background-size: 220% 100%;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
  animation: statShimmer 1.15s linear infinite;
}

@keyframes loader-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Filter panel: channel label + date-range + refresh */
.clicks-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.clicks-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.csv-btn {
  border: 1px solid rgba(80, 171, 147, 0.4);
  background: #ffffff;
  color: #39917a;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.csv-btn i {
  font-size: 16px;
}

.csv-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 145, 122, 0.55);
  box-shadow: 0 10px 22px rgba(57, 145, 122, 0.18);
}

.floating-back-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  border: 1px solid rgba(80, 171, 147, 0.45);
  background: #ffffff;
  color: #39917a;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(57, 145, 122, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.floating-back-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 145, 122, 0.6);
  box-shadow: 0 20px 42px rgba(57, 145, 122, 0.22);
}

.floating-back-btn i {
  font-size: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.csv-modal {
  width: min(420px, 92vw);
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
}

.csv-modal h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #0f172a;
}

.csv-modal p {
  margin: 0 0 14px;
  font-size: 13px;
  color: #6b7280;
}

.csv-range-shell {
  width: 100%;
  margin-bottom: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary,
.btn-primary {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-secondary {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

.btn-primary {
  background: linear-gradient(135deg, #50ab93, #39917a);
  color: #ffffff;
}

.btn-primary:hover {
  box-shadow: 0 10px 22px rgba(57, 145, 122, 0.2);
}

.clicks-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.clicks-filters label {
  color: #6b7280;
  font-weight: 500;
}

/* Channel badge ko'rinishi */
.pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(80, 171, 147, 0.12);
  color: #39917a;
  border: 1px solid rgba(80, 171, 147, 0.35);
}

/* Date-input design (From / To) */
.date-input-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: #f9fafb;
  min-width: 160px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease;
}

.date-input-shell:hover {
  border-color: rgba(80, 171, 147, 0.7);
  box-shadow: 0 0 0 1px rgba(80, 171, 147, 0.12);
  background: #ffffff;
}

.date-input-shell .date-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #111827;
  letter-spacing: 0.06em;
  width: 100%;
  cursor: pointer;
}

.date-input-shell i {
  font-size: 16px;
  color: #6b7280;
}

/* Refresh tugmasi */
.filter-refresh-btn {
  border: none;
  outline: none;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: radial-gradient(circle at 30% 0%, #8fc9b6 0, #50ab93 35%, #39917a 100%);
  color: #f8fafc;
  box-shadow: 0 14px 35px rgba(57, 145, 122, 0.45);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.filter-refresh-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 45px rgba(57, 145, 122, 0.6);
}

.filter-refresh-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 10px 25px rgba(57, 145, 122, 0.4);
}

.filter-refresh-btn i {
  display: inline-block;
  line-height: 1;
  transform-origin: center center;
  will-change: transform;
  font-size: 18px;
  transition: transform 0.2s ease;
}

.filter-refresh-btn.is-loading,
.filter-refresh-btn.is-spinning,
.chart-refresh-btn.is-spinning {
  pointer-events: none;
}

.filter-refresh-btn.is-loading i,
.filter-refresh-btn.is-spinning i,
.chart-refresh-btn.is-spinning i {
  animation: spinRefresh 0.8s linear infinite;
  transition: none;
}

@keyframes spinRefresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Table egna: rating-table dan foydalanamiz, faqat bitta ustun right-align */
.clicks-table td:nth-child(3),
.clicks-table th:nth-child(3) {
  text-align: right;
}

.clicks-table tbody tr {
  cursor: pointer;
}

/* satr ustiga borganda neon effekt */
.clicks-table tbody tr:hover {
  background: radial-gradient(
    circle at 0% 0%,
    rgba(80, 171, 147, 0.12),
    rgba(249, 250, 251, 1)
  );
  transform: translateY(-1px);
  box-shadow: 0 14px 35px rgba(57, 145, 122, 0.18);
}

.clicks-badge {
  display: inline-block;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  background: #e5e7eb;
  color: #374151;
}
.clicks-badge.clicks-multi {
  background: #d1fae5;
  color: #065f46;
}

.clicks-table-wrapper {
  max-height: 520px;
  overflow: auto;
}

.table-footnote {
  margin-top: 10px;
  font-size: 11px;
  color: #9ca3af;
}

@media (max-width: 900px) {
  .clicks-filters {
    align-items: stretch;
  }

  .filter-refresh-btn {
    align-self: flex-end;
  }

  .date-input-shell {
    min-width: 0;
    width: 100%;
  }
}

/* ==== 6-PAGE REDESIGN: CARD UI ==== */
.clicks-page-modern {
  display: grid;
  gap: 18px;
}

.clicks-main-card,
.clicks-detail-card-modern {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(91, 164, 142, 0.22);
  background:
    radial-gradient(circle at 0% 0%, rgba(133, 203, 177, 0.2), transparent 35%),
    linear-gradient(180deg, #fbfefd 0%, #f4fbf8 100%);
}

.clicks-main-body,
.clicks-detail-body-modern {
  position: relative;
}

.clicks-overview-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.clicks-overview-item {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.clicks-overview-item span {
  font-size: 12px;
  color: #64748b;
}

.clicks-overview-item strong {
  font-size: 19px;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.clicks-overview-wide {
  background: linear-gradient(120deg, rgba(80, 171, 147, 0.16), rgba(255, 255, 255, 0.88));
}

.clicks-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  min-height: 120px;
}

.clicks-button-card {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #ffffff;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}

.clicks-button-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-tone, rgba(80, 171, 147, 0.5));
  box-shadow: 0 18px 40px rgba(34, 92, 77, 0.14);
}

.clicks-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.clicks-rank {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.clicks-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.clicks-button-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.clicks-button-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.3;
  margin-bottom: 6px;
}

.clicks-card-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.clicks-button-total {
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
}

.clicks-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.clicks-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--card-tone, #50ab93);
  transition: width 0.6s ease;
}

.clicks-button-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 4px;
  transition: color 0.15s ease;
}

.clicks-button-card:hover .clicks-button-cta {
  color: var(--card-tone, #50ab93);
}

/* Tone colors */
.tone-mint  { --card-tone: #10b981; }
.tone-cyan  { --card-tone: #06b6d4; }
.tone-lime  { --card-tone: #84cc16; }
.tone-amber { --card-tone: #f59e0b; }
.tone-violet { --card-tone: #8b5cf6; }
.tone-slate { --card-tone: #64748b; }
.tone-rose  { --card-tone: #f43f5e; }
.tone-blue  { --card-tone: #3b82f6; }
.tone-indigo { --card-tone: #6366f1; }
.tone-pink  { --card-tone: #ec4899; }
.tone-teal  { --card-tone: #14b8a6; }

.tone-mint .clicks-icon { background: rgba(16, 185, 129, 0.12); color: #047857; }
.tone-cyan .clicks-icon { background: rgba(6, 182, 212, 0.12); color: #0e7490; }
.tone-lime .clicks-icon { background: rgba(132, 204, 22, 0.16); color: #4d7c0f; }
.tone-amber .clicks-icon { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.tone-violet .clicks-icon { background: rgba(139, 92, 246, 0.14); color: #6d28d9; }
.tone-slate .clicks-icon { background: rgba(148, 163, 184, 0.2); color: #475569; }
.tone-rose .clicks-icon { background: rgba(244, 63, 94, 0.12); color: #e11d48; }
.tone-blue .clicks-icon { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.tone-indigo .clicks-icon { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.tone-pink .clicks-icon { background: rgba(236, 72, 153, 0.12); color: #db2777; }
.tone-teal .clicks-icon { background: rgba(20, 184, 166, 0.12); color: #0f766e; }
.tone-orange { --card-tone: #f97316; }
.tone-orange .clicks-icon { background: rgba(249, 115, 22, 0.14); color: #c2410c; }

.clicks-warning-card {
  border: 1px dashed rgba(245, 158, 11, 0.55);
  border-radius: 16px;
  background: rgba(255, 251, 235, 0.8);
  padding: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #92400e;
}

.clicks-warning-card i {
  font-size: 20px;
}

.clicks-warning-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.clicks-warning-card p {
  margin: 0;
  font-size: 12px;
  color: #b45309;
}

.clicks-empty {
  display: none;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  background: rgba(248, 250, 252, 0.8);
}

.clicks-empty.visible {
  display: block;
}

.clicks-detail-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.clicks-detail-kpi {
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #ffffff;
  display: grid;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.clicks-detail-kpi span {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.clicks-detail-kpi strong {
  font-size: 26px;
  color: #0f172a;
  font-weight: 800;
}

.user-active-insights {
  display: none;
  margin-bottom: 16px;
  border-radius: 24px;
  background: #ffffff;
  padding: 0;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.user-active-insights.visible {
  display: block;
}

.user-active-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 20px 12px;
  margin-bottom: 0;
}

.user-active-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.user-active-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.user-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #4f46e5;
  background: rgba(238, 242, 255, 0.8);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.user-active-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 20px;
  margin-bottom: 0;
}

.user-active-card {
  border-radius: 16px;
  border: none;
  background: #f8fafc;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.user-active-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.user-active-card span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.user-active-card span i {
  color: #6366f1;
  font-size: 15px;
}

.user-active-card strong {
  font-size: 26px;
  line-height: 1.1;
  color: #0f172a;
  font-weight: 800;
}

.user-active-card.is-top strong {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.user-active-hourly {
  padding: 0 20px;
  margin-bottom: 12px;
}

.user-active-last10 {
  padding: 0 20px 20px;
}

.user-active-hourly h4,
.user-active-last10 h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.user-active-hourly-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.user-active-hour-pill {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 8px;
  display: grid;
  gap: 4px;
}

.user-active-hour-pill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
}

.user-active-hour-pill strong {
  color: #0f172a;
}

.user-active-hour-bar {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.user-active-hour-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #0ea5e9);
}

.user-active-last10-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.user-active-last10-head p {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}

.user-active-last10-table-wrap {
  margin-top: 6px;
  max-height: 260px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #ffffff;
}

.user-active-last10-table {
  width: 100%;
}

.user-active-last10-table thead {
  background: linear-gradient(90deg, #eff9ff, #f0fdfa);
}

.user-active-last10-table th,
.user-active-last10-table td {
  padding: 8px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.user-active-last10-table td:nth-child(2) {
  min-width: 180px;
  white-space: normal;
}

.user-active-last10-table td:nth-child(4),
.user-active-last10-table th:nth-child(4),
.user-active-last10-table td:nth-child(5),
.user-active-last10-table th:nth-child(5) {
  text-align: right;
}

.user-active-last10-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.08);
}

.clicks-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.clicks-detail-list.clinic-mode {
  grid-template-columns: 1fr;
  gap: 12px;
  max-height: 640px;
}

.clicks-user-card {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.clicks-user-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
}

.clicks-user-card.is-selected {
  border-color: rgba(15, 118, 110, 0.55);
  background: linear-gradient(150deg, rgba(236, 253, 245, 0.9), #ffffff);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.14);
}

.clicks-clinic-card {
  border-radius: 18px;
  border: 1px solid rgba(14, 116, 144, 0.24);
  background:
    radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.16), transparent 32%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.14), transparent 36%),
    linear-gradient(170deg, rgba(246, 252, 255, 0.96), #ffffff 62%);
  padding: 14px 14px;
}

.clicks-clinic-card .clicks-user-rank {
  font-size: 12px;
}

.clicks-clinic-card .clicks-user-name {
  font-size: 17px;
}

.clicks-clinic-card .clicks-user-badge {
  padding: 4px 10px;
  font-size: 12px;
  color: #155e75;
  background: rgba(103, 232, 249, 0.24);
}

.clicks-clinic-card .clicks-user-meta span {
  font-size: 13px;
}

.clicks-user-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clicks-user-rank {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.clicks-user-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
}

.clicks-user-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #0f766e;
  background: rgba(45, 212, 191, 0.16);
}

.clicks-user-meta {
  display: grid;
  gap: 6px;
}

.clicks-user-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
}

.clicks-user-meta i {
  color: #50ab93;
  font-size: 14px;
}

.user-clicks-panel {
  display: none;
  margin-top: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.user-clicks-panel.visible {
  display: block;
}

.doctor-patients-panel {
  display: none;
  margin-top: 12px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.doctor-patients-panel.visible {
  display: block;
}

.doctor-patients-head {
  background: linear-gradient(132deg, rgba(219, 234, 254, 0.8), rgba(255, 255, 255, 0.92));
}

.doctor-click-row {
  cursor: pointer;
  transition: background-color 0.14s ease;
}

.doctor-click-row:hover td {
  background: rgba(14, 165, 233, 0.08);
}

.doctor-click-row.is-selected td {
  background: linear-gradient(150deg, rgba(224, 242, 254, 0.92), #ffffff);
}

.doctor-patients-table th:nth-child(2),
.doctor-patients-table td:nth-child(2) {
  min-width: 170px;
}

.user-clicks-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(140deg, rgba(236, 253, 245, 0.8), rgba(255, 255, 255, 0.9));
}

.user-clicks-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.user-clicks-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.user-clicks-table-wrap {
  max-height: 300px;
  overflow: auto;
}

.user-clicks-table {
  width: 100%;
}

.user-clicks-table thead {
  background: #f8fafc;
}

.user-clicks-table th,
.user-clicks-table td {
  font-size: 12px;
  padding: 9px 12px;
  white-space: nowrap;
}

.user-clicks-table th:nth-child(2),
.user-clicks-table td:nth-child(2) {
  white-space: normal;
  min-width: 220px;
}

.user-clicks-table tbody tr:hover {
  background: rgba(15, 118, 110, 0.06);
}

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

  .clicks-detail-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .clicks-overview-row,
  .clicks-detail-kpis {
    grid-template-columns: 1fr;
  }

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

  .clicks-button-total {
    font-size: 24px;
  }

  .user-active-cards {
    grid-template-columns: 1fr;
  }

  .user-active-hourly-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

/* ==== 6-DETAIL AI SUB-MODULES ==== */
.clicks-hourly-card .chart-card-body canvas {
  height: 220px !important;
}

.clicks-users-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 184, 166, 0.24);
  background:
    radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.2), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.12), transparent 34%),
    linear-gradient(170deg, rgba(244, 255, 252, 0.95), #ffffff 58%);
}

.clicks-users-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  bottom: -95px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.18), transparent 68%);
  pointer-events: none;
}

.clicks-users-card .chart-card-header,
.clicks-users-card .chart-card-body {
  position: relative;
  z-index: 1;
}

.clicks-users-card .chart-card-body canvas {
  height: 220px !important;
}

.clicks-users-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 340px;
}

.clicks-users-stat {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(3px);
  padding: 8px 10px;
  display: grid;
  gap: 4px;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.08);
}

.clicks-users-stat span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #64748b;
}

.clicks-users-stat span i {
  color: #0d9488;
  font-size: 13px;
}

.clicks-users-stat strong {
  font-size: 18px;
  line-height: 1;
  color: #0f172a;
  font-weight: 800;
}

.clinic-top-filters-card {
  display: none;
  border: 1px solid rgba(125, 146, 175, 0.24);
  border-radius: 20px;
  padding: 12px 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.11), transparent 34%),
    linear-gradient(165deg, rgba(247, 252, 255, 0.95), rgba(255, 255, 255, 0.95));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.clinic-chart-filters {
  display: none;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.clinic-top-filters-card .clinic-chart-filters {
  display: flex;
}

.clinic-filter-pill {
  display: grid;
  gap: 5px;
  min-width: 220px;
}

.clinic-filter-pill label {
  font-size: 11px;
  font-weight: 700;
  color: #4c5f76;
  letter-spacing: 0.02em;
}

.clinic-filter-pill select {
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(125, 146, 175, 0.28);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 255, 0.96));
}

.clinic-date-shell {
  min-width: 240px;
}

.clinic-apply-btn {
  height: 40px;
  border: none;
  border-radius: 12px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(130deg, #0ea5e9, #2563eb);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.clinic-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.4);
}

.clicks-page.clinics-mode {
  gap: 20px;
}

.clicks-page.clinics-mode .clinic-top-filters-card {
  border-color: rgba(59, 130, 246, 0.26);
}

.clicks-page.clinics-mode .clicks-daily-card,
.clicks-page.clinics-mode .clicks-users-card,
.clicks-page.clinics-mode .clicks-detail-card-modern {
  border-radius: 26px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 35%),
    radial-gradient(circle at 100% 100%, rgba(14, 165, 233, 0.1), transparent 42%),
    linear-gradient(175deg, rgba(248, 252, 255, 0.96), #ffffff 62%);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.11);
}

.clicks-page.clinics-mode .clicks-detail-kpi {
  border-color: rgba(96, 165, 250, 0.28);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.92), rgba(241, 249, 255, 0.92));
}

.clicks-page.clinics-mode .user-clicks-head {
  background: linear-gradient(132deg, rgba(219, 234, 254, 0.8), rgba(255, 255, 255, 0.92));
}

/* ===== USER ACTIVE MODE — Premium Dashboard ===== */
.clicks-page.user-active-mode {
  gap: 22px;
}

.clicks-page.user-active-mode .clicks-daily-card,
.clicks-page.user-active-mode .clicks-users-card,
.clicks-page.user-active-mode .clicks-detail-card-modern {
  border-radius: 28px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.08), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(14, 165, 233, 0.06), transparent 50%),
    linear-gradient(175deg, #fefeff 0%, #f8fafc 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 20px 50px rgba(15, 23, 42, 0.08),
    0 4px 12px rgba(99, 102, 241, 0.04);
}

.clicks-page.user-active-mode .chart-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.clicks-page.user-active-mode .chart-subtitle {
  color: #64748b;
  font-size: 13px;
}

.clicks-page.user-active-mode .clicks-users-stat {
  border-color: rgba(99, 102, 241, 0.16);
  background: linear-gradient(165deg, #ffffff, rgba(238, 242, 255, 0.5));
  border-radius: 16px;
  padding: 10px 14px;
}

.clicks-page.user-active-mode .clicks-users-stat span {
  font-size: 11px;
}

.clicks-page.user-active-mode .clicks-users-stat span i {
  color: #6366f1;
}

.clicks-page.user-active-mode .clicks-users-stat strong {
  font-size: 22px;
  color: #1e1b4b;
}

.clicks-page.user-active-mode .clicks-detail-kpi {
  border: none;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(160deg, #ffffff, #f0f4ff);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
  position: relative;
  overflow: hidden;
}

.clicks-page.user-active-mode .clicks-detail-kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, #6366f1, #818cf8);
}

.clicks-page.user-active-mode .clicks-detail-kpi span {
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clicks-page.user-active-mode .clicks-detail-kpi strong {
  font-size: 28px;
  font-weight: 800;
  color: #1e1b4b;
}

.clicks-page.user-active-mode .clicks-search-shell {
  border-color: rgba(99, 102, 241, 0.2);
  background: #ffffff;
  border-radius: 16px;
}

.clicks-page.user-active-mode .clicks-search-shell:focus-within {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.clicks-page.user-active-mode .clicks-search-shell > i {
  color: #6366f1;
}

.clicks-page.user-active-mode #clicksSearchClear:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

/* --- Insights Panel --- */
.clicks-page.user-active-mode .user-active-insights {
  border: none;
  border-radius: 24px;
  background: #ffffff;
  padding: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 20px 50px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.clicks-page.user-active-mode .user-active-head {
  padding: 20px 22px 14px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
  margin-bottom: 0;
}

.clicks-page.user-active-mode .user-active-head h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.clicks-page.user-active-mode .user-active-head p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

.clicks-page.user-active-mode .user-active-chip {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  font-size: 12px;
  padding: 5px 12px;
}

.clicks-page.user-active-mode .user-active-cards {
  padding: 16px 22px;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clicks-page.user-active-mode .user-active-card {
  border: none;
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(165deg, #f8fafc, #eef2ff);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.clicks-page.user-active-mode .user-active-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.12);
}

.clicks-page.user-active-mode .user-active-card span {
  color: #64748b;
  font-size: 12px;
}

.clicks-page.user-active-mode .user-active-card span i {
  color: #6366f1;
  font-size: 15px;
}

.clicks-page.user-active-mode .user-active-card strong {
  font-size: 28px;
  color: #1e1b4b;
  font-weight: 800;
}

.clicks-page.user-active-mode .user-active-card.is-top {
  background: linear-gradient(160deg, #fefce8, #fef9c3);
  grid-column: span 1;
}

.clicks-page.user-active-mode .user-active-card.is-top span i {
  color: #d97706;
}

.clicks-page.user-active-mode .user-active-card.is-top strong {
  font-size: 15px;
  color: #92400e;
}

/* --- Hourly Section --- */
.clicks-page.user-active-mode .user-active-hourly {
  padding: 0 22px;
  margin-bottom: 0;
}

.clicks-page.user-active-mode .user-active-hourly h4,
.clicks-page.user-active-mode .user-active-last10 h4 {
  font-size: 15px;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 10px;
}

.clicks-page.user-active-mode .user-active-hourly-bars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.clicks-page.user-active-mode .user-active-hour-pill {
  border: none;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
  transition: background 0.15s ease;
}

.clicks-page.user-active-mode .user-active-hour-pill:hover {
  background: #eef2ff;
}

.clicks-page.user-active-mode .user-active-hour-pill-top {
  color: #64748b;
  font-size: 11px;
}

.clicks-page.user-active-mode .user-active-hour-pill strong {
  color: #1e1b4b;
  font-size: 16px;
  font-weight: 800;
}

.clicks-page.user-active-mode .user-active-hour-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(99, 102, 241, 0.1);
  margin-top: 6px;
}

.clicks-page.user-active-mode .user-active-hour-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  transition: width 0.4s ease;
}

/* --- Last 10 Hours Table --- */
.clicks-page.user-active-mode .user-active-last10 {
  padding: 0 22px 22px;
}

.clicks-page.user-active-mode .user-active-last10-head p {
  color: #64748b;
}

.clicks-page.user-active-mode .user-active-last10-table-wrap {
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.clicks-page.user-active-mode .user-active-last10-table thead {
  background: linear-gradient(90deg, #eef2ff, #f0f4ff);
}

.clicks-page.user-active-mode .user-active-last10-table th {
  color: #4338ca;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.clicks-page.user-active-mode .user-active-last10-table td {
  color: #1e293b;
  border-bottom-color: rgba(99, 102, 241, 0.08);
  font-size: 13px;
}

.clicks-page.user-active-mode .user-active-last10-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.06);
}

/* --- User Cards --- */
.clicks-page.user-active-mode .clicks-user-card.user-active-user-card {
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.04);
  transition: all 0.18s ease;
}

.clicks-page.user-active-mode .clicks-user-card.user-active-user-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.12);
  transform: translateY(-2px);
}

.clicks-page.user-active-mode .clicks-user-card.user-active-user-card.is-selected {
  border-color: rgba(99, 102, 241, 0.5);
  background: linear-gradient(160deg, #eef2ff, #f5f3ff);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.16);
}

.clicks-page.user-active-mode .clicks-user-card.user-active-user-card .clicks-user-badge {
  color: #4338ca;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 10px;
}

.clicks-page.user-active-mode .clicks-user-card.user-active-user-card .clicks-user-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e1b4b;
}

.clicks-page.user-active-mode .clicks-user-card.user-active-user-card .clicks-user-meta i {
  color: #6366f1;
}

.clicks-page.user-active-mode .user-clicks-head {
  background: linear-gradient(140deg, #eef2ff, #f5f3ff);
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

.clicks-page.user-active-mode .user-clicks-head h3 {
  color: #1e1b4b;
}

/* --- Pills in table --- */
.clicks-page.user-active-mode .ua-count-pill,
.clicks-page.user-active-mode .ua-time-pill,
.clicks-page.user-active-mode .ua-phone-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.clicks-page.user-active-mode .ua-count-pill {
  color: #4338ca;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.clicks-page.user-active-mode .ua-time-pill {
  color: #9a3412;
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
}

.clicks-page.user-active-mode .ua-phone-pill {
  color: #065f46;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.clicks-page.user-active-mode .ua-user-name {
  font-weight: 700;
  color: #1e1b4b;
  font-size: 14px;
}

.clicks-chart-modes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(248, 250, 252, 0.9);
  margin-right: 10px;
}

.clicks-chart-mode-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.clicks-chart-mode-btn.active {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}

.clicks-chart-mode-btn:hover {
  color: #0f172a;
}

.ai-filter-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.16), transparent 36%),
    radial-gradient(circle at 100% 100%, rgba(14, 165, 233, 0.14), transparent 40%),
    linear-gradient(130deg, rgba(241, 252, 250, 0.96), rgba(255, 255, 255, 0.96));
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.ai-filter-head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #0f172a;
}

.ai-filter-head p {
  margin: 5px 0 0;
  font-size: 12px;
  color: #64748b;
}

.ai-filter-buttons {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ai-filter-btn {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff, #f8fafc);
  color: #1e293b;
  padding: 10px 10px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  text-align: left;
  min-height: 106px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ai-filter-btn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-filter-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.ai-filter-chip {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 999px;
  color: #475569;
  background: rgba(148, 163, 184, 0.18);
}

.ai-filter-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.16);
}

.ai-filter-btn.active {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.6);
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.2);
}

.ai-filter-btn.active .ai-filter-chip {
  background: rgba(20, 184, 166, 0.2);
  color: #0f766e;
}

.ai-filter-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.ai-filter-desc {
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

.ai-filter-btn.tone-core .ai-filter-icon {
  background: rgba(56, 189, 248, 0.18);
  color: #0369a1;
}

.ai-filter-btn.tone-core.active {
  background: linear-gradient(160deg, rgba(224, 242, 254, 0.85), rgba(255, 255, 255, 0.96));
}

.ai-filter-btn.tone-voice .ai-filter-icon {
  background: rgba(45, 212, 191, 0.2);
  color: #0f766e;
}

.ai-filter-btn.tone-voice.active {
  background: linear-gradient(160deg, rgba(204, 251, 241, 0.9), rgba(255, 255, 255, 0.96));
}

.ai-filter-btn.tone-illness .ai-filter-icon {
  background: rgba(248, 113, 113, 0.16);
  color: #b91c1c;
}

.ai-filter-btn.tone-illness.active {
  background: linear-gradient(160deg, rgba(254, 226, 226, 0.86), rgba(255, 255, 255, 0.96));
}

.ai-filter-btn.tone-kb .ai-filter-icon {
  background: rgba(196, 181, 253, 0.2);
  color: #6d28d9;
}

.ai-filter-btn.tone-kb.active {
  background: linear-gradient(160deg, rgba(237, 233, 254, 0.9), rgba(255, 255, 255, 0.96));
}

.ai-filter-btn.tone-tests .ai-filter-icon {
  background: rgba(253, 224, 71, 0.22);
  color: #a16207;
}

.ai-filter-btn.tone-tests.active {
  background: linear-gradient(160deg, rgba(254, 243, 199, 0.9), rgba(255, 255, 255, 0.96));
}

.notification-facet-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.notification-facet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.notification-facet-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.notification-facet-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.notification-facet-summary {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.notification-facet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.notification-facet-btn {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
  padding: 12px;
  display: grid;
  gap: 8px;
  text-align: left;
  min-height: 126px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.notification-facet-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

.notification-facet-btn.active {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.14);
}

.notification-facet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-facet-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.notification-facet-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notification-facet-title {
  font-size: 15px;
  line-height: 1.2;
  color: #0f172a;
}

.notification-facet-desc {
  min-height: 28px;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

.notification-facet-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.notification-facet-btn.tone-core .notification-facet-icon {
  background: rgba(56, 189, 248, 0.16);
  color: #0369a1;
}

.notification-facet-btn.tone-core.active {
  background: linear-gradient(160deg, rgba(224, 242, 254, 0.88), rgba(255, 255, 255, 0.98));
}

.notification-facet-btn.tone-voice .notification-facet-icon {
  background: rgba(45, 212, 191, 0.18);
  color: #0f766e;
}

.notification-facet-btn.tone-voice.active {
  background: linear-gradient(160deg, rgba(204, 251, 241, 0.88), rgba(255, 255, 255, 0.98));
}

.notification-facet-btn.tone-illness .notification-facet-icon {
  background: rgba(248, 113, 113, 0.14);
  color: #b91c1c;
}

.notification-facet-btn.tone-illness.active {
  background: linear-gradient(160deg, rgba(254, 226, 226, 0.84), rgba(255, 255, 255, 0.98));
}

.notification-facet-btn.tone-kb .notification-facet-icon {
  background: rgba(196, 181, 253, 0.18);
  color: #6d28d9;
}

.notification-facet-btn.tone-kb.active {
  background: linear-gradient(160deg, rgba(237, 233, 254, 0.88), rgba(255, 255, 255, 0.98));
}

.notification-facet-btn.tone-tests .notification-facet-icon {
  background: rgba(253, 224, 71, 0.18);
  color: #a16207;
}

.notification-facet-btn.tone-tests.active {
  background: linear-gradient(160deg, rgba(254, 243, 199, 0.88), rgba(255, 255, 255, 0.98));
}

.clicks-user-note-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
}

.clicks-user-note-chip i {
  color: #0284c7;
}

.clicks-search-wrap {
  margin-bottom: 12px;
}

.clicks-search-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.clicks-search-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 12px;
  padding: 8px 10px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.clicks-search-shell:focus-within {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

.clicks-search-shell > i {
  font-size: 16px;
  color: #0f766e;
}

.clicks-search-shell input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #0f172a;
}

.clicks-search-shell input::placeholder {
  color: #94a3b8;
}

#clicksSearchClear {
  border: none;
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

#clicksSearchClear:hover {
  background: rgba(15, 118, 110, 0.16);
  color: #0f766e;
}

.clicks-detail-table-modern {
  margin-top: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  overflow: auto;
  background: #ffffff;
}

.clicks-users-table {
  width: 100%;
}

.clicks-users-table thead {
  background: #f8fafc;
}

.clicks-users-table th,
.clicks-users-table td {
  font-size: 12px;
  padding: 10px 12px;
  white-space: nowrap;
}

.clicks-users-table tbody tr:hover {
  background: rgba(15, 118, 110, 0.06);
}

.clicks-users-table th:nth-child(5),
.clicks-users-table td:nth-child(5) {
  text-align: center;
}

.clicks-users-table th:nth-child(6),
.clicks-users-table td:nth-child(6) {
  text-align: right;
}

.clicks-button-sub {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  font-size: 11px;
  font-weight: 600;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
  border-radius: 999px;
  padding: 2px 8px;
}

@media (max-width: 1180px) {
  .ai-filter-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notification-facet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clicks-users-stats {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .clicks-chart-modes {
    margin-right: 0;
  }

  .clicks-chart-mode-btn {
    padding: 5px 8px;
    font-size: 10px;
  }

  .clicks-users-stats {
    grid-template-columns: 1fr;
  }

  .clicks-users-stat strong {
    font-size: 16px;
  }

  .clinic-chart-filters {
    width: 100%;
  }

  .clinic-top-filters-card {
    padding: 10px;
  }

  .clinic-filter-pill {
    min-width: 0;
    width: 100%;
  }

  .clinic-date-shell {
    min-width: 0;
    width: 100%;
  }

  .clinic-apply-btn {
    width: 100%;
    justify-content: center;
  }

  .ai-filter-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-facet-head {
    flex-direction: column;
  }

  .notification-facet-grid {
    grid-template-columns: 1fr;
  }

  .ai-filter-btn {
    min-height: 96px;
    padding: 9px;
  }

  .clicks-search-shell input {
    font-size: 12px;
  }

  .clicks-users-table th,
  .clicks-users-table td {
    font-size: 11px;
    padding: 8px 10px;
  }
}

/* ===================================================================
   ADMIN PANEL STYLES — User Menu, Tables, Modals, Profile, Toast
   =================================================================== */

/* ---- User Menu Dropdown ---- */

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.user-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.25);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.user-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-trigger .ti-chevron-down {
  font-size: 14px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.user-dropdown.open ~ .user-menu-trigger .ti-chevron-down,
.user-dropdown.open + .ti-chevron-down {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  padding: 6px;
  z-index: 1000;
  display: none;
  animation: dropdownEnter 0.15s ease;
}

.user-dropdown.open {
  display: block;
}

@keyframes dropdownEnter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease;
}

.dropdown-item:hover {
  background: #f1f5f9;
}

.dropdown-item i {
  font-size: 16px;
  color: #64748b;
}

.dropdown-danger {
  color: #dc2626;
}

.dropdown-danger i {
  color: #dc2626;
}

.dropdown-danger:hover {
  background: #fef2f2;
}

.dropdown-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 4px 0;
}

/* ---- Admin Page Layout ---- */

.admin-main {
  padding: 0;
}

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

.admin-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.admin-header p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #64748b;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 14px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--sinoai-green), var(--sinoai-green-dark));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(80, 171, 147, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(80, 171, 147, 0.4);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  box-shadow: none;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ---- Admin Filters ---- */

.admin-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search-shell {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-search-shell:focus-within {
  border-color: var(--sinoai-green);
  box-shadow: 0 0 0 3px rgba(80, 171, 147, 0.15);
}

.admin-search-shell i {
  color: #94a3b8;
  font-size: 16px;
}

.admin-search-shell input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #0f172a;
}

.admin-select {
  height: 42px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  cursor: pointer;
  outline: none;
}

.admin-select:focus {
  border-color: var(--sinoai-green);
}

/* ---- Admin Card & Table ---- */

.admin-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.admin-table-wrap {
  overflow-x: auto;
}

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

.admin-table thead {
  background: linear-gradient(90deg, #f8faf9, #f0fdf7);
  border-bottom: 2px solid #e5e7eb;
}

.admin-table th {
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--sinoai-green-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
}

.admin-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.admin-table tbody tr {
  transition: background 0.12s ease;
}

.admin-table tbody tr:hover {
  background: #f8faf9;
}

/* User cell in table */
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.user-cell-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
}

.user-cell-phone {
  font-size: 11px;
  color: #94a3b8;
}

/* Badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}

.status-inactive {
  background: #fee2e2;
  color: #991b1b;
}

/* Action buttons */
.action-btns {
  display: flex;
  gap: 4px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.12s ease, color 0.12s ease;
}

.action-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.action-btn-danger:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* ---- Modal ---- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-card {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalEnter 0.2s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.12s ease;
}

.modal-close:hover {
  background: #e2e8f0;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---- Form Elements ---- */

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.label-hint {
  font-weight: 500;
  text-transform: none;
  color: #94a3b8;
}

.form-group input,
.form-group select {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 0 14px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--sinoai-green);
  box-shadow: 0 0 0 3px rgba(80, 171, 147, 0.15);
}

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

.form-error {
  font-size: 12px;
  color: #dc2626;
  min-height: 18px;
  margin-bottom: 4px;
}

/* Permissions grid */
.permissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.perm-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.perm-checkbox:hover {
  background: #f0fdf7;
  border-color: var(--sinoai-green);
}

.perm-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sinoai-green);
}

/* ---- Profile Page ---- */

.profile-main {
  max-width: 780px;
  margin: 0 auto;
}

.profile-grid {
  display: grid;
  gap: 20px;
}

.profile-card,
.password-card {
  padding: 28px;
}

.password-card h3 {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-card h3 i {
  color: var(--sinoai-green);
}

.profile-header-block {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.profile-big-avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sinoai-green-soft), #d1fae5);
  color: var(--sinoai-green-dark);
  flex-shrink: 0;
}

.profile-header-info h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.profile-header-info p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.profile-header-info .role-badge {
  margin-top: 6px;
}

/* ---- Toast ---- */

.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  z-index: 3000;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  background: #065f46;
  color: #ffffff;
}

.toast-error {
  background: #991b1b;
  color: #ffffff;
}

.toast-info {
  background: #1e40af;
  color: #ffffff;
}

.admin-toast i {
  font-size: 18px;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
  }

  .admin-filters {
    flex-direction: column;
  }

  .admin-search-shell {
    width: 100%;
  }

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

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

  .user-menu-trigger .user-name {
    display: none;
  }

  .profile-header-block {
    flex-direction: column;
    text-align: center;
  }
}

/* ==== Doctor Recommendation — 3 Panel Layout ==== */
.drr-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  min-height: 500px;
  background: var(--bg-primary, #fff);
  border-radius: 16px;
  border: 1px solid var(--border-light, #e2e8f0);
  overflow: hidden;
}
.drr-left {
  border-right: 1px solid var(--border-light, #e2e8f0);
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary, #f8fafc);
}
.drr-left-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}
.drr-left-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.drr-left-count {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  background: var(--bg-primary, #fff);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.drr-doctors-list {
  flex: 1;
  overflow-y: auto;
  max-height: 540px;
  padding: 8px;
}
/* Doctor card */
.drr-doc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 4px;
  position: relative;
}
.drr-doc-card:hover {
  background: var(--bg-primary, #fff);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.drr-doc-card.active {
  background: var(--bg-primary, #fff);
  box-shadow: 0 2px 8px rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25);
}
.drr-doc-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-light, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  flex-shrink: 0;
}
.drr-doc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.drr-doc-body {
  flex: 1;
  min-width: 0;
}
.drr-doc-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drr-doc-clinic {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.drr-doc-bar-wrap {
  height: 3px;
  background: var(--border-light, #e2e8f0);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.drr-doc-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.drr-doc-nums {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.drr-doc-clicks {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  line-height: 1;
}
.drr-doc-users-count {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  display: flex;
  align-items: center;
  gap: 3px;
}
/* Right side */
.drr-right {
  display: flex;
  flex-direction: column;
}
.drr-users-panel {
  flex: 1;
  overflow: auto;
  min-height: 240px;
}
.drr-panel-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  color: var(--text-secondary, #94a3b8);
  text-align: center;
  gap: 8px;
}
.drr-panel-placeholder i {
  font-size: 40px;
  opacity: 0.3;
}
.drr-panel-placeholder p {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  color: var(--text-primary, #475569);
}
.drr-panel-placeholder span {
  font-size: 12px;
}
/* Users header */
.drr-users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  background: linear-gradient(135deg, rgba(59,130,246,0.03), rgba(16,185,129,0.03));
}
.drr-users-doc-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0 0 2px;
}
.drr-users-doc-info span {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
}
.drr-users-summary {
  display: flex;
  gap: 16px;
}
.drr-sum-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 16px;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
}
.drr-sum-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  line-height: 1.1;
}
.drr-sum-label {
  font-size: 10px;
  color: var(--text-secondary, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
/* Users table */
.drr-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.drr-users-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
.drr-users-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary, #94a3b8);
  background: var(--bg-secondary, #f8fafc);
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}
.drr-users-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
  color: var(--text-primary, #334155);
}
.drr-user-row {
  cursor: pointer;
  transition: background 0.12s;
}
.drr-user-row:hover {
  background: rgba(59,130,246,0.04);
}
.drr-user-row.active {
  background: rgba(59,130,246,0.08);
}
.drr-user-row.active td {
  border-bottom-color: rgba(59,130,246,0.12);
}
.drr-phone {
  color: var(--accent, #3b82f6);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
}
.drr-click-badge {
  background: rgba(59,130,246,0.1);
  color: var(--accent, #3b82f6);
  font-weight: 700;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
}
.drr-date {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
}
/* Timeline panel */
.drr-timeline-panel {
  border-top: 1px solid var(--border-light, #e2e8f0);
  max-height: 220px;
  overflow-y: auto;
}
.drr-timeline-header {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
  position: sticky;
  top: 0;
  background: var(--bg-secondary, #f8fafc);
  z-index: 1;
}
.drr-timeline-header h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.drr-timeline-list {
  padding: 8px 24px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.drr-tl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  transition: all 0.12s;
}
.drr-tl-item:hover {
  border-color: rgba(59,130,246,0.3);
  box-shadow: 0 1px 4px rgba(59,130,246,0.08);
}
.drr-tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #3b82f6);
  flex-shrink: 0;
}
.drr-tl-content {
  display: flex;
  gap: 8px;
  align-items: center;
}
.drr-tl-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary, #334155);
}
.drr-tl-time {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
@media (max-width: 900px) {
  .drr-layout {
    grid-template-columns: 1fr;
  }
  .drr-left {
    border-right: none;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
  }
  .drr-doctors-list {
    max-height: 250px;
  }
}
