:root {
  --bg: #061321;
  --bg-panel: #0f2235;
  --bg-panel-alt: #162b42;
  --line: rgba(135, 177, 221, 0.25);
  --text: #e7f0ff;
  --muted: #9bb0cb;
  --accent: #4bc3ff;
  --accent-strong: #2daaf5;
  --danger: #ff6b7d;
  --success: #36d18a;
  --warning: #ffc857;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at 15% 15%, #1b3654, #061321 55%);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #88d7ff;
}

.page-shell {
  width: min(1200px, 94vw);
  margin: 1.5rem auto 2rem;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(460px, 94vw);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(15, 34, 53, 0.95), rgba(8, 22, 35, 0.95));
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: 0 18px 48px rgba(4, 12, 20, 0.45);
}

body.login-page {
  background:
    linear-gradient(160deg, rgba(6, 8, 12, 0.82), rgba(6, 8, 12, 0.58)),
    url('/assets/images/famille-palmer-login.png') center center / cover no-repeat fixed,
    radial-gradient(circle at 15% 15%, #1b3654, #061321 55%);
}

body.login-page .auth-shell {
  position: relative;
}

body.login-page .auth-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 30, 30, 0.18), rgba(7, 10, 14, 0.28) 58%),
    linear-gradient(180deg, rgba(4, 5, 7, 0.18), rgba(4, 5, 7, 0.56));
}

body.login-page .auth-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 85, 85, 0.32);
  background: linear-gradient(145deg, rgba(16, 12, 14, 0.9), rgba(10, 10, 14, 0.9));
  box-shadow:
    0 20px 58px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(255, 86, 86, 0.1);
  backdrop-filter: blur(3px);
}

body.login-page .badge {
  border-color: rgba(255, 100, 100, 0.7);
  color: #ffdada;
  background: rgba(116, 12, 12, 0.35);
}

.badge {
  display: inline-block;
  border: 1px solid rgba(75, 195, 255, 0.6);
  color: #bce8ff;
  border-radius: 999px;
  padding: 0.16rem 0.62rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

h1,
h2,
h3 {
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(1.5rem, 2vw, 2rem);
}

h2 {
  font-size: 1.15rem;
}

p.muted,
small.muted {
  color: var(--muted);
}

.mdt-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 34, 53, 0.9);
  margin-bottom: 1rem;
}

.mdt-links {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.mdt-links a {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.35rem 0.56rem;
  color: var(--muted);
}

.mdt-links a.active,
.mdt-links a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(75, 195, 255, 0.12);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.panel {
  border: 1px solid var(--line);
  background: rgba(15, 34, 53, 0.88);
  border-radius: 12px;
  padding: 1rem;
}

.panel.alt {
  background: rgba(22, 43, 66, 0.92);
}

.stat {
  font-size: 1.7rem;
  font-weight: 600;
}

label {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0.2rem 0 0.4rem;
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(135, 177, 221, 0.3);
  background: #0d1f31;
  color: var(--text);
  padding: 0.62rem 0.7rem;
  font-size: 0.95rem;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

button {
  cursor: pointer;
  font-weight: 600;
  background: linear-gradient(180deg, #3db9f8, #1f8fd1);
  border: 1px solid rgba(174, 228, 255, 0.35);
  color: #03131f;
}

button:hover {
  filter: brightness(1.08);
}

button.secondary {
  background: #16334f;
  color: var(--text);
}

button.danger {
  background: linear-gradient(180deg, #ff8392, #f45d73);
  border-color: rgba(255, 179, 187, 0.5);
  color: #24080d;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.row > * {
  flex: 1;
  min-width: 130px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

th,
td {
  text-align: left;
  padding: 0.6rem;
  border-bottom: 1px solid rgba(135, 177, 221, 0.2);
  vertical-align: top;
}

th {
  color: #bfd6f2;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.16rem 0.6rem;
  font-size: 0.82rem;
}

.status.plan {
  color: #9fd9ff;
}

.status.run {
  color: var(--warning);
}

.status.done {
  color: var(--success);
}

.cards {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  border: 1px solid var(--line);
  background: rgba(12, 29, 45, 0.9);
  border-radius: 12px;
  padding: 0.9rem;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.evidence-photo {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin: 0.6rem 0;
}

.photo-preview {
  margin: 0.8rem 0;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.5rem;
  background: rgba(11, 30, 48, 0.6);
}

.photo-preview img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

.error,
.success {
  border-radius: 10px;
  margin-top: 0.8rem;
  padding: 0.66rem 0.76rem;
  font-size: 0.9rem;
}

.error {
  background: rgba(255, 107, 125, 0.16);
  border: 1px solid rgba(255, 107, 125, 0.35);
  color: #ffcad2;
}

.success {
  background: rgba(54, 209, 138, 0.16);
  border: 1px solid rgba(54, 209, 138, 0.35);
  color: #b6f5d7;
}

.empty {
  color: var(--muted);
  padding: 0.6rem 0;
}

.hidden {
  display: none;
}

@media (max-width: 700px) {
  .mdt-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-right {
    width: 100%;
    justify-content: space-between;
  }

  table {
    min-width: 620px;
  }
}




@media (max-width: 700px) {
  body.login-page {
    background-attachment: scroll;
    background-position: center top;
  }

  body.login-page .auth-card {
    backdrop-filter: none;
  }
}



body.dashboard-page {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 35, 35, 0.34), rgba(20, 8, 10, 0.95) 58%),
    linear-gradient(180deg, #08090c, #12080a 40%, #09090b);
}

body.dashboard-page .mdt-nav {
  background: rgba(24, 10, 12, 0.9);
  border-color: rgba(255, 90, 90, 0.32);
}

body.dashboard-page .panel {
  background: rgba(22, 10, 12, 0.88);
  border-color: rgba(255, 90, 90, 0.26);
}

body.dashboard-page .panel.alt {
  background: rgba(30, 12, 14, 0.9);
}

body.dashboard-page .badge {
  border-color: rgba(255, 102, 102, 0.7);
  color: #ffd5d5;
  background: rgba(130, 20, 20, 0.3);
}

body.dashboard-page .mdt-links a.active,
body.dashboard-page .mdt-links a:hover {
  border-color: rgba(255, 98, 98, 0.4);
  background: rgba(255, 75, 75, 0.14);
}

body.dashboard-page input,
body.dashboard-page select,
body.dashboard-page textarea {
  background: #1a0f13;
  border-color: rgba(255, 103, 103, 0.28);
}

body.dashboard-page button {
  background: linear-gradient(180deg, #ff6666, #cc2b2b);
  border-color: rgba(255, 178, 178, 0.45);
  color: #24070a;
}

body.dashboard-page button.secondary {
  background: #3a151c;
  color: #ffe7e7;
}

body.dashboard-page button.danger {
  background: linear-gradient(180deg, #ff7a91, #d13655);
  color: #26050d;
}

body.dashboard-page th,
body.dashboard-page td {
  border-bottom-color: rgba(255, 100, 100, 0.22);
}

body.dashboard-page th {
  color: #ffd0d0;
}

.actions-inline {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.actions-inline button {
  width: auto;
  min-width: 110px;
}

.user-inline-input {
  min-width: 170px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}
