/* ============================================================
   IDMS Kiosk — visual system
   Palette: civic navy + teal + a stamped gold accent,
   like a well-run municipal office, not a generic app.
   ============================================================ */

:root {
  --navy: #16324F;
  --navy-deep: #0E2338;
  --teal: #0E7C7B;
  --gold: #D4A24C;
  --bg: #F4F6F8;
  --paper: #FFFFFF;
  --ink: #1F2933;
  --muted: #5B6B7A;
  --line: #DCE3E9;
  --danger: #B3432B;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 35, 56, 0.12);
}

@font-face { font-family: 'sys'; src: local(''); }

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.kiosk-header {
  background: var(--navy-deep);
  color: #fff;
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid var(--gold);
}

.kiosk-header .brand {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 14px;
}

.kiosk-header .brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  flex-shrink: 0;
}

.kiosk-header .brand small {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: #B9C6D3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kiosk-header .brand .lgu-address {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: #B9C6D3;
  letter-spacing: normal;
  text-transform: none;
  margin-top: 2px;
}

.kiosk-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

.kiosk-title {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--navy);
  margin: 0 0 8px;
}

.kiosk-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 40px;
}

/* --- Office selection grid (touch buttons) --- */
.office-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1000px;
}

.office-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 150px;
  justify-content: center;
}

.office-card:hover, .office-card:active {
  transform: translateY(-4px);
  border-color: var(--teal);
}

.office-card .code {
  font-family: 'IBM Plex Mono', 'Consolas', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--teal);
  text-transform: uppercase;
}

.office-card .name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
}

/* --- Forms --- */
.kiosk-form {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  width: 100%;
  max-width: 560px;
  text-align: left;
}

.kiosk-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 18px 0 6px;
  color: var(--navy);
}

.kiosk-form input[type=text],
.kiosk-form input[type=email],
.kiosk-form input[type=tel],
.kiosk-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
}

.kiosk-form input:focus, .kiosk-form textarea:focus {
  outline: 3px solid var(--teal);
  outline-offset: 1px;
}

.policy-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  font-size: 0.88rem;
  color: var(--muted);
  max-height: 140px;
  overflow-y: auto;
  margin-top: 24px;
}

.policy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.92rem;
}

.policy-check input { width: 20px; height: 20px; margin-top: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 16px 28px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  width: 100%;
  margin-top: 26px;
  transition: background 0.15s ease;
}

.btn:hover { background: #0A5E5D; }
.btn:disabled { background: #A9B4BC; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }

.error-text { color: var(--danger); font-size: 0.85rem; margin-top: 6px; }

/* --- Ticket stub (signature element) --- */
.ticket-stub {
  background: var(--paper);
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  border-radius: 10px 10px 0 0;
  box-shadow: var(--shadow);
  position: relative;
  padding: 34px 30px 26px;
  text-align: center;
}

.ticket-stub::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: -14px;
  height: 28px;
  background:
    radial-gradient(circle at 10px 0, transparent 12px, var(--paper) 13px) top left / 20px 28px repeat-x;
}

.ticket-stub .label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--muted);
}

.ticket-stub .office-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--navy);
  font-size: 1.2rem;
  margin: 6px 0 18px;
}

.ticket-stub .number {
  font-family: 'IBM Plex Mono', 'Consolas', monospace;
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.04em;
  margin: 0;
}

.ticket-stub .meta {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.ticket-actions {
  max-width: 380px;
  margin: 40px auto 0;
  display: flex;
  gap: 12px;
}

/* --- Feedback / star rating --- */
.lang-toggle {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}
.lang-toggle button {
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--navy);
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}
.lang-toggle button.active {
  background: var(--navy);
  color: #fff;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 2.4rem;
  margin: 18px 0;
}
.stars .star {
  cursor: pointer;
  color: var(--line);
  transition: color 0.1s ease;
}
.stars .star.active { color: var(--gold); }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .ticket-stub { box-shadow: none; }
}

@media (max-width: 480px) {
  .kiosk-title { font-size: 1.7rem; }
  .kiosk-form, .kiosk-header { padding: 24px; }
}
