/* ============================================
   LowTrack - Main Stylesheet
   Design: Clean, Monochromatic, Editorial
   ============================================ */

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

:root {
  --color-bg: #f5f7fb;
  --color-card: #ffffff;
  --color-card-bg: #ffffff;
  --color-bg-hover: rgba(0, 0, 0, 0.04);
  --color-text: #0c1a3a;
  --color-text-light: #5a6a8a;
  --color-border: #dde3ef;
  --color-primary: #1a56db;
  --color-primary-hover: #1648b8;
  --color-primary-light: #eaf0ff;
  --color-sidebar: #ffffff;
  --color-sidebar-hover: #f0f4fa;
  --color-sidebar-text: #5a6a8a;
  --color-sidebar-active: #0c1a3a;
  --color-accent: #2563eb;
  --color-success: #1A6DFF;
  --color-danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(12, 26, 58, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(12, 26, 58, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(12, 26, 58, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: all 0.15s ease;
}

[data-theme="dark"] {
  --color-bg: #060f1f;
  --color-card: #0c1a3a;
  --color-card-bg: #0c1a3a;
  --color-bg-hover: rgba(255, 255, 255, 0.06);
  --color-text: #e8e8e8;
  --color-text-light: #8899b8;
  --color-border: #1a2d52;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-light: rgba(59, 130, 246, 0.15);
  --color-sidebar: #040b18;
  --color-sidebar-hover: #0c1a3a;
  --color-sidebar-text: #6b7fa8;
  --color-sidebar-active: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .btn-google {
  background: #3b82f6;
}

[data-theme="dark"] .kpi-change.positive {
  background: rgba(22, 163, 74, 0.15);
}

[data-theme="dark"] .kpi-change.negative {
  background: rgba(220, 38, 38, 0.15);
}

[data-theme="dark"] .alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .alert-success {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .alert-danger {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .form-input {
  background: #0a1628;
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

body {
  font-family:
    "DM Sans",
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-text);
  text-decoration: none;
}
a:hover {
  color: var(--color-text);
  opacity: 0.7;
}

::selection {
  background: var(--color-primary);
  color: #fff;
}

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

/* ─── Sidebar ─── */
.sidebar {
  width: 240px;
  background: var(--color-sidebar);
  border-right: 1px solid var(--color-border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.2s ease;
}

/* Collapsed sidebar */
.sidebar.collapsed {
  width: 60px;
}
.sidebar.collapsed .sidebar-logo img#sidebar-logo {
  display: none !important;
}
.sidebar.collapsed .sidebar-logo img.sidebar-icon {
  display: block !important;
  width: 28px;
  height: 28px;
}
.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding: 16px 0;
}
.sidebar.collapsed .sb-theme-toggle {
  display: none !important;
}
.sidebar.collapsed .sb-collapse-btn svg {
  transform: rotate(180deg);
}

/* Collapsed nav: show only icons */
.sidebar.collapsed .sidebar-nav {
  padding: 8px 0;
}
.sidebar.collapsed .sidebar-dropdown-toggle {
  display: none;
}
.sidebar.collapsed .sidebar-submenu {
  display: block !important;
}
.sidebar.collapsed .sidebar-sublink-btn {
  display: none;
}

.sidebar.collapsed .sidebar-link,
.sidebar.collapsed .sidebar-sublink,
.sidebar.collapsed .sidebar-sublink-btn {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  gap: 0 !important;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-link > *:not(svg),
.sidebar.collapsed .sidebar-sublink > *:not(svg),
.sidebar.collapsed .sidebar-sublink-btn > *:not(svg) {
  display: none !important;
}

.sidebar.collapsed .sidebar-link svg,
.sidebar.collapsed .sidebar-sublink svg,
.sidebar.collapsed .sidebar-sublink-btn svg {
  color: var(--color-sidebar-text) !important;
  opacity: 1 !important;
}

.sidebar.collapsed .sidebar-link,
.sidebar.collapsed .sidebar-sublink {
  justify-content: center;
  padding: 10px 0;
  min-height: 36px;
}
.sidebar.collapsed .sidebar-badge,
.sidebar.collapsed .dash-page-chevron,
.sidebar.collapsed .sidebar-chevron,
.sidebar.collapsed .dash-name {
  display: none !important;
}
.sidebar.collapsed .sidebar-section {
  padding: 0;
}

/* Collapsed bottom */
.sidebar.collapsed .sidebar-bottom-v2 {
  align-items: center;
  padding: 8px 0 12px;
}
.sidebar.collapsed .sidebar-bottom-v2 .sb-plan-card {
  display: none;
}
.sidebar.collapsed .sidebar-bottom-v2 .sb-user-meta {
  display: none;
}
.sidebar.collapsed .sidebar-bottom-v2 .sb-user-row {
  justify-content: center;
  gap: 6px;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  width: 100%;
}
.sidebar.collapsed .sidebar-bottom-v2 .sb-action-icon {
  display: none;
}
.sidebar.collapsed .sidebar-bottom-v2 .sb-avatar-wrap img {
  width: 32px;
  height: 32px;
}
.sidebar.collapsed .sidebar-bottom-v2 .sb-theme-collapsed {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 4px 0 8px;
}
.sidebar.collapsed .sidebar-bottom-v2 .sb-theme-collapsed button {
  width: 30px;
  height: 30px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Mobile close button */
.sb-mobile-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-bg-hover);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  z-index: 102;
  transition: 0.15s;
}
.sb-mobile-close:hover {
  background: var(--color-danger);
  color: #fff;
}

.sb-collapse-btn {
  position: absolute;
  top: 28px;
  right: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-card-bg, #fff);
  border: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: 0.2s;
  z-index: 101;
}
.sb-collapse-btn svg {
  transition: transform 0.2s;
}
.sb-collapse-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

.layout.sidebar-collapsed .content {
  margin-left: 60px;
}

.sidebar-logo {
  padding: 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-logo h1 {
  color: var(--color-sidebar-active);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: -0.3px;
}

.sidebar-logo h1 span {
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--color-sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-link:hover {
  background: var(--color-sidebar-hover);
  color: var(--color-sidebar-active);
  opacity: 1;
}

.sidebar-link.active {
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-sidebar-active);
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link.active svg {
  opacity: 1;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ─── Dashboard submenu items ─── */
.sidebar-sublink-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sidebar-sublink-wrap .sidebar-sublink {
  flex: 1;
  min-width: 0;
}

.sidebar-sublink .dash-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.dash-menu-btn {
  background: none;
  border: none;
  color: var(--color-sidebar-text);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 14px;
  border-radius: 4px;
  opacity: 0;
  transition: var(--transition);
  position: absolute;
  right: 4px;
}

.sidebar-sublink-wrap:hover .dash-menu-btn {
  opacity: 1;
}

.dash-menu-btn:hover {
  background: var(--color-sidebar-hover);
  opacity: 1;
}

.dash-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  flex-direction: column;
  min-width: 120px;
}

.dash-menu button {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  color: var(--color-text);
  transition: var(--transition);
}

.dash-menu button:hover {
  background: var(--color-bg);
}

.sidebar-add-dash {
  opacity: 0.6;
  transition: var(--transition);
}

.sidebar-add-dash:hover {
  opacity: 1 !important;
}

/* ─── Sidebar Bottom V2 ─── */
.sidebar-bottom-v2 {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 10px;
}

/* Plan Card */
.sb-plan-card {
  background: var(--color-sidebar-hover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sb-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sb-plan-days-label {
  font-size: 12px;
  color: var(--color-sidebar-text);
  opacity: 0.7;
  white-space: nowrap;
}

.sb-plan-icon {
  display: flex;
  align-items: center;
  color: var(--color-primary);
}

.sb-plan-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.3px;
}

.sb-plan-days {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sb-plan-days-text {
  font-size: 12px;
  color: var(--color-sidebar-text);
}

.sb-plan-days-bar {
  height: 5px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.sb-plan-days-fill {
  height: 100%;
  background: linear-gradient(90deg, #1a6dff, #3b82f6);
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 3px;
}

.sb-plan-usage {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-sidebar-text);
}

.sb-plan-usage-sep {
  opacity: 0.4;
}

.sb-plan-actions {
  display: flex;
  gap: 8px;
}

.sb-plan-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.sb-plan-btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.sb-plan-btn-primary:hover {
  opacity: 0.9;
  filter: brightness(1.1);
}

.sb-plan-btn-secondary {
  background: var(--color-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.sb-plan-btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* User row */
.sb-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
}

.sb-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.sb-avatar-wrap img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.sb-user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-sidebar-active);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sb-user-name:hover {
  color: var(--color-primary);
}

.sb-user-role {
  font-size: 11px;
  color: var(--color-sidebar-text);
}

.sb-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--color-sidebar-text);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

.sb-action-icon:hover {
  background: var(--color-sidebar-hover);
  color: var(--color-sidebar-active);
}

.sb-action-logout:hover {
  color: var(--color-danger);
  background: rgba(220, 38, 38, 0.08);
}

/* ─── Main Content ─── */
.content {
  flex: 1;
  margin-left: 240px;
  padding: 32px;
  max-width: 1400px;
  transition: margin-left 0.2s ease;
}

/* ─── Page Top ─── */
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

/* ─── Dashboard Top Bar ─── */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  gap: 24px;
}

.prize-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 280px;
}

.prize-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.prize-label {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 14px;
}

.prize-values {
  color: var(--color-text);
  font-weight: 600;
  font-size: 14px;
}

.prize-track {
  width: 100%;
  height: 6px;
  background: var(--color-border);
  border-radius: 50px;
  overflow: hidden;
}

.prize-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #10b981);
  border-radius: 50px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 4px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
}

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

/* ─── KPI Cards ─── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.kpi-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
}

.kpi-label {
  font-size: 11px;
  color: var(--color-text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
}

.kpi-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 50px;
}

.kpi-change.positive {
  color: var(--color-success);
   background: #eef4ff;
}

.kpi-change.negative {
  color: var(--color-danger);
  background: #fef2f2;
}

/* ─── Card ─── */
.card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.card-top {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.card-body {
  padding: 24px;
}

/* ─── Table ─── */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text);
}

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

.table tr:hover td {
  background: var(--color-bg);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--color-primary-hover);
  opacity: 1;
}

.btn-secondary {
  background: var(--color-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg);
  opacity: 1;
}

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

.btn-danger:hover {
  opacity: 0.8;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ─── Tabs ─── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  text-decoration: none;
}

.tab:hover {
  color: var(--color-text);
  opacity: 1;
}

.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* ─── Badge/Status ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.badge-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.badge-paused {
  background: var(--color-bg);
  color: var(--color-text-light);
  border-color: var(--color-border);
}

.badge-error {
  background: var(--color-bg);
  color: var(--color-text-light);
  border-color: var(--color-border);
}

/* ─── Forms ─── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-card);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-light);
}

select.form-input {
  cursor: pointer;
}

/* ─── Code Block ─── */
.code-block {
  background: var(--color-sidebar);
  color: #d4d4d4;
  padding: 20px;
  border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  position: relative;
}

.code-block .btn-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #a3a3a3;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.code-block .btn-copy:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ─── Login ─── */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
}

.login-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 48px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  border: 1px solid var(--color-border);
}

.login-card h1 {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.login-card h1 span {
  font-weight: 700;
}

.login-card p {
  color: var(--color-text-light);
  font-size: 14px;
  margin-bottom: 32px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-google:hover {
  opacity: 0.9;
  color: #fff;
}

.btn-google img {
  width: 18px;
  height: 18px;
}

/* ─── Plans Grid ─── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.plan-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--color-border);
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.plan-card.highlight {
  border-color: var(--color-primary);
}

.plan-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 40px;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 4px;
  letter-spacing: -1px;
}

.plan-price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
}

.plan-list {
  list-style: none;
  margin: 24px 0;
  text-align: left;
}

.plan-list li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-list li::before {
  content: "✓";
  color: var(--color-text);
  font-weight: 700;
}

.plan-list li.plan-list-disabled {
  opacity: 0.5;
  text-decoration: line-through;
}

.plan-list li.plan-list-disabled::before {
  content: "✗";
  color: #e74c3c;
}

/* ─── Alerts ─── */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-info {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.alert-success {
   background: #eef4ff;
   color: var(--color-success);
   border: 1px solid rgba(26, 109, 255, 0.2);
}

.alert-danger {
  background: #fef2f2;
  color: var(--color-danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-light);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 16px;
  color: var(--color-text);
  margin-bottom: 8px;
  font-weight: 600;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 20px;
}

/* ─── Mobile Header ─── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  z-index: 99;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-header img {
  height: 28px;
}

.mobile-hamburger {
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-hamburger:hover {
  background: var(--color-bg-hover);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
  display: block;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  .sb-collapse-btn {
    display: none !important;
  }

  .sb-mobile-close {
    display: flex;
  }

  .sidebar {
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    width: 280px;
  }

  .content {
    margin-left: 0;
    padding: 72px 12px 20px;
  }

  .layout.sidebar-collapsed .content {
    margin-left: 0;
  }

  .page-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }

  .page-title {
    font-size: 20px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-card {
    padding: 12px;
  }

  .kpi-value {
    font-size: 18px;
  }

  .kpi-label {
    font-size: 10px;
  }

  .card-top {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-body {
    padding: 16px;
  }

  /* Tables responsive */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }

  .table {
    min-width: 600px;
  }

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

  /* Dashboard topbar */
  .dash-topbar {
    flex-direction: column;
    padding: 14px 16px;
    gap: 12px;
  }

  .prize-bar {
    min-width: 100%;
  }

  /* Filters */
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

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

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

  .filter-custom input[type="date"] {
    max-width: 100%;
    flex: 1;
  }

  .filter-account select {
    min-width: 100%;
  }

  /* Dashboard rows */
  .dash-row {
    flex-direction: column;
    gap: 12px;
  }

  .dash-row > * {
    width: 100% !important;
    flex: none !important;
  }

  /* Dashboard cards grid mobile */
  .dash-cards-grid { grid-template-columns:repeat(2, 1fr); }
  .dash-card-sm,.dash-card-sm-wide,.dash-card-md,.dash-card-lg { grid-column:span 2; }
  .dash-card-full { grid-column:1 / -1; }

  /* Plans grid */
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .plan-card {
    padding: 24px 20px;
  }

  .plan-card.highlight {
    transform: none;
  }

  /* Tabs */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 0;
  }

  .tab {
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Buttons */
  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  /* Forms */
  .form-input {
    font-size: 16px; /* prevents iOS zoom */
  }

  /* Donut chart */
  .donut-chart-wrap {
    flex-direction: column;
    align-items: center;
  }

  /* Alerts */
  .alert {
    font-size: 13px;
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  /* Login */
  .login-card {
    padding: 32px 24px;
    margin: 0 16px;
  }

  /* Empty state */
  .empty-state {
    padding: 40px 16px;
  }

  /* Modal */
  .lt-modal {
    max-width: calc(100% - 24px);
  }

  .lt-modal-header {
    padding: 16px 16px 0;
  }

  .lt-modal-body {
    padding: 16px;
  }

  .lt-modal-footer {
    padding: 0 16px 16px;
  }

  /* Pipeline funnel */
  .pipeline {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .pipeline-step {
    flex-direction: row;
    gap: 16px;
  }
  .pipeline-node {
    margin-bottom: 0;
  }
  .pipeline-ring {
    width: 52px;
    height: 52px;
    min-width: 52px;
    max-width: 52px;
  }
  .pipeline-circle {
    width: 52px;
    height: 52px;
  }
  .pipeline-connector {
    position: static;
    transform: rotate(90deg);
  }
  .pipeline-data {
    align-items: flex-start;
  }
  .pipeline-value {
    font-size: 16px;
  }

  /* Code blocks */
  .code-block {
    font-size: 12px;
    padding: 14px;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid-4 {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 64px 8px 16px;
  }

  .dash-cards-grid { grid-template-columns:1fr; }
  .dash-card-sm,.dash-card-sm-wide,.dash-card-md,.dash-card-lg,.dash-card-full { grid-column:span 1; }
}

/* ─── Responsive Dashboard cards (mid screens) ─── */
@media (max-width: 900px) and (min-width: 381px) {
  .dash-cards-grid { grid-template-columns:repeat(2, 1fr); }
  .dash-card-sm,.dash-card-sm-wide,.dash-card-md,.dash-card-lg { grid-column:span 2; }
  .dash-card-full { grid-column:1 / -1; }
}

/* ─── Responsive Dashboard (tablet) ─── */
@media (max-width: 1200px) and (min-width: 769px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Dashboard cards grid tablet */
  .dash-cards-grid { grid-template-columns:repeat(6, 1fr); }
  .dash-card-sm { grid-column:span 2; }
  .dash-card-sm-wide { grid-column:span 3; }
  .dash-card-md { grid-column:span 3; }
  .dash-card-lg { grid-column:span 6; }
  .dash-card-full { grid-column:1 / -1; }
}

/* ─── Sidebar Submenu ─── */
.sidebar-section {
  margin-bottom: 4px;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0;
}

.sidebar-submenu {
  padding-left: 0;
}

.sidebar-sublink-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 12px;
  text-align: left;
}

.dash-page-chevron {
  margin-left: auto;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--color-sidebar-text);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-sublink:hover {
  background: var(--color-sidebar-hover);
  color: var(--color-sidebar-active);
  opacity: 1;
}

.sidebar-sublink.active {
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-sidebar-active);
}

.sidebar-dash-pages {
  padding-left: 0;
}

.sidebar-dash-pages .sidebar-sublink {
  padding-left: 14px;
  height: 34px;
  font-size: 13px;
}
.sidebar-sublink-btn {
  padding-left: 14px;
}
.sidebar-dash-pages .sidebar-sublink svg {
  width: 14px;
  height: 14px;
  min-width: 14px;
  flex-shrink: 0;
}

/* (sidebar-user-actions moved to sidebar-quick-actions) */

/* ─── Toggle Switch ─── */
.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  cursor: pointer;
}

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

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  display: none;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 50px;
  cursor: pointer;
  transition: 0.2s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .switch-slider {
  background: var(--color-primary);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* ─── Radio Cards ─── */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
}

.radio-card:hover {
  border-color: var(--color-primary);
  opacity: 1;
}

.radio-card.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.radio-card input[type="radio"] {
  accent-color: var(--color-primary);
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-box {
  background: var(--color-card);
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: modalSlideIn 0.25s ease;
}

.modal-box h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
}

.modal-box .form-group {
  margin-bottom: 14px;
}

.modal-box .btn {
  min-width: 90px;
}

@media (max-height: 700px) {
  .modal-box {
    max-height: 95vh;
    padding: 16px;
    border-radius: 10px;
  }
  .modal-box .form-group {
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-box {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
    padding: 20px 16px;
  }
}

/* ─── Limit Bars ─── */
.limit-item {
  margin-bottom: 20px;
}

.limit-item:last-child {
  margin-bottom: 0;
}

.limit-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 500;
}

.limit-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 50px;
  overflow: hidden;
}

.limit-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 50px;
  transition: width 0.3s ease;
}

/* ─── Dashboard Filters ─── */
.dash-filters {
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-periods {
  display: flex;
  gap: 6px;
}

.filter-custom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-custom input[type="date"] {
  padding: 6px 10px;
  font-size: 13px;
  max-width: 150px;
}

.filter-account select {
  min-width: 180px;
}

.form-input-sm {
  padding: 6px 12px !important;
  font-size: 13px !important;
  height: auto !important;
}

/* ─── Dashboard Cards Grid ─── */
.dash-cards-grid { display:grid;grid-template-columns:repeat(12, minmax(0,1fr));gap:16px; }
.dash-card { background:var(--color-card);border:1px solid var(--color-border);border-radius:12px;padding:20px;position:relative;transition:box-shadow .15s,opacity .15s;overflow:hidden; }
.dash-card-sm { grid-column:span 2;min-height:90px; }
.dash-card-sm-wide { grid-column:span 3; }
.dash-card-md { grid-column:span 4;min-height:200px; }
.dash-card-lg { grid-column:span 8;min-height:200px; }
.dash-card-full { grid-column:1 / -1; }

/* Edit Mode Bar */
#dash-edit-bar { position:sticky;top:0;z-index:100;margin:-20px -20px 16px -20px;padding:0 20px; }
.edit-bar-inner { display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#1a6dff,#3b82f6);border-radius:0 0 12px 12px;padding:10px 20px;box-shadow:0 4px 20px rgba(26,109,255,.3); }
.edit-bar-left { display:flex;align-items:center;gap:8px;color:#fff;font-size:14px;font-weight:500; }
.edit-bar-right { display:flex;align-items:center;gap:8px; }
.btn-danger-outline { background:transparent;border:1px solid rgba(255,255,255,.4);color:#fff; }
.btn-danger-outline:hover { background:rgba(255,255,255,.1); }

/* Hidden shelf */
.hidden-shelf-inner { display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--color-card);border:1px dashed var(--color-border);border-radius:10px;margin-bottom:16px;flex-wrap:wrap; }
.hidden-chip { display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;font-size:13px;color:var(--color-text-light);cursor:pointer;transition:all .15s; }
.hidden-chip:hover { border-color:var(--color-primary);color:var(--color-primary); }
.hidden-chip svg { width:14px;height:14px; }

/* Card edit controls */
.card-edit-ctrl { display:none;position:absolute;top:8px;right:8px;z-index:10;gap:4px;align-items:center; }
.editing .card-edit-ctrl { display:flex; }
.card-edit-ctrl button { width:28px;height:28px;border-radius:8px;border:1px solid var(--color-border);background:var(--color-card);color:var(--color-text-light);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;transition:all .15s; }
.card-edit-ctrl .card-remove-btn:hover { background:#ef4444;color:#fff;border-color:#ef4444; }
.card-edit-ctrl .card-drag-handle { cursor:grab !important; }
.card-edit-ctrl .card-drag-handle:hover { background:var(--color-primary) !important;color:#fff !important;border-color:var(--color-primary) !important; }

/* Edit mode card states */
.editing .dash-card { cursor:grab; }
.editing .dash-card:hover { box-shadow:0 0 0 2px var(--color-primary); }
.editing .dash-card.dragging-card { opacity:0.3; }
.editing .dash-card.drag-over-card { box-shadow:0 0 0 2px var(--color-primary);background:rgba(26,109,255,.05); }

/* ─── Dashboard Layout ─── */
.dash-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.kpi-sub {
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 4px;
}

.text-success {
  color: var(--color-success) !important;
}

.text-danger {
  color: var(--color-danger) !important;
}

/* ─── Pipeline Funnel ─── */
.pipeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 8px 0;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}

.pipeline-node {
  position: relative;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.pipeline-ring {
  position: relative;
  width: 72px;
  height: 72px;
  min-width: 72px;
  max-width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pipeline-circle {
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
  display: block;
}

.pipeline-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text);
}

.pipeline-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.pipeline-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}

.pipeline-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pipeline-connector {
  position: absolute;
  right: -12px;
  top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 2;
}

.pipeline-arrow {
  width: 24px;
  height: 24px;
  opacity: 0.4;
}

.pipeline-drop {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-danger);
  background: rgba(220, 38, 38, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Last step green highlight */
.pipeline-step:last-child .pipeline-value {
  color: var(--color-success);
}

.pipeline-step:last-child .pipeline-pct {
  color: var(--color-success);
}

/* Pipeline mobile handled in main responsive block */

/* ─── Approval Ring ─── */
.approval-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.approval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.approval-label {
  font-size: 14px;
  font-weight: 500;
  min-width: 100px;
}

.approval-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.approval-ring,
.source-ring {
  width: 36px;
  height: 36px;
}

.approval-ring svg,
.source-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 3;
}

.ring-fg {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}

.approval-value {
  font-size: 14px;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
}

/* ─── Donut Chart ─── */
.donut-chart-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut-chart {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-chart circle {
  transition: stroke-dasharray 0.5s ease;
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.donut-center strong {
  font-size: 11px;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.donut-center span {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: var(--color-text);
}

.legend-value {
  font-weight: 600;
  color: var(--color-text);
}

/* ─── Source List ─── */
.source-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.source-name {
  font-size: 14px;
  font-weight: 500;
  min-width: 100px;
}

.source-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  min-width: 30px;
  text-align: right;
}

.source-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
  min-width: 50px;
  text-align: right;
}

.empty-state-sm {
  text-align: center;
  padding: 30px 20px;
  color: var(--color-text-light);
}

/* Tablet dash layout handled above */

/* ─── Animations ─── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeIn 0.3s ease forwards;
}

/* ─── Skeleton Loading ─── */
.skeleton {
  background: linear-gradient(90deg, var(--color-border) 25%, #f0f0f0 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ─── Modal ─── */
.lt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lt-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lt-modal {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lt-modal-overlay.active .lt-modal {
  transform: scale(1) translateY(0);
}

.lt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.lt-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

.lt-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
  line-height: 1;
}

.lt-modal-close:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.lt-modal-body {
  padding: 20px 24px;
}

.lt-modal-body .form-input {
  width: 100%;
  margin-top: 8px;
}

.lt-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 20px;
}

/* ─── Icon Button ─── */
.btn-icon {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  cursor: pointer;
  color: var(--color-text-light);
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-text-light);
}
.sidebar-logo {
  padding: 24px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo img {
  margin-left: 2px;
}

/* ─── Admin Panel ─── */
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.admin-metric-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.admin-metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 6px;
}
.admin-metric-label {
  font-size: 12px;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.admin-plans-bar {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.admin-plans-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}
.admin-new-users {
  font-weight: 400;
  color: var(--color-text-light);
  font-size: 12px;
}
.admin-plans-segments {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
}
.admin-plan-segment {
  border-radius: 4px;
  transition: width 0.3s;
  min-width: 4px;
}
.admin-plans-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--color-text-light);
}
.admin-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.admin-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-light);
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.admin-table tbody tr:hover {
  background: var(--color-bg-hover);
}
.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.btn-sm {
  padding: 5px 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-text);
  transition: var(--transition);
}
.btn-sm:hover {
  background: var(--color-bg-hover);
}
.btn-danger-outline {
  border-color: var(--color-danger);
  color: var(--color-danger);
}
.btn-danger-outline:hover {
  background: var(--color-danger);
  color: #fff;
}
.btn-success-outline {
  border-color: var(--color-success);
  color: var(--color-success);
}
.btn-success-outline:hover {
  background: var(--color-success);
  color: #fff;
}

.admin-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-box {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  width: 420px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
.modal-header h3 {
  font-size: 15px;
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.modal-close:hover {
  color: var(--color-text);
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .admin-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-monitor-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px;
}
.admin-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-light);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.admin-tab:hover {
  color: var(--color-text);
  background: var(--color-bg-hover);
}
.admin-tab.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 600;
}

/* Admin Monitor Grid */
.admin-monitor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ─── Dashboard Mobile Responsive Overrides (must come last to win cascade) ─── */
@media (max-width: 1200px) and (min-width: 901px) {
  .dash-cards-grid { grid-template-columns: repeat(6, minmax(0,1fr)) !important; gap: 12px !important; }
  .dash-cards-grid .dash-card-sm { grid-column: span 2 !important; }
  .dash-cards-grid .dash-card-sm-wide { grid-column: span 3 !important; }
  .dash-cards-grid .dash-card-md { grid-column: span 3 !important; }
  .dash-cards-grid .dash-card-lg { grid-column: span 6 !important; }
  .dash-cards-grid .dash-card-full { grid-column: 1 / -1 !important; }
}

@media (max-width: 900px) {
  .dash-cards-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 10px !important; }
  .dash-cards-grid .dash-card-sm,
  .dash-cards-grid .dash-card-sm-wide,
  .dash-cards-grid .dash-card-md,
  .dash-cards-grid .dash-card-lg { grid-column: span 2 !important; }
  .dash-cards-grid .dash-card-full { grid-column: 1 / -1 !important; }

  .dash-card { padding: 14px !important; min-height: auto !important; }
  .dash-card .kpi-label { font-size: 11px; line-height: 1.2; }
  .dash-card .kpi-value { font-size: 18px; line-height: 1.2; word-break: break-word; }
  .dash-card .kpi-sub { font-size: 11px; }
  .dash-card .card-title { font-size: 14px; }
  .dash-card .card-top { padding: 10px 12px !important; }
  .dash-card .card-body { padding: 12px !important; }

  /* Tables inside dash cards: enable horizontal scroll instead of overflow */
  .dash-card table { font-size: 12px; min-width: 100%; }
  .dash-card .card-body[style*="overflow"] { -webkit-overflow-scrolling: touch; }

  /* Funil/Aprovação charts shrink */
  .dash-card svg { max-width: 100%; height: auto; }
}

@media (max-width: 560px) {
  .dash-cards-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .dash-cards-grid .dash-card-sm,
  .dash-cards-grid .dash-card-sm-wide,
  .dash-cards-grid .dash-card-md,
  .dash-cards-grid .dash-card-lg,
  .dash-cards-grid .dash-card-full { grid-column: 1 / -1 !important; }

  .dash-card .kpi-value { font-size: 22px; }
  .content { padding-left: 12px !important; padding-right: 12px !important; }
}

/* Prevent any child from forcing horizontal overflow on small screens */
@media (max-width: 900px) {
  .dash-card, .dash-card * { max-width: 100%; }
  .dash-card .kpi-change { white-space: nowrap; }
}