/* base.css — reset, tipografia di base, primitive di pagina e form.
   Condiviso dallo shell admin (base.html) e dai template standalone. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Alpine.js: hide x-cloak elements until Alpine initializes */
[x-cloak] { display: none !important; }

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--canvas);
}

/* Page body */
.page {
  padding: 40px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Page heading */
h1.page-title {
  font-family: 'EB Garamond', 'Times New Roman', serif;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* Section label */
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 8px;
}

/* Inputs */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 12px 16px;
  height: 44px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  width: 100%;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}

textarea { height: auto; }

/* Custom select: hide the native arrow, draw a clean chevron */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23777169' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(12, 10, 9, 0.08);
}

label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

@media (max-width: 767px) {
  .page { padding: 24px 16px; }
}
