/* ═══════════════════════════════════════════
   VANILLA UNICORN · MANAGER SYSTEM
   Dark Red Luxury Club UI
═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #060103;
  --bg2: #100306;
  --bg3: #1a0509;
  --surface: rgba(22, 6, 10, 0.94);
  --surface2: rgba(34, 8, 14, 0.95);

  --border: rgba(255, 35, 70, 0.14);
  --border2: rgba(255, 55, 85, 0.32);

  --accent: #ff1744;
  --accent2: #ff4d6d;
  --accent3: #9f071f;

  --text: #fff3f5;
  --muted: #9f7279;
  --muted2: #67434a;

  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.10);
  --green-brd: rgba(34, 197, 94, 0.35);

  --yellow: #facc15;
  --yellow-bg: rgba(250, 204, 21, 0.11);
  --yellow-brd: rgba(250, 204, 21, 0.40);

  --red: #ff1744;
  --red-bg: rgba(255, 23, 68, 0.14);
  --red-brd: rgba(255, 23, 68, 0.52);

  --font-display: 'Cinzel', serif;
  --font-body: 'Outfit', sans-serif;

  --radius: 12px;
  --radius-lg: 18px;
}

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

html,
body {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 23, 68, 0.18), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(255, 77, 109, 0.10), transparent 26%),
    radial-gradient(circle at 50% 95%, rgba(120, 0, 25, 0.20), transparent 35%),
    linear-gradient(135deg, #050102 0%, #100306 45%, #070103 100%);
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 55, 85, 0.32);
  border-radius: 20px;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 62px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(8, 1, 4, 0.86);
  border-bottom: 1px solid rgba(255, 35, 70, 0.20);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo {
  font-size: 20px;
  filter: drop-shadow(0 0 12px rgba(255, 23, 68, .6));
}

.nav-title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2.2px;
  color: var(--text);
  text-shadow: 0 0 18px rgba(255, 23, 68, 0.40);
}

.nav-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 55, 85, 0.22);
  border-radius: 999px;
  padding: 5px 15px;
  font-size: 13px;
  color: var(--text);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(34, 197, 94, .75);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: .45;
    transform: scale(.78)
  }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-stats {
  display: flex;
  gap: 8px;
}

.nstat {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.nstat.red {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-brd);
}

.nstat.yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid var(--yellow-brd);
}

.btn-history,
.btn-logout {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 55, 85, 0.22);
  color: var(--muted);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: .2s;
  font-family: var(--font-body);
}

.btn-history:hover,
.btn-logout:hover {
  color: var(--text);
  border-color: var(--accent2);
  box-shadow: 0 0 22px rgba(255, 23, 68, 0.18);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-name {
  font-size: 12px;
  color: var(--muted);
}

/* ALERT */
.alert-banner {
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  z-index: 99;
  background: linear-gradient(90deg, rgba(255, 23, 68, 0.24), rgba(255, 77, 109, 0.12));
  border-bottom: 1px solid var(--red-brd);
  color: #ffd7dd;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  animation: slideDown .25s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%)
  }

  to {
    transform: translateY(0)
  }
}

.alert-banner button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* MAIN */
.main {
  padding: 86px 24px 48px;
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* ZONE */
.zone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.zone-icon {
  color: var(--accent2);
  font-size: 12px;
  text-shadow: 0 0 12px rgba(255, 23, 68, 0.6);
}

.zone-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #ffd0d8;
  text-transform: uppercase;
  white-space: nowrap;
}

.zone-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 23, 68, .42), transparent);
}

.divider-full {
  text-align: center;
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted2);
}

/* ROOMS */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.rooms-grid-motel {
  grid-template-columns: repeat(4, 1fr);
}

.room-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  cursor: pointer;
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  position: relative;
  overflow: hidden;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.room-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.room-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent2);
  box-shadow: 0 20px 54px rgba(255, 23, 68, 0.16), 0 16px 42px rgba(0, 0, 0, 0.35);
}

.room-card.state-empty {
  opacity: .72;
}

.room-card.state-empty:hover {
  opacity: 1;
}

.room-card.state-empty::before {
  background: rgba(255, 255, 255, 0.10);
}

.room-card.state-green {
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.10), transparent),
    var(--surface);
  border-color: var(--green-brd);
}

.room-card.state-green::before {
  background: var(--green);
  box-shadow: 0 0 18px rgba(34, 197, 94, .7);
}

.room-card.state-yellow {
  background:
    linear-gradient(180deg, rgba(250, 204, 21, 0.12), transparent),
    var(--surface);
  border-color: var(--yellow-brd);
  animation: pulse-yellow 2s infinite;
}

.room-card.state-yellow::before {
  background: var(--yellow);
  box-shadow: 0 0 18px rgba(250, 204, 21, .75);
}

@keyframes pulse-yellow {

  0%,
  100% {
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  }

  50% {
    box-shadow: 0 0 38px rgba(250, 204, 21, 0.18);
  }
}

.room-card.state-red {
  background:
    linear-gradient(180deg, rgba(255, 23, 68, 0.20), transparent),
    var(--surface);
  border-color: var(--red-brd);
  animation: pulse-red 1.15s infinite;
}

.room-card.state-red::before {
  background: var(--red);
  box-shadow: 0 0 22px rgba(255, 23, 68, .85);
}

@keyframes pulse-red {

  0%,
  100% {
    box-shadow: 0 18px 48px rgba(255, 23, 68, 0.10);
  }

  50% {
    box-shadow: 0 0 42px rgba(255, 23, 68, 0.25);
  }
}

/* CARD INTERNALS */
.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.room-number {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

.room-badge {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .5px;
}

.badge-empty {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.badge-active {
  background: rgba(34, 197, 94, 0.16);
  color: var(--green);
}

.badge-warn {
  background: rgba(250, 204, 21, 0.16);
  color: var(--yellow);
}

.badge-expired {
  background: rgba(255, 23, 68, 0.18);
  color: #ffb2bf;
}

.room-name-big {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-theme-icon {
  font-size: 24px;
  text-align: center;
  margin: 2px 0;
  filter: drop-shadow(0 0 14px rgba(255, 23, 68, 0.22));
}

.room-session {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
}

.session-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-client {
  font-size: 11px;
  color: var(--muted);
}

.session-timer {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  margin-top: 4px;
}

.session-timer.t-green {
  color: var(--green);
}

.session-timer.t-yellow {
  color: var(--yellow);
}

.session-timer.t-red {
  color: #ff5f7c;
}

.empty-cta {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.empty-plus {
  font-size: 18px;
  color: var(--accent2);
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 0, 2, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.modal {
  background:
    linear-gradient(180deg, rgba(255, 23, 68, 0.08), transparent 45%),
    var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 430px;
  margin: 16px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72), 0 0 60px rgba(255, 23, 68, 0.10);
  animation: slideUp .2s ease;
}

.modal-wide {
  max-width: 780px;
}

@keyframes slideUp {
  from {
    transform: translateY(18px);
    opacity: 0
  }

  to {
    transform: translateY(0);
    opacity: 1
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.modal-room-name {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1.6px;
  color: #ffd1d8;
}

.modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 10px;
}

.modal-close:hover {
  color: #fff;
  border-color: var(--accent);
}

.modal-body {
  padding: 20px;
}

.field-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-weight: 700;
}

.field-input {
  width: 100%;
  background: rgba(5, 1, 3, 0.75);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: .2s;
}

.field-input:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 4px rgba(255, 23, 68, 0.10);
}

.field-input::placeholder {
  color: var(--muted2);
}

.modal-footer {
  padding: 0 20px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-cancel,
.btn-start,
.btn-extend,
.btn-end,
.btn-login {
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: .2s;
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted);
}

.btn-cancel:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn-start,
.btn-login {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(255, 23, 68, 0.25);
}

.btn-start:hover,
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(255, 23, 68, 0.35);
}

.btn-extend {
  background: rgba(250, 204, 21, 0.10);
  border: 1px solid var(--yellow-brd);
  color: var(--yellow);
}

.btn-end {
  background: rgba(255, 23, 68, 0.10);
  border: 1px solid var(--red-brd);
  color: #ff9bad;
  font-weight: 700;
}

.btn-end:hover {
  background: rgba(255, 23, 68, 0.18);
}

.active-timer-display {
  font-size: 68px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 3px;
  margin-bottom: 20px;
  text-shadow: 0 0 24px currentColor;
}

.active-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-label {
  display: inline-block;
  width: 90px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-val {
  font-size: 14px;
  font-weight: 600;
}

/* HISTORY */
.history-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.history-total {
  font-size: 12px;
  color: var(--muted);
}

.history-table-wrap {
  overflow-x: auto;
  max-height: 410px;
  overflow-y: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table th {
  padding: 11px 12px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border2);
  position: sticky;
  top: 0;
  background: var(--bg2);
  font-weight: 700;
}

.history-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.history-table tr:hover td {
  background: rgba(255, 23, 68, 0.05);
}

.dur-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 23, 68, 0.10);
  color: #ffb8c4;
}

/* LOGIN */
body.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.login-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .45;
}

.glow-one {
  background: rgba(255, 23, 68, 0.34);
  top: -80px;
  left: -80px;
}

.glow-two {
  background: rgba(255, 77, 109, 0.20);
  bottom: -120px;
  right: -80px;
}

.login-particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent2);
  border-radius: 50%;
  animation: float linear infinite;
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.9);
}

@keyframes float {
  0% {
    transform: translateY(100vh) scale(0)
  }

  100% {
    transform: translateY(-20px) scale(1)
  }
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background:
    linear-gradient(180deg, rgba(255, 23, 68, 0.10), transparent 35%),
    rgba(12, 2, 5, 0.88);
  border: 1px solid rgba(255, 55, 85, 0.28);
  border-radius: 24px;
  padding: 40px 32px;
  backdrop-filter: blur(22px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.82), 0 0 80px rgba(255, 23, 68, 0.10);
}

.login-logo-wrap {
  text-align: center;
  margin-bottom: 32px;
}

.login-diamond {
  font-size: 38px;
  margin-bottom: 10px;
  display: inline-block;
  filter: drop-shadow(0 0 18px rgba(255, 23, 68, 0.72));
}

.login-kicker {
  color: var(--accent2);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.login-brand {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--text);
  margin-bottom: 6px;
  text-shadow: 0 0 24px rgba(255, 23, 68, 0.38);
}

.login-tagline {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-field {
  margin-bottom: 16px;
}

.login-error {
  background: var(--red-bg);
  border: 1px solid var(--red-brd);
  color: #ffd1d9;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.btn-login {
  width: 100%;
  margin-top: 4px;
  padding: 12px;
}

.btn-login:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.login-mini-info {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  font-size: 11px;
  color: var(--muted);
}

.login-foot {
  text-align: center;
  font-size: 11px;
  color: var(--muted2);
  margin-top: 20px;
  letter-spacing: .5px;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .navbar {
    height: auto;
    min-height: 62px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .nav-center {
    order: 3;
    width: 100%;
  }

  .main {
    padding-top: 120px;
  }

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

@media (max-width: 580px) {
  .main {
    padding: 132px 14px 36px;
  }

  .rooms-grid,
  .rooms-grid-motel {
    grid-template-columns: 1fr;
  }

  .nav-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .active-timer-display {
    font-size: 52px;
  }
}
