/* ================================================
   X DAILY TRACKER — style.css
   Theme: X (Twitter) Dark — Premium Dashboard
   ================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: #000;
  color: #E7E9EA;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== CSS VARIABLES ===== */
:root {
  --bg:            #000000;
  --card:          #16181C;
  --card-hover:    #1D1F23;
  --border:        #2F3336;
  --border-subtle: rgba(47, 51, 54, 0.5);
  --text:          #E7E9EA;
  --text-sec:      #71767B;
  --text-ter:      #536471;
  --accent:        #1D9BF0;
  --accent-dim:    rgba(29, 155, 240, 0.12);
  --accent-hover:  #1A8CD8;
  --green:         #00BA7C;
  --green-dim:     rgba(0, 186, 124, 0.12);
  --red:           #F4212E;
  --red-dim:       rgba(244, 33, 46, 0.12);
  --yellow:        #FFD400;
  --radius-xl:     20px;
  --radius-lg:     16px;
  --radius-md:     12px;
  --radius-sm:     8px;
  --radius-xs:     6px;
  --transition:    all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.5);
  --glow-accent:   0 0 20px rgba(29, 155, 240, 0.2);
  --glow-green:    0 0 20px rgba(0, 186, 124, 0.2);
}

/* ===== PAGE LOADER ===== */
#page-loader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

.loader-logo {
  width: 72px;
  height: 72px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.loader-text {
  color: var(--text-sec);
  font-size: 14px;
  letter-spacing: 0.02em;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.97); }
}

/* ===== CONFETTI ===== */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  display: none;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  transform: translateY(12px);
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(0);
  box-shadow: var(--glow-accent), var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== APP CONTAINER ===== */
.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
  animation: appFadeIn 0.6s ease both;
  animation-delay: 0.4s;
  opacity: 0;
}

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

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  margin: 0 -20px;
  padding: 0 20px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.x-logo {
  width: 44px;
  height: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
  transition: var(--transition);
}

.x-logo:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1.2;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1;
  margin-top: 2px;
}

.header-center {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
}

.datetime-block {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.meta-date {
  font-size: 13px;
  color: var(--text-sec);
  font-weight: 500;
}

.meta-time {
  font-size: 13px;
  color: var(--text-ter);
  font-variant-numeric: tabular-nums;
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 212, 0, 0.1);
  border: 1px solid rgba(255, 212, 0, 0.25);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--yellow);
  cursor: default;
}

.streak-fire {
  font-size: 14px;
}

.streak-label {
  font-weight: 400;
  color: rgba(255, 212, 0, 0.7);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  line-height: 1;
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-sm {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}

.btn-xs {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--glow-accent);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(244, 33, 46, 0.3);
}
.btn-danger:hover {
  background: var(--red);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-sec);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--text-sec);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(29, 155, 240, 0.4);
}

/* Ripple effect */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.btn:active::after {
  transform: scale(2.5);
  opacity: 1;
  transition: 0s;
}

/* ===== STATS SECTION ===== */
.stats-section {
  margin-top: 28px;
}

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

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: var(--transition);
  animation: cardSlideUp 0.5s ease both;
}

.stat-card:hover {
  border-color: rgba(47, 51, 54, 0.9);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }

.stat-card-label, .overview-label, .actions-label {
  font-size: 12px;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Main stat card */
.stat-main {
  background: linear-gradient(135deg, #16181C 0%, #1a1d22 100%);
}

.stat-numbers {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
}

.stat-num-big {
  font-size: 40px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
}

.stat-slash {
  font-size: 24px;
  color: var(--text-ter);
  font-weight: 300;
}

.stat-num-total {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-sec);
  font-variant-numeric: tabular-nums;
}

.stat-pct-badge {
  margin-left: auto;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(29,155,240,0.25);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: var(--transition);
}

.stat-pct-badge.complete {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(0,186,124,0.25);
}

/* Progress track */
.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #5eafff);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  animation: shimmer 2s ease infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-40px); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: translateX(0); opacity: 0; }
}

.progress-fill.complete {
  background: linear-gradient(90deg, var(--green), #00d98f);
}

.stat-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.stat-footer-text {
  font-size: 11px;
  color: var(--text-ter);
}

/* Badge card */
.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.badge-emoji {
  font-size: 48px;
  line-height: 1;
  transition: var(--transition-slow);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  animation: badgePop 0.4s ease;
}

@keyframes badgePop {
  0%   { transform: scale(0.7); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

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

.badge-desc {
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.4;
  max-width: 160px;
}

.badge-tiers {
  display: flex;
  gap: 16px;
  margin-top: auto;
  padding-top: 8px;
}

.badge-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: 0.3;
  transition: var(--transition);
}

.badge-tier.unlocked {
  opacity: 1;
}

.badge-tier span:first-child {
  font-size: 20px;
}

.tier-label {
  font-size: 10px;
  color: var(--text-ter);
  font-variant-numeric: tabular-nums;
}

/* Section overview card */
.section-overview-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section-mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  flex: 1;
}

.mini-section-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-section-name {
  font-size: 12px;
  color: var(--text-sec);
  width: 120px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-progress-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.mini-progress-fill.complete {
  background: var(--green);
}

.mini-section-pct {
  font-size: 11px;
  color: var(--text-ter);
  font-variant-numeric: tabular-nums;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

.data-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== SEARCH ===== */
.search-wrapper {
  margin: 24px 0 20px;
}

.search-box {
  position: relative;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-ter);
  pointer-events: none;
}

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

.search-input::placeholder {
  color: var(--text-ter);
}

.search-input:focus {
  border-color: var(--accent);
  background: rgba(22, 24, 28, 0.9);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-ter);
  padding: 4px;
  border-radius: var(--radius-xs);
  display: flex;
  transition: var(--transition);
}

.search-clear-btn:hover {
  color: var(--text);
}

/* ===== NO RESULTS ===== */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-sec);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.no-results p {
  font-size: 15px;
}

/* ===== SECTIONS GRID ===== */
.sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* ===== SECTION CARD ===== */
.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: var(--transition);
  animation: cardSlideUp 0.5s ease both;
}

.section-card:hover {
  border-color: rgba(47, 51, 54, 0.9);
  box-shadow: var(--shadow-md);
}

.section-card[data-wide="true"] {
  grid-column: span 2;
}

.section-card.search-hidden {
  display: none;
}

/* Card header */
.section-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.section-title-group {
  flex: 1;
  min-width: 0;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.section-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.section-target {
  font-size: 11px;
  color: var(--text-ter);
  margin-top: 3px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.section-pct-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(29,155,240,0.2);
  border-radius: 999px;
  padding: 3px 9px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  transition: var(--transition);
}

.section-pct-chip.complete {
  color: var(--green);
  background: var(--green-dim);
  border-color: rgba(0,186,124,0.2);
}

/* Progress area */
.section-progress-area {
  margin-bottom: 16px;
}

.section-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.section-progress-label {
  font-size: 12px;
  color: var(--text-sec);
  font-weight: 500;
  white-space: nowrap;
}

.section-progress-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.section-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
}

.section-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #5eafff);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-progress-fill.complete {
  background: linear-gradient(90deg, var(--green), #00d98f);
}

/* Card actions */
.section-card-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* ===== BOXES GRID ===== */
.boxes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Individual box */
.activity-box {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.03);
  color: var(--text-sec);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  position: relative;
  outline: none;
  flex-shrink: 0;
}

.activity-box:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(29,155,240,0.15), var(--shadow-sm);
}

.activity-box:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.activity-box:active {
  transform: scale(0.93);
}

.activity-box.completed {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 0 0 2px rgba(0,186,124,0.2);
  animation: boxComplete 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.activity-box.completed:hover {
  background: #00a86e;
  border-color: #00a86e;
  transform: scale(1.08);
  box-shadow: var(--glow-green), 0 0 0 2px rgba(0,186,124,0.2);
}

.activity-box.box-new {
  animation: boxAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes boxComplete {
  0%   { transform: scale(0.85); }
  60%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes boxAppear {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ===== ANALYTICS SECTION ===== */
.analytics-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 28px;
  animation: cardSlideUp 0.5s ease 0.3s both;
}

.analytics-header {
  margin-bottom: 24px;
}

.analytics-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  margin-bottom: 4px;
}

.analytics-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.analytics-sub {
  font-size: 12px;
  color: var(--text-sec);
  margin-left: 28px;
}

.analytics-chart-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.analytics-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 40px;
}

.analytics-bar-outer {
  width: 100%;
  height: 80px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.analytics-bar-inner {
  width: 100%;
  background: linear-gradient(180deg, var(--accent), rgba(29,155,240,0.6));
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  transition: height 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.analytics-bar-inner.today {
  background: linear-gradient(180deg, var(--green), rgba(0,186,124,0.6));
}

.analytics-bar-pct {
  font-size: 10px;
  color: var(--text-ter);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.analytics-bar-day {
  font-size: 11px;
  color: var(--text-sec);
  font-weight: 500;
}

.analytics-bar-day.today {
  color: var(--green);
  font-weight: 700;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

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

.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modalSlideUp {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1);      opacity: 1; }
}

.modal-icon-wrap {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.modal-body {
  font-size: 14px;
  color: var(--text-sec);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-number-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  padding: 12px;
  margin-bottom: 24px;
  outline: none;
  transition: var(--transition);
  font-variant-numeric: tabular-nums;
}

.modal-number-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 11px 18px;
  font-size: 14px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1E2124;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  max-width: 320px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: rgba(0,186,124,0.4);
  background: rgba(0,186,124,0.1);
  color: var(--green);
}

.toast.error {
  border-color: rgba(244,33,46,0.4);
  background: rgba(244,33,46,0.1);
  color: var(--red);
}

.toast.info {
  border-color: rgba(29,155,240,0.4);
  background: rgba(29,155,240,0.1);
  color: var(--accent);
}

/* ===== FOOTER ===== */
.app-footer {
  text-align: center;
  padding: 20px 0;
  font-size: 12px;
  color: var(--text-ter);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.app-footer strong {
  color: var(--accent);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #536471;
}

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-overview-card {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .header-inner {
    gap: 12px;
    flex-wrap: wrap;
  }

  .header-center {
    width: 100%;
    order: 3;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .header-actions {
    order: 2;
  }

  .sections-grid {
    grid-template-columns: 1fr;
  }

  .section-card[data-wide="true"] {
    grid-column: span 1;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-overview-card {
    grid-column: span 1;
  }

  .stat-num-big {
    font-size: 32px;
  }

  .activity-box {
    width: 38px;
    height: 38px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .app {
    padding: 0 12px 80px;
  }

  .header {
    margin: 0 -12px;
    padding: 0 12px;
  }

  .header-inner {
    padding: 10px 0;
  }

  .brand-title {
    font-size: 16px;
  }

  .header-actions {
    gap: 6px;
  }

  .btn-sm {
    font-size: 12px;
    padding: 7px 10px;
  }

  .section-card {
    padding: 18px;
  }

  .activity-box {
    width: 36px;
    height: 36px;
    font-size: 10px;
  }

  .boxes-grid {
    gap: 5px;
  }

  .stat-card {
    padding: 18px;
  }

  .analytics-section {
    padding: 20px;
  }

  .badge-tiers {
    gap: 12px;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
