/* --- Reset & base --- */
* { box-sizing: border-box; }

:root {
  --bg-page: #eef1f5;
  --bg-card: #fff;
  --nav-bg: #2d3748;
  --nav-hover: #4a5568;
  --accent: #3182ce;
  --accent-hover: #2b6cb0;
  --text: #2d3748;
  --text-muted: #718096;
  --border: #e2e8f0;
  --border-focus: #3182ce;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 4px 12px rgba(0,0,0,.08);
  --radius: 8px;
  --radius-sm: 6px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.5;
}

/* --- Navbar --- */
.nav {
  background: var(--nav-bg);
  padding: 0.6rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.nav a {
  color: rgba(255,255,255,.92);
  text-decoration: none;
  margin-right: 1.25rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background .15s, color .15s;
}

.nav a:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.nav a.active {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* --- Main content --- */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  background: var(--bg-card);
  min-height: 80vh;
  box-shadow: var(--shadow);
  border-radius: 0 0 var(--radius) var(--radius);
}

h1 {
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

h2 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

h3 {
  font-size: 1rem;
  margin-top: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

/* --- Forms --- */
.form { margin: 1.25rem 0; }

.field { margin-bottom: 1rem; }

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="date"],
.field input[type="time"],
.field input[type="datetime-local"],
.field select,
.field textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(49,130,206,.15);
}

.checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.checkboxes label {
  font-weight: normal;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

/* --- Buttons --- */
button {
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  margin-right: 0.5rem;
  margin-top: 0.3rem;
  font-weight: 500;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--nav-bg);
  color: #fff;
  transition: background .15s, transform .1s;
}

button:hover:not(:disabled) {
  background: var(--nav-hover);
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button[type="submit"] {
  background: var(--accent);
}

button[type="submit"]:hover:not(:disabled) {
  background: var(--accent-hover);
}

/* --- Toolbar & table --- */
.toolbar {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th,
.table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.table th {
  background: #f7fafc;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.table tbody tr:hover {
  background: #f0f4f8;
}

.out {
  margin: 0.5rem 0;
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Dashboard --- */
.dashboard-hero {
  text-align: center;
  padding: 2.5rem 1rem;
}

.dashboard-hero h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.dashboard-hero .subtitle {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 1rem;
}

.btn-start {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(49,130,206,.35);
  transition: background .15s, box-shadow .15s, transform .1s;
}

.btn-start:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(49,130,206,.4);
}

.btn-start:active {
  transform: scale(0.98);
}

.dashboard-links {
  margin-top: 2.5rem;
  text-align: left;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  background: #f7fafc;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.dashboard-links h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dashboard-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-links li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.dashboard-links li:last-child {
  border-bottom: none;
}

.dashboard-links li a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color .15s;
}

.dashboard-links li a:hover {
  color: var(--accent-hover);
}

.dashboard-links li span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Wizard --- */
.wizard-steps {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.75rem;
}

.wizard-step {
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}

.wizard-step.active {
  font-weight: 600;
  color: var(--accent);
  background: rgba(49,130,206,.08);
}

.wizard-step.completed {
  color: var(--text-muted);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.preview-scroll {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafbfc;
}

.preview-scroll .table { margin-top: 0; }

.summary-box {
  background: #f7fafc;
  border: 1px solid var(--border);
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: var(--radius-sm);
}

.summary-box ul { margin: 0; padding-left: 1.25rem; }

.sms-text-box {
  background: #f7fafc;
  border: 1px solid var(--border);
  padding: 1rem;
  margin: 0.5rem 0;
  white-space: pre-wrap;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
