* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: #ececef; color: #111827; }
.sidebar { position: fixed; top: 0; left: 0; width: 240px; height: 100vh; background: #111827; color: #fff; padding: 24px 18px; }
.brand { font-size: 28px; font-weight: bold; margin-bottom: 28px; }
.userbox { background: rgba(255,255,255,.08); border-radius: 12px; padding: 12px; margin-bottom: 20px; }
.sidebar nav a { display: block; color: #fff; text-decoration: none; padding: 12px 10px; border-radius: 10px; margin-bottom: 8px; }
.sidebar nav a:hover { background: rgba(255,255,255,.12); }
.main { margin-left: 240px; min-height: 100vh; padding: 28px; }
.main.centered { margin-left: 0; display: flex; align-items: center; justify-content: center; }
.card { background: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 10px 30px rgba(0,0,0,.06); margin-bottom: 24px; }
.auth-card { width: 430px; }
.player-card { max-width: 820px; }
.muted { color: #667085; }
input, select { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #cbd5e1; margin-top: 8px; }
label { display: block; font-weight: 600; }
.grid-1 { display: grid; gap: 16px; }

.password-field {
  position: relative;
  margin-top: 8px;
}

.password-field input {
  margin-top: 0;
  padding-right: 78px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
}

.password-toggle:hover {
  color: #1d4ed8;
}

.password-toggle:focus {
  outline: none;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full { grid-column: 1 / -1; }
.btn { display: inline-block; text-decoration: none; border: none; border-radius: 10px; padding: 12px 16px; cursor: pointer; background: #e5e7eb; color: #111827; }
.btn.primary { background: #2563eb; color: white; }
.btn.secondary { background: #475569; color: white; }
.btn.small { padding: 8px 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.stat h3 { font-size: 34px; margin: 0 0 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #e5e7eb; text-align: left; padding: 12px 10px; vertical-align: top; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.danger { background: #fee2e2; color: #b91c1c; }
.qr-thumb { width: 70px; height: 70px; object-fit: contain; border: 1px solid #ddd; border-radius: 8px; }
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.tile { background: #f8fafc; border: 1px solid #dbe4ee; border-radius: 14px; padding: 10px; text-align: center; }
.tile img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; background: #fff; }
.tile-name { margin-top: 8px; font-weight: 700; font-size: 14px; }
.tile-pos { font-size: 12px; color: #64748b; margin-bottom: 8px; }
@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; height: auto; }
  .main { margin-left: 0; }
  .stats, .grid-2, .board { grid-template-columns: 1fr; }
}


.image-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.image-card { background: #f8fafc; border: 1px solid #dbe4ee; border-radius: 14px; padding: 10px; text-align: center; }
.image-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; background: #fff; }
.image-name { margin-top: 8px; font-weight: 700; font-size: 14px; word-break: break-word; }

@media (max-width: 900px) {
  .image-grid { grid-template-columns: 1fr; }
}


.tile.shown { border-color: #2563eb; }
.tile.marked { box-shadow: inset 0 0 0 3px #22c55e; }
.tile-status { margin: 8px 0; font-size: 13px; color: #475569; }
.current-card { margin: 18px 0; text-align: center; }
.current-card img { width: 260px; max-width: 100%; height: 260px; object-fit: cover; border-radius: 16px; border: 1px solid #dbe4ee; }
.current-name { margin-top: 10px; font-size: 20px; font-weight: 700; }
.image-card.shown { border-color: #2563eb; background: #eff6ff; }


.danger-btn { background: #dc2626; color: white; margin-top: 10px; width: 100%; }


.board-img {
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}

.board-img.img-pending {
  filter: grayscale(100%);
  opacity: 0.9;
}

.board-img.img-shown {
  filter: grayscale(0%);
  opacity: 1;
}

.tile.shown {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}


/* ===== Pretty mobile board ===== */
.board-screen {
  width: 100%;
}

.board-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.board-meta {
  margin: 6px 0;
}

.big-btn {
  min-width: 180px;
  min-height: 48px;
  font-size: 17px;
}

.pretty-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.pretty-tile {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 12px;
  border: 1px solid #dbe4ee;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  text-align: center;
}

.pretty-tile.shown {
  border-color: #b9cdf8;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.10);
}

.pretty-tile.marked {
  box-shadow: inset 0 0 0 3px #22c55e, 0 10px 24px rgba(34, 197, 94, 0.12);
}

.pretty-pos {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.92);
  color: #334155;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
}

.pretty-img-wrap {
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
  margin-bottom: 10px;
}

.pretty-img {
  width: 100%;
  aspect-ratio: 0.72 / 1;
  object-fit: cover;
  display: block;
}

.pretty-name {
  font-weight: 800;
  font-size: 15px;
  margin-top: 2px;
  margin-bottom: 4px;
  word-break: break-word;
}

.pretty-status {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .board-header {
    flex-direction: column;
  }

  .board-actions-top {
    width: 100%;
  }

  .board-actions-top form {
    width: 100%;
  }

  .big-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .board-screen {
    padding: 14px;
    border-radius: 20px;
  }

  .pretty-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .pretty-tile {
    padding: 10px;
    border-radius: 16px;
  }

  .pretty-name {
    font-size: 14px;
  }

  .pretty-status {
    font-size: 13px;
  }

  .pretty-tile .btn {
    min-height: 40px;
    font-size: 14px;
    padding: 10px 8px;
  }
}

@media (max-width: 520px) {
  .main {
    padding: 10px !important;
  }

  .board-screen h1 {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .board-meta {
    font-size: 14px;
  }

  .pretty-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .pretty-tile {
    padding: 8px;
    border-radius: 14px;
  }

  .pretty-pos {
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 2px 7px;
  }

  .pretty-img {
    aspect-ratio: 0.70 / 1;
  }

  .pretty-name {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .pretty-status {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .pretty-tile .btn {
    min-height: 38px;
    font-size: 13px;
    border-radius: 10px;
    padding: 8px 6px;
  }

  .big-btn {
    min-height: 46px;
    font-size: 16px;
  }
}


/* ===== Seller event screen ===== */
.event-screen {
  display: grid;
  gap: 18px;
}

.event-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.event-kicker {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 6px;
}

.event-topbar h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.1;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-tag {
  background: #eef2ff;
  color: #334155;
  border: 1px solid #dbe4ee;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.winner-banner {
  margin-bottom: 12px;
}

.event-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .9fr);
  gap: 18px;
  align-items: start;
}

.event-main {
  min-height: 70vh;
}

.stage-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.stage-header h2,
.event-sidebar h2 {
  margin: 0;
}

.stage-btn {
  min-width: 240px;
  min-height: 52px;
  font-size: 17px;
  box-shadow: 0 12px 24px rgba(37,99,235,.18);
}

.pulse-btn {
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 12px 24px rgba(37,99,235,.18); }
  50% { transform: scale(1.03); box-shadow: 0 16px 28px rgba(37,99,235,.28); }
  100% { transform: scale(1); box-shadow: 0 12px 24px rgba(37,99,235,.18); }
}

.event-current {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe4ee;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.10);
  padding: 18px;
  text-align: center;
}

.animate-in {
  animation: cardDrop .35s ease-out;
}

@keyframes cardDrop {
  0% { opacity: 0; transform: translateY(-16px) scale(.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.event-order-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255,255,255,.94);
  border: 1px solid #dbe4ee;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  z-index: 2;
}

.event-current img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 20px;
  background: #fff;
}

.current-name {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
}

.empty-stage {
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #64748b;
  text-align: center;
}

.empty-circle {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eff6ff;
  font-size: 42px;
  margin-bottom: 14px;
}

.event-sidebar {
  max-height: 80vh;
  overflow: auto;
}

.event-seq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.event-seq-item {
  position: relative;
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  padding: 10px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.event-seq-item img {
  width: 100%;
  aspect-ratio: .8 / 1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.event-seq-item.current {
  border-color: #2563eb;
  box-shadow: 0 12px 24px rgba(37,99,235,.16);
  transform: translateY(-2px);
}

.event-seq-item.pending img {
  filter: grayscale(100%);
  opacity: .75;
}

.event-seq-item.shown img {
  filter: grayscale(0%);
  opacity: 1;
}

.event-seq-order {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255,255,255,.96);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  z-index: 2;
}

.event-seq-name {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  word-break: break-word;
}

.event-seq-status {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .event-stage {
    grid-template-columns: 1fr;
  }

  .event-sidebar {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .event-topbar {
    flex-direction: column;
  }

  .event-topbar h1 {
    font-size: 26px;
  }

  .stage-header {
    flex-direction: column;
    align-items: stretch;
  }

  .stage-btn {
    width: 100%;
    min-width: 0;
  }

  .event-seq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .current-name {
    font-size: 22px;
  }
}

@media (max-width: 520px) {
  .event-seq-grid {
    grid-template-columns: 1fr 1fr;
  }

  .event-current img {
    max-height: 45vh;
  }

  .current-name {
    font-size: 18px;
  }
}


/* ===== Toast bubble notifications ===== */
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: min(360px, calc(100vw - 24px));
}

.toast-bubble {
  pointer-events: none;
  padding: 14px 18px;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  animation: toastIn .25s ease-out;
  opacity: 1;
  transform: translateY(0);
}

.toast-bubble.success {
  background: rgba(220, 252, 231, 0.96);
  color: #166534;
}

.toast-bubble.danger {
  background: rgba(254, 226, 226, 0.97);
  color: #b91c1c;
}

.toast-bubble.warning {
  background: rgba(254, 249, 195, 0.97);
  color: #854d0e;
}

.toast-bubble.info {
  background: rgba(219, 234, 254, 0.97);
  color: #1d4ed8;
}

.toast-hide {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: opacity .35s ease, transform .35s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .toast-stack {
    top: auto;
    right: 12px;
    left: 12px;
    bottom: 18px;
    width: auto;
  }

  .toast-bubble {
    border-radius: 16px;
    font-size: 14px;
    padding: 12px 14px;
  }
}


/* ===== 9-card board tuning ===== */
@media (max-width: 520px) {
  .pretty-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pretty-img {
    aspect-ratio: 0.72 / 1;
  }
}

@media (max-width: 390px) {
  .pretty-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pretty-tile {
    padding: 7px;
  }

  .pretty-tile .btn {
    min-height: 34px;
    font-size: 12px;
    padding: 6px 4px;
  }
}


/* ===== Vendor mobile improvement ===== */
@media (max-width: 768px) {
  body {
    background: #f3f4f6;
  }

  .sidebar {
    padding: 18px 16px 14px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  }

  .userbox {
    margin-bottom: 12px;
  }

  .sidebar nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sidebar nav a {
    margin-bottom: 0;
    padding: 14px 12px;
    font-size: 17px;
  }

  .main {
    padding: 12px;
  }

  h1 {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .card {
    margin-bottom: 16px;
    padding: 16px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat h3 {
    font-size: 28px;
  }

  .actions {
    gap: 8px;
  }

  .actions .btn,
  .actions form,
  .actions a {
    width: 100%;
  }

  .qr-thumb {
    width: 86px;
    height: 86px;
  }

  table.responsive-mobile,
  table {
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  table thead {
    display: none;
  }

  table tbody,
  table tr,
  table td {
    display: block;
    width: 100%;
  }

  table tr {
    background: #ffffff;
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    margin-bottom: 10px;
  }

  table td {
    border: none;
    padding: 8px 0;
    text-align: left;
  }

  table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  table td.actions::before {
    margin-bottom: 8px;
  }

  table td img {
    display: inline-block;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .btn {
    min-height: 46px;
    font-size: 15px;
  }

  input, select {
    min-height: 46px;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 22px;
  }

  .sidebar nav a {
    font-size: 16px;
  }

  .main {
    padding: 10px;
  }

  .card {
    padding: 14px;
  }

  .actions {
    flex-direction: column;
  }

  .actions .btn,
  .actions form,
  .actions a {
    width: 100%;
  }
}


/* ===== Mobile hamburger menu ===== */
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-menu-btn,
.mobile-close-btn {
  display: none;
  border: none;
  cursor: pointer;
  border-radius: 12px;
}

.mobile-menu-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10020;
  width: 46px;
  height: 46px;
  background: #111827;
  color: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  font-size: 22px;
}

.mobile-close-btn {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.08);
  color: white;
  font-size: 18px;
}

.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-btn,
  .mobile-close-btn {
    display: inline-grid;
    place-items: center;
  }

  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 10005;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
  }

  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: min(82vw, 320px) !important;
    height: 100vh !important;
    z-index: 10010;
    transform: translateX(-100%);
    transition: transform .28s ease;
    border-radius: 0 !important;
    overflow-y: auto;
    padding-top: 18px !important;
  }

  .main {
    margin-left: 0 !important;
    padding-top: 72px !important;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  body.mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .sidebar nav {
    grid-template-columns: 1fr !important;
  }

  .brand {
    margin-bottom: 0 !important;
  }
}


/* ===== QR fullscreen + copy link ===== */
.qr-open-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.qr-open-btn img {
  transition: transform .18s ease, box-shadow .18s ease;
}

.qr-open-btn:hover img,
.qr-open-btn:active img {
  transform: scale(1.04);
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
}

.qr-modal.open {
  display: block;
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(3px);
}

.qr-modal-content {
  position: relative;
  z-index: 2;
  width: min(92vw, 760px);
  max-height: 92vh;
  margin: 4vh auto;
  background: #fff;
  border-radius: 26px;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.4);
  text-align: center;
}

.qr-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
}

.qr-modal-title {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  margin: 10px 0 14px;
}

.qr-modal-image {
  width: min(78vw, 520px);
  max-width: 100%;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.qr-modal-code {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.qr-modal-link {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  color: #475569;
  font-size: 14px;
  word-break: break-all;
}

.qr-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .qr-modal-content {
    width: calc(100vw - 20px);
    margin: 10px auto;
    padding: 16px;
    border-radius: 20px;
  }

  .qr-modal-title {
    font-size: 20px;
    padding-right: 40px;
  }

  .qr-modal-image {
    width: min(84vw, 420px);
  }

  .qr-modal-actions .btn {
    width: 100%;
  }
}


/* ===== Edit image name ===== */
.edit-image-form {
  margin-top: 10px;
}

.image-name-input {
  width: 100%;
  margin-bottom: 8px;
}


.image-toggle-form {
  margin-top: 10px;
}

.image-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.switch input:checked + .slider {
  background-color: #2563eb;
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
}


/* ===== Auth redesign ===== */
body:has(.auth-shell) {
  background: linear-gradient(180deg, #4a79d8 0%, #3668c6 100%);
}

.main.centered:has(.auth-shell) {
  padding: 24px;
}

.auth-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-panel {
  width: 100%;
  max-width: 470px;
  background: #edf2fb;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.auth-brand-wrap {
  background: #ffffff;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
}

.auth-brand-logo {
  width: 42px;
  height: 42px;
  border: 3px solid #243b6b;
  border-radius: 50%;
  position: relative;
}

.auth-brand-ring {
  position: absolute;
  inset: 5px 10px 5px 10px;
  border-left: 3px solid #243b6b;
  border-radius: 50%;
  transform: rotate(18deg);
}

.auth-brand-text {
  font-size: 28px;
  font-weight: 700;
  color: #243b6b;
  letter-spacing: -0.4px;
}

.auth-divider {
  height: 3px;
  background: #4d78d8;
}

.auth-body {
  padding: 28px 30px 26px;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 26px;
  color: #111827;
}

.auth-subtitle {
  margin: 0 0 18px;
  color: #667085;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-label {
  display: block;
  font-weight: 500;
  color: #6b7280;
}

.auth-label span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.auth-label input {
  margin-top: 0;
  background: #dfe7f5;
  border: none;
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 18px;
  color: #111827;
  outline: none;
}

.auth-label input:focus {
  box-shadow: inset 0 0 0 2px rgba(54, 104, 198, 0.28);
}

.auth-password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
}

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

.icon-toggle {
  position: static;
  transform: none;
  width: 64px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #dfe7f5;
  color: #355b9f;
  padding: 0;
}

.icon-toggle:hover {
  color: #264b8a;
  background: #d7e1f2;
}

.icon-eye {
  width: 28px;
  height: 28px;
}

.eye-off {
  display: none;
}

.password-toggle.is-visible .eye-open {
  display: none;
}

.password-toggle.is-visible .eye-off {
  display: block;
}

.auth-submit {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 15px 20px;
  font-size: 18px;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(90deg, #4f7fd8 0%, #2f5ca9 100%);
  margin-top: 6px;
}

.auth-submit:hover {
  filter: brightness(0.98);
}

.auth-submit:focus,
.icon-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 127, 216, 0.18);
}

@media (max-width: 560px) {
  .main.centered:has(.auth-shell) {
    padding: 14px;
  }

  .auth-body {
    padding: 22px 20px 22px;
  }

  .auth-brand-wrap {
    min-height: 96px;
  }

  .auth-title {
    font-size: 22px;
  }
}


/* Login client logo */
.auth-brand-wrap-image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 20px;
}

.auth-client-logo {
  display: block;
  max-width: 420px;
  width: 100%;
  height: auto;
  object-fit: contain;
}
