﻿:root {
  --ec-bg: #08090b;
  --ec-panel: #101216;
  --ec-panel-2: #171a20;
  --ec-text: #f3f3f3;
  --ec-muted: #b4bac4;
  --ec-line: #2a2f37;
  --ec-accent: #ffd700;
  --ec-accent-soft: rgba(255, 215, 0, 0.2);
  --ec-accent-glow: rgba(255, 215, 0, 0.35);
  --ec-low: #74652a;
  --ec-med: #d4af37;
  --ec-high: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(1000px 500px at 50% -10%, rgba(255, 215, 0, 0.14), rgba(255, 215, 0, 0) 60%),
    radial-gradient(700px 280px at 15% 0%, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0) 65%),
    #08090b;
  color: var(--ec-text);
}

.ec-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ec-accent-soft);
  background: rgba(8, 9, 11, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.ec-brand { color: var(--ec-accent); text-decoration: none; font-weight: 800; letter-spacing: 0.08em; text-shadow: 0 0 14px rgba(255, 215, 0, 0.25); }
.ec-nav { display: flex; gap: 12px; }
.ec-nav a { color: var(--ec-muted); text-decoration: none; font-size: 14px; }
.ec-nav a[aria-current="page"] { color: var(--ec-text); }
.ec-nav a:hover { color: var(--ec-accent); }

.ec-page { max-width: 1200px; margin: 0 auto; padding: 16px; }
.ec-hero h1 { margin: 0 0 8px; font-size: 28px; }
.ec-hero p { margin: 0; color: var(--ec-muted); }

.ec-filters {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--ec-accent-soft);
  border-radius: 12px;
  background: var(--ec-panel);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.06), 0 18px 42px rgba(0, 0, 0, 0.42);
}

.ec-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.ec-toggle-filters {
  background: rgba(255, 215, 0, 0.14);
  color: #f9e27d;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ec-toggle-filters:hover {
  background: rgba(255, 215, 0, 0.22);
}
.ec-filters-panel {
  margin-top: 10px;
}
.ec-filters-panel.is-collapsed {
  display: none;
}
.ec-filters-panel.is-open {
  display: block;
}

.ec-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ec-field label { font-size: 12px; color: var(--ec-muted); }
.ec-field input,
.ec-field select,
.ec-field button,
.ec-field .ec-chipgroup {
  background: var(--ec-panel-2);
  color: var(--ec-text);
  border: 1px solid var(--ec-line);
  border-radius: 8px;
  min-height: 38px;
  padding: 8px;
}
.ec-field input:focus,
.ec-field select:focus {
  outline: none;
  border-color: var(--ec-accent);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.12);
}

.ec-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 96px;
  overflow: auto;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--ec-line);
  background: var(--ec-panel-2);
}

.ec-pill {
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--ec-line);
  padding: 4px 8px;
  cursor: pointer;
  user-select: none;
  background: #13161b;
}
.ec-pill.active {
  border-color: var(--ec-accent);
  color: #121212;
  background: linear-gradient(180deg, #ffe36a, #ffd700);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.28);
}

.ec-status { margin-top: 12px; min-height: 24px; color: var(--ec-muted); }

.ec-list { margin-top: 10px; }
.ec-day {
  margin-bottom: 16px;
  border: 1px solid var(--ec-accent-soft);
  border-radius: 12px;
  overflow: hidden;
  background: #111318;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}
.ec-day-header {
  position: relative;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  background: #14171d;
  border-bottom: 1px solid var(--ec-accent-soft);
  font-weight: 700;
  color: #f7e08a;
  box-shadow: inset 0 -1px 0 rgba(255,215,0,0.08);
}
.ec-row {
  display: grid;
  grid-template-columns: 90px 84px 92px minmax(220px, 1fr) 120px 100px 100px 100px 98px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #1c2731;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.ec-row:hover {
  background: rgba(255, 215, 0, 0.08);
}
.ec-row:active {
  transform: scale(0.995);
}
.ec-row.ec-row-click {
  background: rgba(255, 215, 0, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.22);
}
.ec-row:last-child { border-bottom: 0; }
.ec-cell-muted { color: var(--ec-muted); }
.ec-title { font-weight: 600; }
.ec-flag { margin-right: 6px; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.ec-cell { min-width: 0; }
.ec-time-main { display: block; font-weight: 700; }
.ec-time-sub { display: block; font-size: 11px; color: #9aa2af; margin-top: 1px; }
.ec-cell-actual-good { color: #4ade80; font-weight: 700; }
.ec-cell-actual-bad { color: #f87171; font-weight: 700; }
.ec-cell-actual-neutral { color: var(--ec-text); }

.ec-share-btn {
  background: rgba(255, 215, 0, 0.14);
  color: #f9e27d;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
}
.ec-share-btn:hover {
  background: rgba(255, 215, 0, 0.26);
}
.ec-share-btn--drawer {
  margin-top: 10px;
}

.ec-importance { display: inline-flex; align-items: center; gap: 6px; }
.ec-badge {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.35);
}
.ec-badge-1 { background: var(--ec-low); }
.ec-badge-2 { background: var(--ec-med); }
.ec-badge-3 { background: var(--ec-high); }

.ec-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  z-index: 60;
  background: rgba(10, 12, 16, 0.96);
  border-left: 1px solid var(--ec-accent-soft);
  transition: right 0.24s ease;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}
.ec-drawer.open { right: 0; }
.ec-drawer-close {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ec-accent-soft);
  padding: 12px;
  background: rgba(255, 215, 0, 0.08);
  color: var(--ec-text);
}
.ec-drawer-content {
  padding: 14px;
  color: var(--ec-muted);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.ec-drawer-content::-webkit-scrollbar,
.ec-history-chart-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.ec-drawer-content::-webkit-scrollbar-track,
.ec-history-chart-wrap::-webkit-scrollbar-track {
  background: rgba(255, 215, 0, 0.06);
}
.ec-drawer-content::-webkit-scrollbar-thumb,
.ec-history-chart-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.24);
  border-radius: 999px;
}
.ec-drawer-content,
.ec-history-chart-wrap {
  scrollbar-color: rgba(255, 215, 0, 0.24) rgba(255, 215, 0, 0.06);
  scrollbar-width: thin;
}
.ec-drawer-content.ec-drawer-content-animate {
  animation: drawerFadeIn 0.24s ease;
}
.ec-drawer-content h3 { color: var(--ec-text); margin-top: 0; }
.ec-history-placeholder {
  border: 1px dashed var(--ec-accent-soft);
  border-radius: 8px;
  padding: 10px;
}
.ec-history {
  margin-top: 10px;
  border: 1px solid var(--ec-accent-soft);
  border-radius: 10px;
  padding: 10px;
  background: #0f141b;
}
.ec-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ec-history-head strong {
  color: var(--ec-text);
}
.ec-history-head span {
  color: #9aa2af;
  font-size: 12px;
}
.ec-history-chart {
  width: 100%;
  min-width: 340px;
  height: auto;
  display: block;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.01));
  border: 1px solid rgba(255, 215, 0, 0.14);
}
.ec-history-line {
  fill: none;
  stroke: #f3d965;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ec-history-chart-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}
.ec-history-dot {
  fill: #f3d965;
}
.ec-history-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.ec-history-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 5px;
}
.ec-history-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.ec-history-list strong {
  color: var(--ec-text);
}

.ec-skeleton .ec-row {
  pointer-events: none;
  opacity: 0.6;
}
.ec-skeleton-block {
  height: 12px;
  border-radius: 5px;
  background: linear-gradient(90deg, #202b35, #2a3743, #202b35);
  background-size: 200% 100%;
  animation: ecPulse 1.1s infinite;
}
@keyframes ecPulse {
  0% { background-position: 0 0; }
  100% { background-position: -200% 0; }
}

@keyframes drawerFadeIn {
  0% {
    opacity: 0;
    transform: translateX(10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.ec-empty,
.ec-error {
  border: 1px solid var(--ec-accent-soft);
  border-radius: 12px;
  padding: 14px;
  background: #11151b;
}
.ec-error { border-color: #7f1d1d; color: #fecaca; }

@media (max-width: 980px) {
  .ec-page { padding: 12px; }
  .ec-hero h1 { font-size: 22px; }
  .ec-filters { padding: 10px; border-radius: 10px; }
  .ec-filter-grid { grid-template-columns: 1fr; gap: 8px; }
  .ec-multi { max-height: none; overflow: auto; white-space: nowrap; flex-wrap: nowrap; }
  .ec-pill { white-space: nowrap; }
  .ec-row {
    grid-template-columns: 56px 70px minmax(0, 1fr) 72px;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid #1c2731;
    margin: 0;
    background: transparent;
  }
  .ec-cell {
    display: block;
    font-size: 13px;
    color: #e8ebf0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ec-cell::before {
    content: none;
  }
  .ec-cell-time {
    font-weight: 700;
    color: #f3d965;
    white-space: normal;
  }
  .ec-cell-time .ec-time-sub {
    color: #9aa2af;
    font-size: 10px;
  }
  .ec-cell-currency {
    font-weight: 600;
  }
  .ec-cell-country,
  .ec-cell-importance,
  .ec-cell-forecast,
  .ec-cell-previous,
  .ec-cell-share {
    display: none;
  }
  .ec-cell-actual {
    display: block;
    text-align: right;
  }
  .ec-cell-title {
    min-width: 0;
  }
  .ec-cell-importance .ec-cell-muted {
    display: none;
  }
  .ec-cell-importance .ec-importance {
    justify-content: flex-end;
    width: 100%;
  }
  .ec-share-btn {
    width: 100%;
    min-height: 36px;
  }
  .ec-day {
    overflow: hidden;
    padding-bottom: 0;
  }
  .ec-day-header {
    position: relative;
    top: 0;
    z-index: 1;
    border-radius: 10px 10px 0 0;
  }
  .ec-drawer {
    width: 100%;
    right: -100%;
    border-left: 0;
    border-top: 1px solid var(--ec-accent-soft);
    top: auto;
    bottom: 0;
    height: 88vh;
    border-radius: 16px 16px 0 0;
  }
  .ec-drawer.open { right: 0; }
  .ec-nav { display: none; }
  .ec-history-head {
    flex-direction: column;
    align-items: flex-start;
  }
}


