/* Stile condiviso delle pagine pubbliche del portale clienti (invio richiesta, login,
   registrazione, i miei lavori). Le pagine interne staff usano invece style.css. */

:root {
  --p-primary: #0d6e8c;
  --p-primary-dark: #0a586f;
  --p-accent: #2f6fed;
  --p-bg: #eef4f7;
  --p-card: #ffffff;
  --p-text: #1f2430;
  --p-muted: #62748a;
  --p-border: #e1e8ed;
  --p-success-bg: #def7ec;
  --p-success-text: #03543f;
  --p-error-bg: #fde8e8;
  --p-error-text: #9b1c1c;
  --p-radius: 14px;
}

* { box-sizing: border-box; }

body.portale-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, var(--p-bg) 0%, #f6f9fb 260px, #f6f9fb 100%);
  color: var(--p-text);
  min-height: 100vh;
}

.p-shell { max-width: 640px; margin: 0 auto; padding: 0 16px 60px; }
.p-shell.p-wide { max-width: 760px; }

/* ---------- Intestazione con marchio ---------- */
.p-header { padding: 34px 0 22px; display: flex; align-items: center; gap: 14px; }
.p-header .p-logo {
  width: 46px; height: 46px; border-radius: 12px; background: var(--p-primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(13, 110, 140, .35);
}
.p-header .p-logo svg { width: 26px; height: 26px; }
.p-header h1 { margin: 0; font-size: 21px; color: var(--p-primary-dark); }
.p-header .p-sub { margin: 2px 0 0; color: var(--p-muted); font-size: 13.5px; }
.p-header-azioni { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.p-header-azioni a { color: var(--p-accent); font-size: 13.5px; text-decoration: none; font-weight: 600; }
.p-header-azioni a:hover { text-decoration: underline; }

/* ---------- Card ---------- */
.p-card {
  background: var(--p-card); border-radius: var(--p-radius); padding: 22px 24px;
  margin-bottom: 18px; box-shadow: 0 1px 3px rgba(20, 40, 60, .06), 0 8px 24px rgba(20, 40, 60, .04);
  border: 1px solid var(--p-border);
}
.p-card h2 { margin: 0 0 14px; font-size: 15px; color: var(--p-primary-dark); display: flex; align-items: center; gap: 8px; }

/* ---------- Campi form ---------- */
.p-campo { margin-bottom: 18px; }
.p-campo:last-child { margin-bottom: 0; }
.p-campo label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.p-campo .p-hint { color: var(--p-muted); font-size: 12.5px; margin: 4px 0 0; }
.p-campo input[type=text], .p-campo input[type=email], .p-campo input[type=password],
.p-campo input[type=date], .p-campo textarea, .p-campo select, .p-campo input[type=file] {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--p-border); border-radius: 9px;
  font-size: 15px; font-family: inherit; background: #fbfcfd; transition: border-color .15s;
}
.p-campo input:focus, .p-campo textarea:focus, .p-campo select:focus {
  outline: none; border-color: var(--p-accent); background: #fff;
}
.p-campo textarea { min-height: 90px; resize: vertical; }

/* ---------- Bottoni ---------- */
.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--p-accent); color: #fff; border: none; padding: 12px 20px;
  border-radius: 9px; cursor: pointer; font-size: 15px; font-weight: 600;
  text-decoration: none; transition: filter .15s, transform .1s;
}
.p-btn:hover { filter: brightness(1.08); }
.p-btn:active { transform: scale(.98); }
.p-btn.p-btn-full { width: 100%; }
.p-btn.p-btn-secondary { background: #eef1f5; color: var(--p-text); }
.p-btn.p-btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }

/* ---------- Messaggi ---------- */
.p-flash { padding: 11px 15px; border-radius: 9px; margin-bottom: 10px; font-size: 14px; }
.p-flash-success { background: var(--p-success-bg); color: var(--p-success-text); }
.p-flash-error { background: var(--p-error-bg); color: var(--p-error-text); }

/* ---------- Badge stato ---------- */
.p-badge { display: inline-block; padding: 4px 11px; border-radius: 20px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .2px; }
.p-badge-nuova { background: #2f6fed; }
.p-badge-in_lavorazione { background: #d68910; }
.p-badge-in_attesa_cliente { background: #8a97a0; }
.p-badge-completata { background: #1a8a4a; }
.p-badge-annullata { background: #c0392b; }

.p-link-secondario { text-align: center; margin-top: 18px; font-size: 14px; color: var(--p-muted); }
.p-link-secondario a { color: var(--p-accent); font-weight: 600; text-decoration: none; }
.p-link-secondario a:hover { text-decoration: underline; }

.hp-campo { position: absolute; left: -9999px; top: -9999px; }
