:root {
  --bg: #07111f;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f7fbff;
  --muted: #9fb0c5;
  --line: rgba(255, 255, 255, 0.14);
  --gold: #f5c542;
  --green: #39d98a;
  --blue: #48a7ff;
  --red: #ff6b6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 197, 66, 0.2), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(72, 167, 255, 0.22), transparent 30rem),
    linear-gradient(135deg, #07111f 0%, #0d1c33 48%, #07111f 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 310px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 28px;
  background: rgba(4, 10, 20, 0.55);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-card,
.status-card,
.glass-card,
.premium-card,
.table-card,
.stat-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.brand-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.brand-card.compact {
  width: fit-content;
}

.brand-mark {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  color: #07111f;
  background: linear-gradient(135deg, var(--gold), #fff2a8);
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.05em;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

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

.nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  display: block;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 15px 16px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-strong);
}

.danger-link {
  color: #ffb4b4;
}

.status-card {
  margin-top: auto;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.pulse {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 10px rgba(57, 217, 138, 0.12);
}

.content {
  padding: 32px;
}

.public-shell {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0;
}

.public-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.admin-link,
.back-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.clock-card {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.1);
  text-align: right;
}

.clock-card span {
  display: block;
  font-size: 1.55rem;
  font-weight: 900;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 24px;
}

.glass-card,
.premium-card,
.table-card {
  padding: 28px;
}

.kiosk-card {
  min-height: 610px;
}

.identity-form {
  margin: 28px 0 18px;
}

.identity-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 800;
}

.input-row {
  display: flex;
  gap: 12px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  color: var(--text);
  background: #13243b;
  outline: none;
}

input:focus {
  border-color: rgba(245, 197, 66, 0.8);
  box-shadow: 0 0 0 4px rgba(245, 197, 66, 0.12);
}

.input-row button,
.ghost-button,
.stack-form button,
.filters button {
  border: 0;
  border-radius: 18px;
  padding: 0 22px;
  color: #07111f;
  background: linear-gradient(135deg, var(--gold), #fff2a8);
  font-weight: 900;
}

.hint-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
}

.hint-strip span {
  color: var(--muted);
  font-size: 0.85rem;
}

.demo-code,
.ghost-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.employee-panel {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.alert {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  margin: 18px 0;
  font-weight: 800;
}

.alert.success {
  color: #082216;
  background: rgba(57, 217, 138, 0.9);
}

.alert.error {
  color: white;
  background: rgba(255, 107, 107, 0.22);
  border-color: rgba(255, 107, 107, 0.45);
}

.hidden {
  display: none !important;
}

.employee-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(72, 167, 255, 0.95), rgba(57, 217, 138, 0.9));
  font-weight: 900;
  font-size: 1.25rem;
}

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

.action-card {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.action-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 197, 66, 0.7);
}

.action-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.action-card strong {
  font-size: 1.2rem;
}

.action-card.accent {
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.22), rgba(255, 255, 255, 0.08));
}

.premium-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(245, 197, 66, 0.24), rgba(255, 255, 255, 0.08)),
    var(--panel);
}

.premium-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.17);
}

.metric-row,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.metric-row div,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.16);
}

.metric-row strong,
.stat-card strong {
  display: block;
  color: var(--text);
  font-size: 2rem;
  letter-spacing: -0.06em;
}

.stat-card strong.small-stat {
  font-size: 1.55rem;
}

.metric-row span,
.stat-card span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 24px;
}

.section-heading.horizontal {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

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

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

th,
td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 11px;
  color: #06101d;
  background: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.badge.warning {
  background: var(--gold);
}

.badge.danger {
  color: white;
  background: var(--red);
}

.employee-list,
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.person-card,
.schedule-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.person-card strong,
.schedule-card strong {
  display: block;
  margin-bottom: 6px;
}

.code-pill {
  display: inline-flex;
  margin-top: 14px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--gold);
  background: rgba(245, 197, 66, 0.12);
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px;
  color: var(--text);
  background: rgba(6, 16, 29, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(480px, 100%);
}

.stack-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.stack-form label,
.filters label {
  color: var(--text);
  font-weight: 800;
}

.stack-form button {
  min-height: 54px;
  margin-top: 8px;
}

.back-link {
  display: inline-flex;
  margin-top: 18px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr)) auto auto auto;
  gap: 14px;
  align-items: end;
}

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

.filters label {
  display: grid;
  gap: 8px;
}

.filters button {
  min-height: 54px;
}

.inline-form {
  margin-top: 14px;
}

.mini-button {
  border: 1px solid rgba(57, 217, 138, 0.45);
  border-radius: 999px;
  padding: 8px 12px;
  color: #082216;
  background: var(--green);
  font-weight: 900;
}

.mini-button.warning {
  border-color: rgba(245, 197, 66, 0.45);
  background: var(--gold);
}

@media print {
  body {
    color: #111827;
    background: white;
  }

  .sidebar,
  .topbar,
  .filters {
    display: none;
  }

  .app-shell {
    display: block;
  }

  .content,
  .table-card {
    padding: 0;
  }

  .table-card {
    border: 0;
    box-shadow: none;
    background: white;
  }

  th,
  td,
  p,
  small {
    color: #111827;
  }
}

@media (max-width: 980px) {
  .app-shell,
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .content,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .public-header,
  .input-row,
  .section-heading.horizontal {
    flex-direction: column;
    align-items: stretch;
  }

  .input-row button {
    min-height: 52px;
  }

  .action-grid,
  .dashboard-grid,
  .metric-row,
  .filters {
    grid-template-columns: 1fr;
  }
}
