﻿:root {
  --blue: #185adb;
  --dark: #102033;
  --light: #f5f8fc;
  --green: #128c4a;
  --red: #c62828;
  --gray: #6b7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--light);
  color: var(--dark);
}

header {
  background: white;
  padding: 18px 28px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: normal;
  color: var(--blue);
}

nav a, nav button { margin-left: 10px; }

.session-status {
  display: inline-block;
  margin-left: 10px;
  font-size: 14px;
  font-weight: bold;
  color: var(--dark);
}

main {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 18px;
}

.hero, .card {
  background: white;
  padding: 26px;
  border-radius: 18px;
  box-shadow: 0 5px 25px rgba(0,0,0,.08);
  margin-bottom: 20px;
}

h1 { font-size: 38px; margin-top: 0; }
h2 { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}

label {
  display: block;
  font-weight: bold;
  margin-top: 12px;
}

input, select, textarea {
  width: 100%;
  padding: 11px;
  margin-top: 5px;
  border-radius: 9px;
  border: 1px solid #cfd7e2;
  font-size: 16px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  padding: 6px;
  font-size: 18px;
  line-height: 1;
}

.password-toggle:hover {
  color: var(--dark);
}

button, .button {
  background: var(--blue);
  color: white;
  border: 0;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
}

button.secondary, .button.secondary { background: var(--gray); }
button.danger, .button.danger { background: var(--red); }
button.green, .button.green { background: var(--green); }

.ihss-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--red);
  color: white;
  border: 0;
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
  animation: ihssFlash 1s infinite;
}

@keyframes ihssFlash {
  0%, 100% {
    background: var(--red);
    box-shadow: 0 0 0 rgba(198, 40, 40, 0);
  }
  50% {
    background: #ff1f1f;
    box-shadow: 0 0 0 4px rgba(198, 40, 40, .22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ihss-alert {
    animation: none;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #eef7f1;
  color: var(--green);
  border: 1px solid #b9dfc7;
  font-weight: bold;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.claim-box {
  flex: 1 1 100%;
  margin-top: 4px;
}

.map-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  margin-right: 7px;
  transform: rotate(-45deg);
  vertical-align: -1px;
}

.map-icon::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  margin: 2px;
  border-radius: 50%;
  background: currentColor;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(16, 32, 51, .58);
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
}

.modal-close {
  float: right;
}

.stepper {
  display: grid;
  grid-template-columns: 56px minmax(90px, 1fr) 56px;
  gap: 10px;
  align-items: center;
  margin: 14px 0 18px;
  max-width: 260px;
}

.stepper input {
  text-align: center;
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

.stepper-button {
  width: 56px;
  height: 48px;
  padding: 0;
  font-size: 26px;
  line-height: 1;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.stat {
  background: #eef4ff;
  padding: 18px;
  border-radius: 14px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 34px;
  color: var(--blue);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 13px;
}

.open { background: var(--green); }
.occupied { background: var(--red); }

.notice {
  padding: 12px;
  border-radius: 10px;
  background: #fff7d6;
  margin: 12px 0;
}

.error { color: var(--red); font-weight: bold; }
.success { color: var(--green); font-weight: bold; }

.result {
  border: 1px solid #dde3ee;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  background: white;
}

@media (max-width: 760px) {
  .grid, .stat-row { grid-template-columns: 1fr; }
  header { display: block; }
  nav { margin-top: 12px; }
  .session-status { display: block; margin: 10px 0 0; }
  h1 { font-size: 30px; }
}
