/* SaaSDiet Premium Stylesheet */

:root {
  --bg-app: #090d16;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.06);
  --border-card-hover: rgba(255, 255, 255, 0.12);
  
  --primary-glow: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --primary-color: #00e5ff;
  --primary-hover: #3fc3ff;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-primary-btn: #090d16;
  --text-active-tab: #090d16;
  
  --color-green: #10b981;
  --color-yellow: #f59e0b;
  --color-orange: #f97316;
  --color-red: #ef4444;
  --color-pacing: #ffcc00; /* Luminous neon gold for billing/pacing alert */
  
  --shadow-glow-red: 0 0 12px rgba(239, 68, 68, 0.45);
  --shadow-glow-green: 0 0 12px rgba(16, 185, 129, 0.4);
  --shadow-glow-primary: 0 0 12px rgba(0, 242, 254, 0.35);
  
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Additional UI Variables */
  --bg-header: linear-gradient(to bottom, rgba(9, 13, 22, 1), rgba(9, 13, 22, 0.8));
  --bg-drawer: #0b0f19;
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --scrollbar-thumb: rgba(255, 255, 255, 0.1);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.2);
  --bg-progress-bg: rgba(255, 255, 255, 0.04);
}

/* Theme Skins Overrides */
body.theme-cyber-dark {
  /* Default variables apply */
}

body.theme-cozy-cream {
  --bg-app: #f3ede2;            /* Rich warm ivory/cream background for card separation */
  --bg-card: #ffffff;           /* Clean white cards to stand out */
  --bg-card-hover: #faf7f2;     /* Subtle light warm cream hover */
  --border-card: #e5ded4;       /* Frames cards with a soft warm gray border */
  --border-card-hover: #ccc2b4;
  
  --primary-glow: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
  --primary-color: #e11d48;
  --primary-hover: #be123c;
  
  --text-primary: #27201b;      /* High contrast dark charcoal */
  --text-secondary: #554d45;    /* High contrast secondary warm charcoal */
  --text-muted: #82786e;        /* Highly readable muted sand-gray */
  --text-primary-btn: #ffffff;
  --text-active-tab: #ffffff;   /* White text on dark charcoal active tab background */
  
  --color-pacing: #e11d48;      /* Soft warning rose-coral for cozy theme contrast */
  
  --bg-header: linear-gradient(to bottom, #ffffff, #f3ede2);
  --bg-drawer: #ffffff;
  --shadow-card: 0 6px 20px 0 rgba(120, 110, 100, 0.08);
  --scrollbar-thumb: rgba(120, 110, 100, 0.2);
  --scrollbar-thumb-hover: rgba(120, 110, 100, 0.35);
  --bg-progress-bg: #ece4d6;    /* Soft warm sand-gray background for visible progress bars! */
}

body.theme-midnight-slate {
  --bg-app: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-card: rgba(255, 255, 255, 0.05);
  --border-card-hover: rgba(255, 255, 255, 0.1);
  
  --primary-glow: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --primary-color: #818cf8;
  --primary-hover: #6366f1;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-primary-btn: #ffffff;
  --text-active-tab: #090d16;
  
  --color-pacing: #ffcc00;
  
  --bg-header: linear-gradient(to bottom, #090d16, #0f172a);
  --bg-drawer: #0f172a;
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --scrollbar-thumb: rgba(255, 255, 255, 0.08);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.15);
  --bg-progress-bg: rgba(255, 255, 255, 0.04);
}

body.theme-industrial-gray {
  --bg-app: #525866;            /* Brighter mid-tone cool steel gray for concrete aesthetic */
  --bg-card: #393d47;           /* Cohesive darker steel gray that blends seamlessly */
  --bg-card-hover: #464b58;     /* Cohesive hover background */
  --border-card: rgba(255, 255, 255, 0.12); /* Subtle metallic divider lines */
  --border-card-hover: rgba(255, 255, 255, 0.25);
  
  --primary-glow: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); /* Steel-dark buttons */
  --primary-color: #f1f5f9;
  --primary-hover: #cbd5e1;
  
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-primary-btn: #ffffff;
  --text-active-tab: #090d16;
  
  --color-pacing: #ff5500;      /* High-contrast neon hazard orange pacing indicator */
  
  --bg-header: linear-gradient(to bottom, #434854, #525866);
  --bg-drawer: #393d47;
  --shadow-card: 0 6px 20px 0 rgba(0, 0, 0, 0.25);
  --scrollbar-thumb: rgba(255, 255, 255, 0.25);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.4);
  --bg-progress-bg: rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
  width: 400px;
  height: 550px;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-app);
  color: var(--text-primary);
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* Header styling */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-card);
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: -8px; /* Offset padding to align perfectly */
  border-radius: 8px;
  transition: var(--transition-smooth);
  user-select: none;
}

.logo-brand:hover {
  background: var(--bg-card-hover);
}

.logo-brand:hover .logo-icon {
  transform: rotate(15deg);
  filter: drop-shadow(0 0 8px var(--primary-color));
}

.logo-brand:active {
  transform: scale(0.97);
}

.logo-icon {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.4));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.app-header h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: var(--primary-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Financial Summary Card */
.summary-card {
  display: flex;
  margin: 14px 20px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  justify-content: space-between;
  align-items: center;
}

.summary-item {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.summary-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.separator {
  width: 1px;
  height: 30px;
  background-color: var(--border-card);
  margin: 0 16px;
}

/* Text glow effects */
.text-glow-red {
  color: #ff5a5a;
  text-shadow: 0 0 8px rgba(255, 90, 90, 0.3);
}

.text-glow-green {
  color: #2ee59d;
  text-shadow: 0 0 8px rgba(46, 229, 157, 0.3);
}

.text-glow-pacing {
  color: var(--color-pacing);
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.45);
}

/* Tabs Navigation */
.tab-nav {
  display: flex;
  margin: 0 20px 10px;
  padding: 3px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.tab-btn.active {
  color: var(--text-active-tab);
  background: var(--text-primary);
  font-weight: 600;
}

/* Tab content area */
.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 14px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  margin-top: 10px;
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.3));
}

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

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Subscription Cards List */
.subs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.sub-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px 14px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.sub-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-1px);
}

.sub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.sub-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-color);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-name-wrap {
  display: flex;
  flex-direction: column;
}

.sub-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.sub-domain-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.sub-cost-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.sub-info-right-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-time-preview {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.chevron-icon {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.sub-card.expanded .chevron-icon {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.sub-card-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin-top 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sub-card.expanded .sub-card-details {
  max-height: 300px;
  opacity: 1;
  margin-top: 12px;
}

.details-divider {
  height: 1px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin-bottom: 10px;
}

.details-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.details-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.details-val {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.details-row-roi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Manual Log Area */
.manual-log-area {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.log-input {
  flex: 1;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  width: 50px;
  text-align: center;
}

.log-input:focus {
  border-color: var(--primary-color);
}

.log-input::-webkit-outer-spin-button,
.log-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-log-time {
  padding: 6px 12px;
  background: var(--primary-glow);
  color: #090d16;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-log-time:hover {
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.details-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-card-hover);
}

.btn-action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-action-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-action-link.cancel-link {
  color: #ff5a5a;
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.05);
}

.btn-action-link.cancel-link:hover {
  background: var(--color-red);
  color: #ffffff;
  border-color: var(--color-red);
  box-shadow: var(--shadow-glow-red);
}

/* ROI Badges */
.roi-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.roi-badge.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.roi-badge.yellow {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-yellow);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.roi-badge.orange {
  background: rgba(249, 115, 22, 0.1);
  color: var(--color-orange);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.roi-badge.red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.05);
}

.roi-badge.untracked {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}


/* Buttons */
.btn-primary-sm {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-glow);
  color: var(--text-primary-btn);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary-sm:hover {
  box-shadow: var(--shadow-glow-primary);
  opacity: 0.95;
}

.btn-primary {
  padding: 10px 20px;
  background: var(--primary-glow);
  color: var(--text-primary-btn);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow-primary);
  transform: translateY(-1px);
}

.btn-primary-full {
  width: 100%;
  padding: 12px;
  background: var(--primary-glow);
  color: var(--text-primary-btn);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary-full:hover {
  box-shadow: var(--shadow-glow-primary);
}

.btn-secondary {
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-card-hover);
}

.btn-icon-only {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.btn-icon-only:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Insights Pane */
.insights-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.insight-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 14px 16px;
}

.insight-metric-card h4 {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  margin-bottom: 6px;
}

.insight-metric-card .metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.insight-metric-card .metric-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.savings-alert-box {
  display: flex;
  gap: 12px;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
}

.alert-icon {
  font-size: 20px;
}

.alert-content h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 3px;
}

.alert-content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.history-section h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 6px 0 10px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}

.history-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-date {
  font-weight: 500;
  color: var(--text-secondary);
}

.history-time {
  color: var(--text-muted);
  font-size: 11px;
}

.history-right {
  text-align: right;
}

.history-cost {
  font-weight: 600;
  color: var(--text-primary);
}

.history-efficiency {
  font-size: 11px;
  margin-top: 2px;
}

.history-empty {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px dashed var(--border-card);
  border-radius: 8px;
}




/* Drawer / Modal styling */
.drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 12, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-drawer);
  border-top: 1px solid var(--border-card);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
}

.drawer-overlay.active .drawer-content {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.drawer-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-group label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary-color);
  background: var(--bg-card);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
}

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

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.form-actions button {
  flex: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Header Actions and Theme Selector */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}



/* Dashboard Styles */
.dashboard-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 14px 16px;
}

.dashboard-card h4 {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  margin-bottom: 12px;
}

/* Cost Bar */
.cost-bar-container {
  width: 100%;
  height: 14px;
  background: var(--bg-progress-bg);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border-card);
}

.cost-bar {
  display: flex;
  width: 100%;
  height: 100%;
}

.cost-bar-segment {
  height: 100%;
  transition: var(--transition-smooth);
}

.cost-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
}

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

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

.legend-name {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95px;
}

.legend-value {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: auto;
}

/* Usage Overview */
.usage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.usage-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.usage-item-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.usage-item-name {
  font-weight: 500;
  color: var(--text-primary);
}

.usage-item-time {
  color: var(--text-secondary);
  font-weight: 600;
}

.usage-progress-bg {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--bg-progress-bg);
  border-radius: 3px;
  overflow: visible;
}

.usage-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.usage-progress-bar.green {
  background: var(--color-green);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.usage-progress-bar.yellow {
  background: var(--color-yellow);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.usage-progress-bar.orange {
  background: var(--color-orange);
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.4);
}

.usage-progress-bar.red {
  background: var(--color-red);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.usage-progress-bar.untracked {
  background: var(--text-muted);
  box-shadow: none;
}

/* Expanded History styles */
.usage-item {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.usage-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.usage-item-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.usage-item-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin-top 0.3s ease;
  display: flex;
  flex-direction: column;
}

.usage-item.expanded .usage-item-details {
  max-height: 250px;
  opacity: 1;
  margin-top: 10px;
}

.usage-details-divider {
  height: 1px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.usage-history-title {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.usage-history-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.history-bar-row.current {
  font-weight: 500;
}

.history-bar-label {
  color: var(--text-secondary);
  width: 75px;
  white-space: nowrap;
}

.history-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  overflow: hidden;
}

.history-bar {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.3);
}

.history-bar-row.current .history-bar {
  background: var(--color-green);
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.3);
}

.history-bar-val {
  color: var(--text-muted);
  width: 50px;
  text-align: right;
}

.history-empty-state {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 0;
  line-height: 1.4;
}

/* Pace Marker and Days Muted Indicator styles */
.usage-item-days {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: normal;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.usage-item-days.due-warning {
  color: var(--color-pacing);
  font-weight: 600;
}

.usage-pace-marker {
  position: absolute;
  top: -3px;
  height: 12px;
  width: 2px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 1px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.5;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.usage-pace-marker.due-warning {
  background: var(--color-pacing);
  box-shadow: 0 0 6px var(--color-pacing);
  opacity: 0.85;
}

/* Pro Upgrade Styles */
.btn-upgrade-pro {
  background: rgba(0, 242, 254, 0.03);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: var(--primary-color, #00f2fe);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  vertical-align: middle;
}

.btn-upgrade-pro:hover {
  background: var(--primary-glow, linear-gradient(135deg, #00f2fe 0%, #4facfe 100%));
  color: #070913 !important;
  border-color: transparent;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.btn-upgrade-pro.is-pro {
  display: none !important; /* Hide completely when Pro is active */
}

.upgrade-info-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 5px;
  width: 100%;
}

.upgrade-badge-big {
  background: var(--primary-glow, linear-gradient(135deg, #00f2fe 0%, #4facfe 100%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 15px;
  filter: drop-shadow(0 2px 8px rgba(0, 242, 254, 0.2));
}

.upgrade-desc {
  font-size: 13px;
  color: var(--text-secondary, #cbd5e1);
  line-height: 1.5;
  margin-bottom: 20px;
}

.upgrade-price-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.08));
  padding: 12px 24px;
  border-radius: 12px;
  width: 100%;
}

.price-val {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.price-type {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upgrade-bullet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 25px;
  width: 100%;
  padding-left: 10px;
}

.bullet-item {
  font-size: 13px;
  color: var(--text-secondary, #cbd5e1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-buy-pro {
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  margin-bottom: 25px;
  width: 100%;
}

.license-input-section {
  width: 100%;
  border-top: 1px solid var(--border-card, rgba(255, 255, 255, 0.08));
  padding-top: 20px;
  text-align: left;
}

.license-input-section label {
  font-size: 12px;
  color: var(--text-secondary, #cbd5e1);
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
}

.license-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.license-input-row input {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
}

.license-input-row input:focus {
  border-color: var(--primary-color, #00f2fe);
  outline: none;
}

.activation-status-message {
  font-size: 11px;
  margin-top: 8px;
  font-weight: 500;
  min-height: 16px;
}

.activation-status-message.success {
  color: #10b981;
}

.activation-status-message.error {
  color: #ef4444;
}
