:root { color-scheme: light; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; }
.page-overlay { position: fixed; inset: 0; background: #f3f4f6; opacity: 0; pointer-events: none; transition: opacity 220ms ease; z-index: 999999; }
.page-overlay.show { opacity: 1; }
.layout { display: flex; min-height: 100vh; background: #f3f4f6; }
.sidebar { width: 260px; background: #111827; color: #fff; position: sticky; top: 0; height: 100vh; padding: 16px 0; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 0 18px 16px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar .brand .logo { width: 34px; height: 34px; border-radius: 8px; background: #7c3aed; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.sidebar .nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.sidebar a { color: rgba(229,231,235,0.85); text-decoration: none; padding: 10px 12px; border-radius: 10px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.sidebar a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar a.active { background: rgba(59,130,246,0.18); color: #fff; border-left: 3px solid #3b82f6; border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.sidebar .sectionTitle { padding: 14px 18px 6px 18px; color: rgba(156,163,175,0.9); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.content { flex: 1; padding: 18px; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.06); }
.cardHeader { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.cardHeader h1 { margin: 0; font-size: 18px; font-weight: 800; color: #111827; }
.cardBody { padding: 18px; }
.btn { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 800; cursor: pointer; }
.btnPrimary { background: #2563eb; color: #fff; }
.btnPrimary:hover { background: #1d4ed8; }
.btnDanger { background: #dc2626; color: #fff; }
.btnDanger:hover { background: #b91c1c; }
.btnGhost { background: #f3f4f6; color: #111827; }
.btnGhost:hover { background: #e5e7eb; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.muted { color: #6b7280; font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.portalGrid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 760px) { .portalGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.portalCard { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid rgba(0,0,0,0.08); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.06); text-decoration: none; color: #111827; }
.portalCard:hover { background: #f9fafb; }
.portalIcon { width: 44px; height: 44px; border-radius: 12px; background: rgba(124,58,237,0.12); border: 1px solid rgba(124,58,237,0.18); color: #7c3aed; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 auto; }
.portalText { min-width: 0; flex: 1; }
.portalTitle { font-weight: 900; }
.portalDesc { font-size: 12px; color: #6b7280; margin-top: 2px; }
.portalGo { font-weight: 900; color: #2563eb; }
.mesaCard { background: #fff; border-radius: 14px; border: 1px solid rgba(0,0,0,0.08); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.mesaCardTop { padding: 14px 14px 10px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mesaTitle { font-size: 22px; font-weight: 900; color: #111827; margin: 0; }
.mesaStatusDot { width: 10px; height: 10px; border-radius: 999px; background: #22c55e; }
.mesaTools { display: flex; align-items: center; gap: 8px; }
.iconBtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.08); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.iconBtn:hover { background: #f9fafb; }
.iconBtn.danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.iconBtn.danger:hover { background: #fee2e2; }
.mesaMid { padding: 0 14px 10px 14px; display: flex; justify-content: center; }
.mesaPillRow { padding: 0 14px 12px 14px; display: flex; align-items: center; gap: 10px; }
.pill { font-size: 12px; font-weight: 900; border-radius: 10px; padding: 6px 10px; border: 1px solid rgba(0,0,0,0.08); background: #fff; color: #111827; }
.mesaActions { padding: 0 14px 14px 14px; display: flex; gap: 10px; align-items: center; }
.mesaActions .btnPrimary { flex: 1; }
.mesaSelect { display: flex; align-items: center; gap: 8px; color: #111827; font-weight: 800; }
.modalOverlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 9999; }
.modal { width: 100%; max-width: 860px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.modalHeader { padding: 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(0,0,0,0.08); }
.modalHeader h2 { margin: 0; font-size: 20px; font-weight: 900; color: #111827; }
.modalBody { padding: 18px; }
.field label { display: block; font-size: 13px; font-weight: 900; color: #374151; margin-bottom: 8px; }
.field input { width: 100%; padding: 12px 12px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.14); font-size: 14px; }
.layoutGrid { margin-top: 14px; display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .layoutGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.layoutOpt { border: 2px solid rgba(0,0,0,0.10); border-radius: 12px; padding: 14px; cursor: pointer; background: #fff; }
.layoutOpt.selected { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.layoutOptTitle { margin-top: 8px; font-weight: 900; color: #111827; text-align: center; }
.modalFooter { padding: 18px; border-top: 1px solid rgba(0,0,0,0.08); }
.fullBtn { width: 100%; }
