/* Flawsome ICT Web Inspired Design System */
:root {
  /* Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;

  --text-primary: #1a1d20;
  --text-secondary: #4a5056;
  --text-muted: #868e96;

  --accent-green: #2ac800;
  --accent-green-hover: #24b000;
  --accent-green-light: rgba(42, 200, 0, 0.08);
  --accent-green-border: rgba(42, 200, 0, 0.3);

  --accent-dark: #333e48;
  --accent-gold: #f59e0b;
  --accent-gold-light: rgba(245, 158, 11, 0.1);

  --border-color: #eaeaea;
  --border-focus: rgba(42, 200, 0, 0.3);

  /* Fonts */
  --font-headers: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 22px 60px rgba(42, 200, 0, 0.12);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Layout */
  --max-width: 1240px;
}

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

body {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation (Flawsome ICT Style) */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--text-primary);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.logo-text {
  font-family: var(--font-headers);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-green {
  color: var(--accent-green);
}

.logo-badge {
  background: var(--text-primary);
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e7e00;
}

.status-pill.triggered {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
}

.status-pill.triggered .status-dot {
  background: #dc2626;
}

.pulsing {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Page Intro Header */
.main-wrapper {
  padding-top: 104px;
  padding-bottom: 60px;
}

.page-intro {
  margin-bottom: 28px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-green);
  background: var(--accent-green-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.chart-section {
  grid-column: 1 / span 3;
  grid-row: 2;
}

.sidebar-section {
  grid-column: 4;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .chart-section {
    grid-column: span 3;
    grid-row: auto;
  }
  .sidebar-section {
    grid-column: span 3;
    grid-row: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .chart-section, .sidebar-section {
    grid-column: span 1;
  }
}

/* Flawsome Card Styling */
.card, .metric-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover, .metric-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(42, 200, 0, 0.2);
}

/* Metric Cards */
.metric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header .label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.live-badge {
  background: var(--accent-green-light);
  color: #1e7e00;
  border: 1px solid var(--accent-green-border);
}

.target-badge {
  background: var(--accent-gold-light);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.info-badge {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.price-value {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.target-color {
  color: var(--accent-dark);
}

.subtext {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 6px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2ac800, #10b981);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chart Section */
.chart-section {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.chart-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.time-filters {
  display: flex;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-sm);
  gap: 4px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(42, 200, 0, 0.25);
}

.chart-container {
  position: relative;
  width: 100%;
  height: 380px;
}

/* Sidebar Sections */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.card-title h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-title svg {
  color: var(--accent-green);
}

/* Calculator Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

input[type="number"] {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="number"]:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px var(--accent-green-light);
}

.calc-results {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border-color);
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.result-row strong {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 700;
}

.result-row.highlight strong {
  color: var(--accent-dark);
}

.result-row.gain strong {
  color: #16a34a;
}

/* Buttons (Flawsome ICT Style) */
.small-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.test-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--accent-green);
  color: #fff;
  width: 100%;
}

.sync-btn {
  margin-bottom: 14px;
}

.btn-primary:hover {
  background-color: var(--accent-green-hover);
  box-shadow: 0 6px 16px rgba(42, 200, 0, 0.25);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-outline {
  background: var(--accent-gold-light);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-outline:hover {
  background: rgba(245, 158, 11, 0.18);
}

/* Links List */
.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.link-list a:hover {
  border-color: var(--accent-green);
  background: var(--accent-green-light);
  color: #1e7e00;
}

.whatsapp-box {
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.whatsapp-box strong {
  display: block;
  margin-bottom: 4px;
  color: #1e7e00;
}

.whatsapp-box code {
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* Modal Popup Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-card {
  background: #fff;
  border: 2px solid var(--accent-green);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.modal-card h2 {
  font-size: 1.4rem;
  color: #16a34a;
  margin-bottom: 12px;
}

.modal-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-calc-box {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.modal-total {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: #16a34a;
  margin-top: 4px;
}

/* Footer */
.app-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
