@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --primary:       #00695c;
  --primary-dark:  #004d40;
  --primary-light: #e0f2f1;
  --accent:        #26a69a;
  --text:          #1a2e2b;
  --text-muted:    #546e7a;
  --bg:            #f4f7f6;
  --white:         #ffffff;
  --border:        #cfd8dc;
  --shadow:        0 2px 20px rgba(0, 105, 92, 0.11);
  --radius:        10px;
  --radius-sm:     6px;
}

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: url('../fons.jpg') center top / cover fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Layout ── */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.75rem 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  min-height: 100vh;
}

/* ── Page title ── */
.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.35;
  margin-bottom: 1.1rem;
}

/* ── Nav links ── */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.nav-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.4rem 1rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  transition: background 0.16s, color 0.16s;
}

.nav-link:hover,
.nav-link:focus {
  background: var(--primary);
  color: var(--white);
  outline: none;
}

/* ── Card ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

/* ── Form groups ── */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group select {
  display: block;
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s, box-shadow 0.16s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%23546e7a' d='M6 7L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 105, 92, 0.13);
}

/* ── Checkbox ── */
.checkbox-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.35rem;
}

.checkbox-group input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  line-height: 1.55;
}

/* ── Submit button ── */
.btn-submit {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: var(--primary);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.16s, transform 0.1s;
}

.btn-submit:hover,
.btn-submit:focus {
  background: var(--primary-dark);
  outline: none;
}

.btn-submit:active {
  transform: scale(0.99);
}

/* ── Alerts ── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.alert-success {
  background: var(--primary-light);
  border: 1.5px solid var(--accent);
  color: var(--primary-dark);
}

.alert-success h3 {
  margin-bottom: 0.5rem;
}

.alert-success a {
  color: var(--primary);
  font-weight: 600;
}

.alert-error {
  background: #ffebee;
  border: 1.5px solid #ef9a9a;
  color: #b71c1c;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* ── Results table ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table#res {
  width: 100% !important;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--white);
}

table#res thead th {
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table#res tbody td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table#res tbody tr:last-child td {
  border-bottom: none;
}

table#res tbody tr:hover td {
  background: var(--primary-light);
}

/* DataTables overrides */
.dataTables_wrapper {
  padding: 0;
}

.dataTables_wrapper .dataTables_filter {
  margin-bottom: 1rem;
  text-align: left;
}

.dataTables_wrapper .dataTables_filter label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dataTables_wrapper .dataTables_filter input {
  padding: 0.45rem 0.8rem;
  margin-left: 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.16s;
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,105,92,0.12);
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding: 0;
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .card {
    padding: 1.25rem;
  }

  .page-title {
    font-size: 1.15rem;
  }

  table#res thead th,
  table#res tbody td {
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
  }
}
