* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f2f4f7;
    margin: 0;
    color: #1f2937;
    position: relative;
    height: calc(100vh - 0px);
    overflow: hidden;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('background.webp') center center / cover no-repeat;
    opacity: 0.16;
    z-index: -1;
    pointer-events: none;
}
.topbar {
    background: #7a1f2b;
    color: #fff;
    padding: 14px 20px;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.topbar h1 {
    font-size: 17px;
    margin: 0;
    font-weight: 600;
}
.topbar a { color: #fff; text-decoration: none; font-size: 14px; }
.topbar a:hover { text-decoration: underline; }
.wrap {
    width: 100%;
    margin: 5px auto;
    padding: 0 16px;
    height: calc(100vh - 60px);
    overflow: auto;
}
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 20px;
}
.card h2 {
    margin-top: 0;
    font-size: 19px;
    border-bottom: 2px solid #7a1f2b;
    padding-bottom: 8px;
    color: #7a1f2b;
}
.auth-box {
    max-width: 420px;
    margin: 60px auto;
}
label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin: 14px 0 6px;
}
input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=date], input[type=time], input[type=password], textarea, select {
    width: 100%;
    max-width: 480px;
    padding: 9px 11px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type=text]:focus, input[type=tel]:focus, input[type=email]:focus, input[type=number]:focus,
input[type=date]:focus, input[type=time]:focus, input[type=password]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #7a1f2b;
    box-shadow: 0 0 0 3px rgba(122, 31, 43, 0.15);
}
input:disabled, select:disabled, textarea:disabled {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}
textarea { resize: vertical; min-height: 70px; max-width: 100%; }
.btn {
    display: inline-block;
    background: #7a1f2b;
    color: #fff;
    border: none;
    border-bottom: 3px solid #4e1219;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    margin-top: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
.btn:hover { background: #611722; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.btn:active { transform: translateY(2px); border-bottom-width: 1px; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.btn:focus-visible { outline: 2px solid #7a1f2b; outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-secondary { background: #6b7280; border-bottom-color: #3f4552; }
.btn-secondary:hover { background: #4b5563; }
.btn-danger { background: #b91c1c; border-bottom-color: #6b1414; }
.btn-danger:hover { background: #7f1d1d; }
.btn-small { padding: 6px 12px; font-size: 13px; margin-top: 0; border-bottom-width: 2px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 200px; }
.msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.msg-success { background: #dcfce7; color: #166534; }
.msg-error { background: #fee2e2; color: #991b1b; }
.msg-info { background: #dbeafe; color: #1e40af; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
th { background: #f9fafb; font-size: 12px; text-transform: uppercase; color: #6b7280; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-forwarded { background: #dbeafe; color: #1e40af; }
.badge-allotted { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.helper { font-size: 12px; color: #6b7280; margin-top: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0; border-left: 2px solid #e5e7eb; padding-left: 16px; position: relative; margin-left: 6px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: #7a1f2b; }
.timeline .meta { font-size: 12px; color: #6b7280; }
.empty-state { text-align: center; padding: 40px 0; color: #6b7280; }
.otp-boxes { display: flex; gap: 8px; }
.otp-boxes input { text-align: center; letter-spacing: 4px; font-size: 18px; }

.kpi-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.kpi-tile { flex: 1; min-width: 140px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; text-align: center; }
.kpi-tile .kpi-value { font-size: 26px; font-weight: 700; color: #7a1f2b; }
.kpi-tile .kpi-label { font-size: 12px; color: #6b7280; text-transform: uppercase; margin-top: 4px; }
.kpi-tile.kpi-ready .kpi-value { color: #166534; }
.kpi-tile.kpi-not-ready .kpi-value { color: #991b1b; }
.kpi-tile.kpi-locked .kpi-value { color: #6d28d9; }

.room-map-floor { margin-bottom: 18px; }
.room-map-floor:last-child { margin-bottom: 0; }
.room-map-floor-label { font-weight: 600; font-size: 13px; color: #374151; margin-bottom: 8px; }
.room-map-seats { display: flex; flex-wrap: wrap; gap: 8px; }
.room-seat {
    width: 58px;
    height: 58px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    padding: 2px;
    border: none;
    cursor: default;
    font-family: inherit;
}
button.room-seat { cursor: pointer; }
.room-seat .room-seat-cat { font-size: 8.5px; font-weight: 400; opacity: 0.9; }
.room-seat-ready { background: #16a34a; }
.room-seat-not-ready { background: #9ca3af; }
.room-seat-locked { background: #6d28d9; cursor: not-allowed; }
.room-map-legend { display: flex; gap: 18px; margin-top: 14px; font-size: 12px; color: #6b7280; align-items: center; }
.room-map-legend-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: middle; }
@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    body::before { display: none; }
    .card { box-shadow: none; }
}
