:root {
  --bg-main: #f5f8fc;
  --bg-content: #f8fbff;
  --bg-card: #ffffff;

  --sidebar-start: #020b26;
  --sidebar-mid: #031b46;
  --sidebar-end: #021536;

  --primary-blue: #0d6efd;
  --primary-blue-dark: #0f4db8;
  --cyan: #22d3ee;
  --teal: #14b8a6;

  --text-main: #071436;
  --text-secondary: #43506b;
  --text-muted: #64748b;

  --green: #16a34a;
  --red: #ef4444;
  --orange: #f59e0b;

  --border-soft: #e2e8f0;

  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.06);
  --radius-shell: 28px;
  --radius-card: 22px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(13, 110, 253, 0.12), transparent 36%),
    var(--bg-main);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text-main);
  overflow-x: auto;
}

/* MAIN SHELL */

.clientia-shell {
  width: min(1480px, calc(100vw - 48px));
  min-width: 1180px;
  height: calc(100vh - 48px);
  min-height: 820px;
  margin: 24px auto;
  display: grid;
  grid-template-columns: 290px 1fr;
  background: var(--bg-content);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* SIDEBAR */

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 22px;
  background:
    linear-gradient(160deg, var(--sidebar-start) 0%, var(--sidebar-mid) 48%, var(--sidebar-end) 100%);
  color: #ffffff;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  left: -125px;
  top: -120px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.23), transparent 70%);
  pointer-events: none;
}

.sidebar::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -130px;
  bottom: 90px;
  background: radial-gradient(circle, rgba(13, 110, 253, 0.28), transparent 70%);
  pointer-events: none;
}

.sidebar-top,
.sidebar-bottom-card {
  position: relative;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 36px;
  padding-left: 4px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background:
    linear-gradient(145deg, #0d6efd 0%, #22d3ee 100%);
  color: #ffffff;
  font-size: 25px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.22);
}

.brand-text {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #ffffff;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.nav-item {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 0;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: rgba(226, 232, 240, 0.84);
  background: transparent;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-item i {
  font-size: 18px;
  line-height: 1;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.nav-item.active {
  color: #ffffff;
  background:
    linear-gradient(135deg, var(--primary-blue), #2489ff);
  box-shadow: 0 14px 24px rgba(13, 110, 253, 0.26);
}

.sidebar-bottom-card {
  padding: 21px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(13, 48, 97, 0.78), rgba(3, 27, 70, 0.92));
  border: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 40px rgba(0, 0, 0, 0.18);
}

.bottom-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 15px;
  background: rgba(34, 211, 238, 0.13);
  color: var(--cyan);
  font-size: 20px;
}

.sidebar-bottom-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.sidebar-bottom-card p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

/* CONTENT */

.dashboard-content {
  padding: 32px;
  background:
    linear-gradient(180deg, #f8fbff 0%, #f5f8fc 100%);
  overflow-y: auto;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--primary-blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-header h1 {
  margin: 0;
  color: var(--text-main);
  font-size: 31px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dashboard-header p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notification-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-soft);
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 19px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.notification-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.notification-dot {
  position: absolute;
  top: 13px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--red);
  border: 2px solid #ffffff;
}

.admin-profile {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 12px 6px 7px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  color: var(--text-main);
  font-weight: 700;
}

.admin-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(145deg, var(--primary-blue), var(--cyan));
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

/* KPI */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.kpi-card {
  min-height: 148px;
  padding: 22px;
  border-radius: var(--radius-card);
  background: var(--bg-card);
  border: 1px solid rgba(226, 232, 240, 0.78);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09);
  border-color: rgba(13, 110, 253, 0.18);
}

.kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.kpi-header p {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.kpi-header h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 21px;
}

.icon-blue {
  background: rgba(13, 110, 253, 0.11);
  color: var(--primary-blue);
}

.icon-green {
  background: rgba(22, 163, 74, 0.12);
  color: var(--green);
}

.icon-purple {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.icon-cyan {
  background: rgba(34, 211, 238, 0.16);
  color: #0891b2;
}

.kpi-trend {
  margin-top: 21px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  background: rgba(22, 163, 74, 0.09);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 700;
}

/* CARDS */

.dashboard-card {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--bg-card);
  border: 1px solid rgba(226, 232, 240, 0.78);
  box-shadow: var(--shadow-card);
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.card-title-row h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-title-row p {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

.card-title-row.compact {
  margin-bottom: 12px;
}

.card-title-row.simple {
  margin-bottom: 20px;
}

/* CHARTS */

.charts-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card {
  min-height: 360px;
}

.large-chart {
  min-width: 0;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 13px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.legend-dot,
.status-dot {
  display: inline-block;
  border-radius: 999px;
}

.legend-dot {
  width: 9px;
  height: 9px;
}

.legend-dot.blue {
  background: var(--primary-blue);
}

.legend-dot.cyan {
  background: var(--cyan);
}

.period-select {
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.line-chart-wrap {
  position: relative;
  height: 268px;
}

.doughnut-wrap {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 8px auto 20px;
}

.doughnut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.doughnut-center strong {
  color: var(--text-main);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.doughnut-center span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.receivable-list {
  display: grid;
  gap: 12px;
}

.receivable-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.75);
}

.receivable-item span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 700;
}

.receivable-item strong {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
}

.status-dot {
  width: 9px;
  height: 9px;
}

.status-dot.red {
  background: var(--red);
}

.status-dot.orange {
  background: var(--orange);
}

.status-dot.green {
  background: var(--green);
}

/* BOTTOM */

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.clients-list {
  display: grid;
  gap: 14px;
}

.client-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border-radius: 17px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.75);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.client-row:hover {
  transform: translateX(3px);
  background: #ffffff;
  border-color: rgba(13, 110, 253, 0.18);
}

.client-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.avatar-one {
  background: linear-gradient(145deg, #0d6efd, #22d3ee);
}

.avatar-two {
  background: linear-gradient(145deg, #0f4db8, #14b8a6);
}

.avatar-three {
  background: linear-gradient(145deg, #7c3aed, #0d6efd);
}

.client-info {
  min-width: 0;
}

.client-info strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-info span {
  display: block;
  color: var(--text-muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.active {
  color: var(--green);
  background: rgba(22, 163, 74, 0.1);
}

.status-pill.pending {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

.see-all-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 19px;
  color: var(--primary-blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.see-all-link:hover {
  color: var(--primary-blue-dark);
}

.services-list {
  display: grid;
  gap: 18px;
}

.service-item {
  display: grid;
  gap: 8px;
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.service-top span {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

.service-top strong {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
}

.service-bar {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.service-fill {
  height: 100%;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--primary-blue), var(--cyan));
  box-shadow: 0 8px 16px rgba(13, 110, 253, 0.18);
}

.fill-1 {
  width: 100%;
}

.fill-2 {
  width: 77%;
}

.fill-3 {
  width: 60%;
}

.fill-4 {
  width: 44%;
}

.fill-5 {
  width: 34%;
}

/* SCROLLBAR */

.dashboard-content::-webkit-scrollbar {
  width: 10px;
}

.dashboard-content::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-content::-webkit-scrollbar-thumb {
  background: #d7dee9;
  border-radius: 999px;
  border: 3px solid var(--bg-content);
}

/* DESKTOP SAFETY */

@media (max-width: 1250px) {
  .clientia-shell {
    width: 1180px;
    margin-left: 24px;
    margin-right: 24px;
  }
}