/* assets/style.css - Stili base per la webapp Direzione Lavori */

/* Reset minimal */
* { box-sizing: border-box; margin: 0; padding: 0; }
html,body { height: 100%; }

/* Layout e tipografia */
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #222;
  background: #f5f7fa;
  padding: 20px;
}

a { color: #0b6ef6; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.header h1 {
  font-size: 1.4rem;
  color: #17324a;
  margin-bottom: 4px;
}

.small { font-size: 0.9rem; color: #6b7280; }

/* Navigation */
nav a {
  display: inline-block;
  margin-right: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  color: #0b6ef6;
  background: transparent;
}
nav a:hover { background: rgba(11,110,246,0.06); }

/* Card */
.card {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.03);
}

/* Grid stat cards */
.grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.stat {
  flex: 1 1 160px;
  min-width: 160px;
  text-align: center;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(180deg,#fff,#fbfdff);
  border: 1px solid #eef2f7;
}
.stat h2 { font-size: 1.6rem; margin-bottom: 6px; color:#0b6ef6; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e6ecf5;
  border-radius: 6px;
  overflow: hidden;
}
table thead { background: #f6f9fc; color: #24323a; }
table th, table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef3f8;
  font-size: 0.95rem;
  vertical-align: middle;
}
table tbody tr:hover { background: #fbfdff; }

/* Forms */
form label { display: block; margin-bottom: 8px; color: #1f2d3d; }
input[type="text"], input[type="email"], input[type="date"], input[type="password"], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  background: #fff;
  font-size: 1rem;
  color: #0f1724;
  margin-top: 6px;
}
textarea { min-height: 120px; resize: vertical; }
fieldset { border: 1px solid #e6eef8; padding: 10px; border-radius: 6px; margin: 10px 0; }
legend { padding: 0 6px; font-weight: 600; color: #123; }

/* Buttons */
button, input[type="submit"], .btn {
  display: inline-block;
  padding: 8px 12px;
  background: #0b6ef6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
button.secondary, .btn.secondary {
  background: #eef3fb;
  color: #0b6ef6;
  border: 1px solid #d9e7ff;
}
button.danger, .btn.danger {
  background: #e03e3e;
  color: #fff;
}
button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Forms helper */
.form-row { display:flex; gap:12px; align-items:flex-start; }
.form-row > * { flex: 1; }
.help { font-size:0.9rem; color:#6b7280; margin-top:6px; }

/* Media / thumbnails */
figure { margin: 8px; display:inline-block; vertical-align: top; }
figure img { max-width: 240px; height: auto; border-radius:6px; border:1px solid #e6eef8; display:block; }
figcaption { font-size:0.9rem; color:#475569; margin-top:6px; }

/* Footer */
footer { margin-top: 24px; color: #6b7280; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 900px) {
  .grid { flex-direction: column; }
  .header { flex-direction: column; gap: 10px; align-items: flex-start; }
  table th, table td { padding: 8px; font-size: 0.92rem; }
}

/* Tiny utilities */
.text-muted { color: #6b7280; font-size: 0.9rem; }
.mt-8 { margin-top: 8px; }
.mb-8 { margin-bottom: 8px; }
.center { text-align: center; }
