/* ==========================================================================
   LumaBoard dashboard — styles
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #F5F7FC;
  --card: #FFFFFF;
  --card-border: #E2E6EF;
  --divider: #E8ECF3;

  --primary: #6557E8;
  --primary-strong: #6254E8;
  --primary-deep: #6759E5;
  --primary-tint: #F0EEFF;
  --bar-prev: #DDD9FF;

  --sidebar-bg: #17162F;
  --sidebar-text: #F9FAFF;
  --sidebar-muted: #B7BCDC;
  --sidebar-label: #8D91BD;

  --text: #071A35;
  --text-2: #7783A3;
  --text-3: #9AA3BD;

  --green: #00A978;
  --coral: #FA8589;
  --coral-2: #F78389;

  --shadow-sm: 0 1px 2px rgba(23, 30, 70, 0.05);
  --shadow: 0 10px 26px rgba(23, 30, 70, 0.06);
  --radius: 18px;

  --font: "Inter", "Plus Jakarta Sans", "Manrope", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 228px;
  display: flex;
  flex-direction: column;
  padding: 28px 22px 24px;
  color: #fff;
  background:
    radial-gradient(130% 80% at 105% 108%, rgba(96, 86, 205, 0.6) 0%, rgba(23, 22, 47, 0) 62%),
    linear-gradient(180deg, #17162F 0%, #17162F 100%);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  background: linear-gradient(135deg, #7565F2 0%, #8A72F5 100%);
  box-shadow: 0 6px 18px rgba(117, 101, 242, 0.55);
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
}

.nav-group {
  margin-bottom: 26px;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--sidebar-label);
  padding-left: 12px;
  margin-bottom: 12px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--sidebar-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  background: var(--primary-strong);
  color: #fff;
  box-shadow: 0 8px 18px rgba(98, 84, 232, 0.35);
}

.upgrade-card {
  margin-top: auto;
  border-radius: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(183, 188, 220, 0.14);
}

.upgrade-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.upgrade-text {
  font-size: 12px;
  line-height: 1.55;
  color: var(--sidebar-muted);
  margin-bottom: 14px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  transition: filter 0.15s ease, transform 0.05s ease;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(1px);
}

.btn-upgrade {
  width: 100%;
  background: var(--primary-strong);
  color: #fff;
  padding: 12px 16px;
  box-shadow: 0 8px 18px rgba(98, 84, 232, 0.35);
}

.btn-campaign {
  background: #fff;
  color: var(--primary);
  padding: 11px 18px;
  align-self: flex-start;
}

/* ==========================================================================
   Main layout
   ========================================================================== */

.main {
  margin-left: 228px;
  padding: 30px 40px 34px 42px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
}

.topbar h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: var(--text);
}

.topbar .subtitle {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 7px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 236px;
  height: 46px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #DDE2EC;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.search .icon {
  width: 18px;
  height: 18px;
  color: #929BB8;
  flex-shrink: 0;
}

.search input {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}

.search input::placeholder {
  color: #929BB8;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-2) 100%);
}

/* ==========================================================================
   KPI cards
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.kpi-card {
  position: relative;
  height: 155px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.kpi-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  padding-right: 48px;
}

.kpi-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary-tint);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.kpi-icon .icon {
  width: 20px;
  height: 20px;
}

.kpi-glyph {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.kpi-value {
  display: block;
  margin-top: 16px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  font-size: 12px;
  font-weight: 600;
}

.kpi-trend.up {
  color: var(--green);
}

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

/* ==========================================================================
   Panels
   ========================================================================== */

.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-head h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}

.panel-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 5px;
}

.view-all {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding-top: 2px;
}

.view-all:hover {
  text-decoration: underline;
}

/* Middle row */

.middle-grid {
  display: grid;
  grid-template-columns: 2.05fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.revenue-panel {
  height: 368px;
  display: flex;
  flex-direction: column;
}

.orders-panel {
  height: 368px;
}

.chart {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Dropdown */

.dropdown {
  position: relative;
}

.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #DEE3EE;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}

.dropdown-btn .icon {
  width: 14px;
  height: 14px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 150px;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: none;
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--text-2);
  border-radius: 7px;
  cursor: pointer;
}

.dropdown-menu li:hover {
  background: #F3F5FA;
}

.dropdown-menu li.selected {
  color: var(--primary);
  font-weight: 600;
}

/* Recent orders */

.orders {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.order {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}

.order + .order {
  border-top: 1px solid var(--divider);
}

.order-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.av-blue   { background: #6078E8; }
.av-orange { background: #FA9660; }
.av-teal   { background: #55BCA5; }
.av-pink   { background: #E66F9E; }

.order-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.order-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.order-meta {
  font-size: 11px;
  color: var(--text-3);
}

.order-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Bottom row
   ========================================================================== */

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px;
}

.target-panel {
  min-height: 157px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.target-info {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.target-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.target-value {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.target-status {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
}

.donut {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
}

.donut svg {
  display: block;
  width: 100%;
  height: 100%;
}

.campaign-card {
  min-height: 157px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(120deg, #6154E8 0%, #886BE8 100%);
  box-shadow: 0 14px 30px rgba(98, 84, 232, 0.28);
}

.campaign-card h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.campaign-card p {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  margin: 9px 0 15px;
  max-width: 370px;
}
