/* Виджет «Счётчик дней» — тёмная тема. Палитра согласована с корневым порталом. */
:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --text: #e6e8ee;
  --muted: #9aa0ad;
  --accent: #6ea8fe;
  --accent-strong: #4b8bfd;
  --border: #2b2f3a;
  --error: #ff7a7a;
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.widget {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
}

h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.field { margin-bottom: 16px; }

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="date"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}

input[type="date"]:focus {
  border-color: var(--accent);
}

/* Иконка выбора даты видима на тёмном фоне */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}

button {
  width: 100%;
  padding: 13px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: #0b1020;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

button:hover { background: var(--accent-strong); }
button:active { transform: translateY(1px); }

.result {
  margin-top: 22px;
  padding: 18px 16px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text);
}

.result.is-error {
  color: var(--error);
  border-color: var(--error);
  font-weight: 500;
}

.back {
  display: block;
  margin-top: 20px;
  text-align: center;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.back:hover { text-decoration: underline; }
