:root {
  --bg: #0f172a;
  --card: #1e293b;
  --input: #334155;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --btn: #475569;
  --btn-hover: #64748b;
  --success: #10b981;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===== Основний стиль сторінки ===== */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  padding: 20px;
  margin: 0;
}

/* ===== Заголовки ===== */
h1, h2 {
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 600;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
  color: var(--accent);
}

/* ===== Секції ===== */
section {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: 0 0 0 1px var(--line), 0 8px 20px rgba(0,0,0,0.15);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

/* ===== Текстові елементи ===== */
label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 4px;
}

/* ===== Інпути ===== */
input, select, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  margin-bottom: 16px;
  font-size: 15px;
  transition: border 0.2s, background 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
  background: var(--panel-bg);
}

/* ===== Сітка ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-block;
  padding: 8px 18px;
  font-size: 14px;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ===== Хінт / повідомлення ===== */
.hint {
  background: var(--success);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  margin-top: 16px;
  display: none;
  transition: opacity 0.3s ease;
}

/* ===== Хедер ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem 0.5rem;
  flex-wrap: wrap;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

header h1 {
  font-size: 24px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

a.btn, a.btn:focus, a.btn:active, a.btn:visited {
  text-decoration: none;
  outline: none !important;
  box-shadow: none !important;
}

/* ===== Модальне вікно ===== */
#smartSuggestModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#smartSuggestModal.active {
  display: flex;
}

.modal-content {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ===== Тема — світла ===== */
.theme-light {
  --bg: #f1f5f9;
  --text: #1e293b;
  --card: #ffffff;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #ef4444;
  --muted: #64748b;
  --line: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --panel-bg: #f8fafc;
}

/* ===== Тема — темна ===== */
.theme-dark {
  --bg: #0f172a;
  --text: #e2e8f0;
  --card: #1e293b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #ef4444;
  --muted: #94a3b8;
  --line: #334155;
  --shadow: rgba(0, 0, 0, 0.25);
}
.theme-dark section:hover {
  box-shadow: 0 0 0 1px var(--accent), 0 12px 25px rgba(59, 130, 246, 0.3);
}

/* ===== Адаптив ===== */
@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
}
