html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  font-family: 'Barlow', sans-serif;
  background: #f0f2f3;
}

.title-font { font-family: 'Big Shoulders', sans-serif; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  padding: 40px;
  animation: fadeIn 0.3s ease;
  z-index: 50;
}
.overlay > * + * { margin-top: 22px; }

.overlay.success { background: rgba(30, 130, 78, 0.97); }
.overlay.neutral { background: rgba(31, 41, 51, 0.97); }
.overlay h1 { font-size: 42px; font-weight: 700; }
.overlay p { font-size: 22px; max-width: 480px; }

button { font-family: 'Barlow', sans-serif; }

input:focus { border-color: #1f2933 !important; outline: none; }

/* Login */
.login-wrap {
  height: 100vh;
  width: 100vw;
  background: #1f2933;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 44px 40px;
  width: 100%;
  max-width: 380px;
  border: 1px solid #dbe1e4;
  display: flex;
  flex-direction: column;
  text-align: center;
}
.login-card > * + * { margin-top: 18px; }
.login-card h1 { font-size: 28px; font-weight: 800; color: #1f2933; letter-spacing: 1px; text-transform: uppercase; }
.login-card p.sub { font-size: 14px; color: #5b6b76; margin-top: -10px; }
.login-input {
  height: 58px;
  border-radius: 14px;
  border: 2px solid #dbe1e4;
  padding: 0 18px;
  font-size: 19px;
  color: #1f2933;
  text-align: center;
  letter-spacing: 2px;
}
.login-btn {
  height: 58px;
  border-radius: 999px;
  border: none;
  background: #1f2933;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Big Shoulders', sans-serif;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.login-error { font-size: 14px; color: #c0392b; min-height: 18px; }

/* Kiosk */
.kiosk-wrap { height: 100vh; width: 100vw; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.kiosk-header {
  background: #1f2933; color: #ffffff; display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px; flex-shrink: 0;
}
.kiosk-header > * + * { margin-left: 24px; }
.kiosk-header .site-name { font-weight: 800; font-size: 30px; letter-spacing: 1px; text-transform: uppercase; }
.kiosk-header .site-sub { font-size: 15px; color: #a8b3ba; letter-spacing: 0.5px; margin-top: 2px; }
.kiosk-header .clock { font-size: 42px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; }

.lang-bar {
  display: flex; justify-content: center; padding: 10px 20px; flex-shrink: 0;
  background: #e6e9ea; border-bottom: 1px solid #d5dade; overflow-x: auto;
}
.lang-bar-inner { display: flex; flex-wrap: wrap; justify-content: center; margin: -4px; }
.lang-btn {
  display: flex; align-items: center; flex-shrink: 0; padding: 6px 11px; border-radius: 999px;
  border: 2px solid #d5dade; background: #f7f8f9; cursor: pointer; margin: 4px;
}
.lang-btn > * + * { margin-left: 6px; }
.lang-btn.active { border-color: #1f2933; background: #ffffff; }
.lang-btn span.label { font-size: 12px; font-weight: 700; color: #1f2933; white-space: nowrap; }

.mode-bar { display: flex; justify-content: center; padding: 18px 32px 0; flex-shrink: 0; }
.mode-toggle { display: flex; background: #e2e6e8; border-radius: 999px; padding: 6px; width: 100%; max-width: 720px; }
.mode-toggle > * + * { margin-left: 6px; }
.mode-btn {
  flex: 1; padding: 20px 0; border-radius: 999px; font-size: 22px; font-weight: 700; border: none; cursor: pointer;
  font-family: 'Big Shoulders', sans-serif; letter-spacing: 0.5px; background: transparent; color: #3a4a58;
}
.mode-btn.active { background: #1f2933; color: #ffffff; }

.kiosk-body { flex: 1; overflow-y: auto; display: flex; justify-content: center; padding: 20px 32px 32px; }

.arrive-card {
  max-width: 680px; width: 100%; padding: 32px 36px;
  display: flex; flex-direction: column;
}
.arrive-card > * + * { margin-top: 20px; }
.arrive-card h1 { font-size: 34px; font-weight: 700; color: #1f2933; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 22px; }
.field { display: flex; flex-direction: column; }
.field > * + * { margin-top: 9px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 16px; font-weight: 600; color: #3a4a58; }
.field input {
  height: 62px; border-radius: 14px; border: 2px solid #dbe1e4; padding: 0 18px; font-size: 21px;
  color: #1f2933; background: #ffffff;
}
.submit-btn {
  height: 68px; border-radius: 999px; border: none; background: #1f2933; color: #ffffff; font-size: 22px;
  font-weight: 700; font-family: 'Big Shoulders', sans-serif; letter-spacing: 0.5px; cursor: pointer;
}
.submit-btn[disabled] { background: #a9b3ba; cursor: not-allowed; }

.leave-wrap { max-width: 760px; width: 100%; display: flex; flex-direction: column; }
.leave-wrap > * + * { margin-top: 18px; }
.leave-wrap h1 { font-size: 34px; font-weight: 700; color: #1f2933; }
.present-list { display: flex; flex-direction: column; }
.present-list > * + * { margin-top: 16px; }
.present-row {
  background: #ffffff; border-radius: 18px; padding: 26px 30px; display: flex; align-items: center;
  justify-content: space-between; border: 1px solid #eceef0;
}
.present-row > * + * { margin-left: 20px; }
.present-row .name { font-size: 23px; font-weight: 700; color: #1f2933; }
.present-row .company { font-size: 16px; color: #5b6b76; }
.present-row .arrival-label { font-size: 13px; color: #5b6b76; text-transform: uppercase; letter-spacing: 0.5px; }
.present-row .arrival-time { font-size: 20px; font-weight: 700; color: #1f2933; font-variant-numeric: tabular-nums; }
.leave-btn {
  background: #1f2933; color: #ffffff; border: none; border-radius: 999px; padding: 20px 34px; font-size: 19px;
  font-weight: 700; font-family: 'Barlow', sans-serif; cursor: pointer; flex-shrink: 0;
}
.empty-card { background: #ffffff; border-radius: 18px; padding: 48px; text-align: center; color: #5b6b76; font-size: 19px; }

/* Accueil */
.accueil-wrap { min-height: 100vh; width: 100%; display: flex; flex-direction: column; }
.accueil-header { background: #1f2933; color: #ffffff; display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; }
.accueil-header .site-name { font-weight: 800; font-size: 26px; letter-spacing: 1px; text-transform: uppercase; }
.accueil-header .site-sub { font-size: 14px; color: #a8b3ba; }
.accueil-header .logout-btn { background: transparent; border: 1px solid #3a4a58; color: #a8b3ba; border-radius: 999px; padding: 8px 16px; font-size: 13px; cursor: pointer; }

.tab-bar { display: flex; padding: 24px 40px 0; }
.tab-toggle { display: inline-flex; background: #e2e6e8; border-radius: 999px; padding: 6px; }
.tab-toggle > * + * { margin-left: 6px; }
.tab-btn { padding: 13px 26px; border-radius: 999px; font-size: 16px; font-weight: 700; border: none; cursor: pointer; font-family: 'Big Shoulders', sans-serif; letter-spacing: 0.5px; background: transparent; color: #3a4a58; }
.tab-btn.active { background: #1f2933; color: #ffffff; }

.accueil-body { flex: 1; padding: 24px 40px 48px; }
.panel { background: #ffffff; border-radius: 20px; border: 1px solid #eceef0; overflow: hidden; }
.panel-head { padding: 24px 28px; border-bottom: 1px solid #eceef0; display: flex; align-items: center; justify-content: space-between; }
.panel-head h1 { font-size: 26px; font-weight: 700; color: #1f2933; }
.panel-head .count { font-size: 16px; color: #5b6b76; font-weight: 600; }

.grid-row-head, .grid-row {
  display: grid; padding: 14px 28px; align-items: center;
}
.grid-row-head { background: #f7f8f9; font-size: 13px; font-weight: 700; color: #5b6b76; text-transform: uppercase; letter-spacing: 0.5px; }
.grid-row { padding: 18px 28px; border-top: 1px solid #eceef0; font-size: 16px; color: #1f2933; }
.grid-row .col-name { font-weight: 600; }
.grid-row .col-muted { color: #5b6b76; }
.grid-row .col-time { font-variant-numeric: tabular-nums; }

.present-cols { grid-template-columns: 2fr 2fr 2fr 1fr 1.2fr; }
.register-cols { grid-template-columns: 1fr 2fr 2fr 1fr 1fr 1.6fr; }

.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #1e824c; display: inline-block; flex-shrink: 0; margin-right: 8px; }
.status-inline { display: inline-flex; align-items: center; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; width: fit-content; }
.badge.auto { background: #fbeee0; color: #b45309; }
.badge.out { background: #eceef0; color: #5b6b76; }
