/* ============================================
   COMMAND CENTER - DARK MODE DASHBOARD
   ============================================ */

/* ============================================
   LOGIN GATE
   ============================================ */

#login-gate {
  position: fixed;
  inset: 0;
  background: #0a0a0f;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

#login-gate.fade-out {
  opacity: 0;
  pointer-events: none;
}

.login-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 340px;
  padding: 48px 40px;
  background: #161622;
  border: 1px solid #1e1e30;
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(0,212,255,0.08), 0 0 120px rgba(0,0,0,0.6);
  position: relative;
}

.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
}

.login-logo {
  font-size: 40px;
  line-height: 1;
  filter: drop-shadow(0 0 12px #00d4ff);
}

.login-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #00d4ff;
  text-shadow: 0 0 20px #00d4ff;
}

.login-question {
  font-size: 15px;
  color: #e8e8f0;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 4px;
}

.login-input {
  width: 100%;
  background: #12121a;
  border: 1px solid #1e1e30;
  border-radius: 10px;
  color: #e8e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 12px rgba(0,212,255,0.15);
}

.login-input::placeholder { color: #4a4a6a; }

.login-btn {
  width: 100%;
  padding: 12px;
  background: #0066ff;
  border: 1px solid #00d4ff;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.login-btn:hover {
  background: #00d4ff;
  color: #0a0a0f;
  box-shadow: 0 0 20px rgba(0,212,255,0.4);
}

.login-error {
  font-size: 12px;
  color: #ff3366;
  min-height: 16px;
  text-align: center;
}


@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #161622;
  --bg-card-hover: #1c1c2e;
  --border: #1e1e30;
  --border-glow: #00d4ff33;
  --accent-blue: #00d4ff;
  --accent-blue-dim: #0066ff;
  --accent-green: #00ff88;
  --accent-red: #ff3366;
  --accent-yellow: #ffcc00;
  --accent-purple: #7c3aed;
  --text-primary: #e8e8f0;
  --text-secondary: #7878a0;
  --text-muted: #4a4a6a;
  --positive: #00ff88;
  --negative: #ff3366;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue-dim); }

/* ============================================
   LAYOUT
   ============================================ */

.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: auto;
  gap: 12px;
  padding: 12px;
  max-width: 1800px;
  margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent-blue);
  text-shadow: 0 0 20px var(--accent-blue), 0 0 40px var(--accent-blue-dim);
}

.header-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.clock-widget {
  text-align: right;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-blue);
  text-shadow: 0 0 15px var(--accent-blue);
  letter-spacing: 2px;
}

.clock-date {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.clock-tz {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.05);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue-dim), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.card-title .icon {
  font-size: 14px;
}

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

.weather-zip-input {
  width: 90px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 12px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s;
}

.weather-zip-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.1);
}

.weather-zip-input::placeholder { color: var(--text-muted); }

/* ============================================
   GRID PLACEMENTS
   ============================================ */

.widget-news { grid-column: span 2; }
.widget-weather { grid-column: span 1; }
.widget-forex { grid-column: span 1; }
.widget-crypto { grid-column: span 4; }
.widget-stocks { grid-column: span 2; }
.widget-todo { grid-column: span 1; }
.widget-calendar { grid-column: span 1; }
.widget-vps { grid-column: span 2; }

/* Drag & Drop */
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 14px;
  padding: 0 6px 0 0;
  line-height: 1;
  user-select: none;
  transition: color 0.15s;
  flex-shrink: 0;
}
.drag-handle:hover { color: var(--accent-blue); }

.card.dragging {
  opacity: 0.35;
  border: 1px dashed var(--accent-blue);
}

.card.drag-over {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px var(--accent-blue), 0 8px 32px rgba(0, 212, 255, 0.2);
  background: var(--bg-card-hover);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(0, 212, 255, 0.05);
}

.btn.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-primary {
  background: var(--accent-blue-dim);
  border-color: var(--accent-blue);
  color: white;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-blue);
  color: var(--bg-primary);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--text-muted);
  font-size: 12px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  color: var(--negative);
  font-size: 12px;
  padding: 8px;
  text-align: center;
  opacity: 0.7;
}

/* ============================================
   NEWS WIDGET
   ============================================ */

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

.news-item {
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
  cursor: pointer;
}

.news-item:hover {
  border-color: var(--accent-blue-dim);
}

.news-item a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: block;
  margin-bottom: 4px;
}

.news-item a:hover {
  color: var(--accent-blue);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-muted);
}

.news-source {
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent-blue);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ============================================
   WEATHER WIDGET
   ============================================ */

.weather-current {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.weather-icon {
  font-size: 42px;
  line-height: 1;
}

.weather-temp-main {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.weather-temp-alt {
  font-size: 14px;
  color: var(--text-secondary);
}

.weather-condition {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.weather-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.weather-stat {
  background: var(--bg-secondary);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
}

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

.weather-stat-value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
}

.weather-forecast {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.forecast-day {
  background: var(--bg-secondary);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  font-size: 11px;
}

.forecast-label {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.forecast-icon { font-size: 20px; margin-bottom: 4px; }

.forecast-temps {
  display: flex;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
}

.temp-high { color: var(--accent-yellow); font-weight: 600; }
.temp-low { color: var(--text-secondary); }

/* ============================================
   FOREX WIDGET
   ============================================ */

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

.forex-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.forex-pair {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.forex-rate {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-blue);
}

.forex-highlight {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-blue);
  text-shadow: 0 0 15px var(--accent-blue);
}

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

.forex-featured {
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  text-align: center;
}

/* ============================================
   CRYPTO WIDGET
   ============================================ */

.crypto-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.crypto-search {
  flex: 1;
  min-width: 200px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 6px 12px;
  outline: none;
  transition: border-color 0.2s;
}

.crypto-search:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.1);
}

.crypto-search::placeholder { color: var(--text-muted); }

.crypto-table-wrap {
  overflow-x: auto;
  max-height: 320px;
  overflow-y: auto;
}

.crypto-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.crypto-table th {
  padding: 8px 10px;
  text-align: left;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  user-select: none;
  white-space: nowrap;
}

.crypto-table th:hover { color: var(--accent-blue); }
.crypto-table th.sorted { color: var(--accent-blue); }
.crypto-table th .sort-icon { margin-left: 4px; opacity: 0.5; }
.crypto-table th.sorted .sort-icon { opacity: 1; }

.crypto-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(30, 30, 48, 0.5);
  white-space: nowrap;
}

.crypto-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.crypto-rank {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  width: 40px;
}

.crypto-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crypto-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.crypto-name { font-weight: 600; color: var(--text-primary); }
.crypto-symbol { color: var(--text-muted); font-size: 10px; text-transform: uppercase; }

.crypto-price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.crypto-change {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
}

.positive { color: var(--positive); }
.negative { color: var(--negative); }

.crypto-mcap {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  justify-content: center;
}

.page-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover, .page-btn.active {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(0, 212, 255, 0.08);
}

.last-updated {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
}

/* ============================================
   STOCKS WIDGET
   ============================================ */

.stocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.stock-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  transition: all 0.2s;
  cursor: default;
}

.stock-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

.stock-card.positive { border-color: rgba(0, 255, 136, 0.15); }
.stock-card.negative { border-color: rgba(255, 51, 102, 0.15); }

.stock-ticker {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 1px;
}

.stock-name {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-price {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 6px;
}

.stock-change {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.stock-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.market-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 1px;
}

.market-open { background: rgba(0,255,136,0.1); color: var(--positive); border: 1px solid rgba(0,255,136,0.2); }
.market-closed { background: rgba(255,51,102,0.1); color: var(--negative); border: 1px solid rgba(255,51,102,0.2); }
.market-extended { background: rgba(255,204,0,0.1); color: var(--accent-yellow); border: 1px solid rgba(255,204,0,0.2); }

/* ============================================
   TODO WIDGET
   ============================================ */

.todo-add {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.todo-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.2s;
}

.todo-input:focus {
  border-color: var(--accent-blue);
}

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

.todo-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  group: true;
}

.todo-item:hover {
  border-color: rgba(0, 212, 255, 0.2);
}

.todo-check {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.todo-check:hover {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.1);
}

.todo-check.checked {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--bg-primary);
  font-size: 10px;
}

.todo-text {
  flex: 1;
  font-size: 12px;
  color: var(--text-primary);
  transition: all 0.2s;
}

.todo-text.completed {
  color: var(--text-muted);
  text-decoration: line-through;
}

.todo-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  opacity: 0;
  transition: all 0.2s;
  line-height: 1;
}

.todo-item:hover .todo-delete {
  opacity: 1;
}

.todo-delete:hover { color: var(--negative); }

.todo-footer {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================
   CALENDAR WIDGET
   ============================================ */

.calendar-date-display {
  text-align: center;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 10px;
}

.calendar-day-name {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.calendar-day-num {
  font-size: 56px;
  font-weight: 900;
  color: var(--accent-blue);
  text-shadow: 0 0 20px var(--accent-blue);
  line-height: 1;
  font-family: var(--font-mono);
}

.calendar-month-year {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.calendar-tz-clock {
  text-align: center;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 10px;
}

.cancun-time {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-green);
  text-shadow: 0 0 10px var(--accent-green);
}

.cancun-tz {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.gcal-notice {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  color: #a78bfa;
  text-align: center;
}

/* ============================================
   VPS HEALTH WIDGET
   ============================================ */

.vps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.vps-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.vps-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vps-status-dot.online {
  background: var(--positive);
  box-shadow: 0 0 10px var(--positive);
  animation: pulse 2s infinite;
}

.vps-status-dot.offline {
  background: var(--negative);
  box-shadow: 0 0 10px var(--negative);
}

.vps-status-dot.checking {
  background: var(--accent-yellow);
  box-shadow: 0 0 10px var(--accent-yellow);
  animation: pulse 1s infinite;
}

.vps-info { flex: 1; }

.vps-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.vps-endpoint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.vps-status-text {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.vps-response {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
}

.vps-response-label {
  font-size: 9px;
  color: var(--text-muted);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vps-next-check {
  font-size: 10px;
  color: var(--text-muted);
}

/* ============================================
   X TRENDING WIDGET
   ============================================ */

.x-trends-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.x-logo {
  font-size: 24px;
  margin-bottom: 8px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

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

@media (max-width: 1200px) {
  .dashboard {
    grid-template-columns: 1fr 1fr;
  }
  .widget-news { grid-column: span 2; }
  .widget-weather { grid-column: span 1; }
  .widget-forex { grid-column: span 1; }
  .widget-crypto { grid-column: span 2; }
  .widget-stocks { grid-column: span 2; }
  .widget-todo { grid-column: span 1; }
  .widget-calendar { grid-column: span 1; }
  .widget-vps { grid-column: span 2; }
}

@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .widget-news, .widget-weather, .widget-forex,
  .widget-crypto, .widget-stocks, .widget-todo,
  .widget-calendar, .widget-vps {
    grid-column: 1;
    grid-row: auto;
  }
  .header-title { font-size: 16px; letter-spacing: 3px; }
  .clock-time { font-size: 20px; }
  .stocks-grid { grid-template-columns: repeat(2, 1fr); }
  .vps-grid { grid-template-columns: 1fr; }
}

/* ============================================
   TRUNKS CHAT BOX
   ============================================ */

/* Avatar circle — Trunks purple/lavender */
.trunks-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c4dbd, #b39ddb);
  border: 2px solid #00d4ff;
  box-shadow: 0 0 12px rgba(0,212,255,0.4);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.trunks-avatar-circle::after {
  content: "🗡️";
}

.trunks-avatar-circle-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c4dbd, #b39ddb);
  border: 1.5px solid #00d4ff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.trunks-avatar-circle-sm::after {
  content: "🗡️";
}

/* Floating bubble */
#trunks-chat-bubble {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #7c4dbd, #0066ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 0 24px rgba(124,77,189,0.7), 0 0 8px rgba(0,212,255,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
#trunks-chat-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 0 36px rgba(124,77,189,0.9), 0 0 16px rgba(0,212,255,0.6);
}
#trunks-bubble-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
#trunks-bubble-avatar::after { content: "🗡️"; }

/* Chat panel */
#trunks-chat-panel {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 360px;
  max-height: 70vh;
  background: #0d0d18;
  border: 1px solid rgba(124,77,189,0.4);
  border-radius: 20px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6), 0 0 32px rgba(124,77,189,0.2);
  overflow: hidden;
  animation: chatSlideIn 0.25s ease;
}
/* On mobile with keyboard open — stick to top of viewport */
@media (max-height: 500px) {
  #trunks-chat-panel {
    top: 8px;
    bottom: auto;
    max-height: calc(100vh - 16px);
    right: 8px;
    left: 8px;
    width: auto;
    border-radius: 14px;
  }
}
@media (max-width: 480px) {
  #trunks-chat-panel {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 90px;
    border-radius: 16px;
  }
  #trunks-chat-bubble {
    bottom: 20px;
    right: 16px;
  }
}
#trunks-chat-panel.open {
  display: flex;
}
@keyframes chatSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124,77,189,0.25), rgba(0,102,255,0.15));
  border-bottom: 1px solid rgba(124,77,189,0.3);
}
.chat-close-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #aaa;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.chat-close-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  max-height: 320px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,77,189,0.4) transparent;
}
.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 90%;
}
.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg.assistant {
  align-self: flex-start;
}
.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, #0066ff, #7c4dbd);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant .chat-bubble {
  background: rgba(255,255,255,0.06);
  color: #e0e0e0;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(124,77,189,0.2);
}
.chat-msg.typing .chat-bubble {
  color: #888;
  font-style: italic;
  background: rgba(255,255,255,0.04);
}

/* Input row */
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(124,77,189,0.2);
  background: rgba(0,0,0,0.25);
  align-items: center;
}
.chat-input-row input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(124,77,189,0.3);
  border-radius: 10px;
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-row input:focus {
  border-color: #7c4dbd;
  box-shadow: 0 0 8px rgba(124,77,189,0.3);
}
.chat-input-row input::placeholder { color: #555; }
.chat-send-btn {
  background: linear-gradient(135deg, #7c4dbd, #0066ff);
  border: none;
  border-radius: 10px;
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.15s;
}
.chat-send-btn:hover { opacity: 0.85; transform: scale(1.05); }
.chat-send-btn:active { transform: scale(0.96); }

/* ============================================
   THEMES
   ============================================ */

[data-theme="matrix"] {
  --bg-primary: #030a03;
  --bg-secondary: #061206;
  --bg-card: #081808;
  --bg-card-hover: #0d220d;
  --border: #1a3a1a;
  --border-glow: #00ff4133;
  --accent-blue: #00ff41;
  --accent-blue-dim: #00cc33;
  --accent-green: #00ff41;
  --accent-red: #ff3366;
  --text-primary: #d0f0d0;
  --text-secondary: #70a070;
  --text-muted: #3a6a3a;
}

[data-theme="synthwave"] {
  --bg-primary: #0a050f;
  --bg-secondary: #140a1e;
  --bg-card: #1a0d28;
  --bg-card-hover: #220f32;
  --border: #2e1045;
  --border-glow: #df00ff33;
  --accent-blue: #df00ff;
  --accent-blue-dim: #8800cc;
  --accent-green: #00ff88;
  --text-primary: #f0d0ff;
  --text-secondary: #9060a0;
  --text-muted: #5a3a6a;
}

[data-theme="crimson"] {
  --bg-primary: #0f0508;
  --bg-secondary: #1a0810;
  --bg-card: #200a14;
  --bg-card-hover: #2a0d1a;
  --border: #3a1020;
  --border-glow: #ff336633;
  --accent-blue: #ff3366;
  --accent-blue-dim: #cc0033;
  --accent-green: #ff6699;
  --text-primary: #ffe0e8;
  --text-secondary: #a06070;
  --text-muted: #6a3040;
}

[data-theme="solar"] {
  --bg-primary: #0f0e05;
  --bg-secondary: #1a1808;
  --bg-card: #20200a;
  --bg-card-hover: #2a2a0d;
  --border: #3a3810;
  --border-glow: #ffcc0033;
  --accent-blue: #ffcc00;
  --accent-blue-dim: #ff9900;
  --accent-green: #ffee55;
  --text-primary: #fff8d0;
  --text-secondary: #a09040;
  --text-muted: #6a5f20;
}

/* ============================================
   SETTINGS TRIGGER BUTTON
   ============================================ */

.settings-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.settings-trigger:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(255,255,255,0.07);
}
.settings-trigger svg { flex-shrink: 0; }

/* ============================================
   SETTINGS PANEL (right drawer)
   ============================================ */

.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(2px);
}
.settings-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 901;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
.settings-panel.open {
  transform: translateX(0);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.settings-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
}
.settings-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.settings-close:hover { color: var(--text-primary); background: var(--bg-card); }

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-section {}

.settings-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Theme Swatches */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 10px;
  color: var(--text-secondary);
  font-family: inherit;
}
.theme-swatch:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}
.theme-swatch.active {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
  color: var(--accent-blue);
}
.swatch-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* Widget Toggles */
.widget-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg-card);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.toggle-row:hover { background: var(--bg-card-hover); }
.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Custom toggle switch */
.toggle-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--border);
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 3px;
  left: 3px;
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch:checked {
  background: var(--accent-blue);
}
.toggle-switch:checked::after {
  transform: translateX(16px);
  background: var(--bg-primary);
}

/* API Key Input */
.settings-api-row {
  display: flex;
  gap: 8px;
}
.settings-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s;
}
.settings-input:focus { border-color: var(--accent-blue); }
.settings-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* ============================================
   CLAUDE USAGE WIDGET
   ============================================ */

.widget-claude { grid-column: span 2; }

.claude-no-key {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.claude-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.claude-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.claude-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.claude-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  line-height: 1;
  margin-bottom: 4px;
}

.claude-stat-sub {
  font-size: 10px;
  color: var(--text-secondary);
}

.claude-progress-wrap {
  margin-bottom: 16px;
}

.claude-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.claude-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.claude-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-blue);
  transition: width 0.6s ease;
  box-shadow: 0 0 6px var(--accent-blue);
}

.claude-progress-fill.warn { background: var(--accent-yellow); box-shadow: 0 0 6px var(--accent-yellow); }
.claude-progress-fill.danger { background: var(--negative); box-shadow: 0 0 6px var(--negative); }

.claude-models-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.claude-model-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 7px;
  color: var(--text-secondary);
}

.claude-reset-info {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: right;
}
