:root {
    --brand: #e84253;
    --brand-dark: #b92c3b;
    --paper: #fff8f8;
    --ink: #243041;
    --muted: #6c7a89;
}

body {
    background: radial-gradient(circle at top, #fff1f3 0%, #f7f8fb 50%, #eef1f5 100%);
    color: var(--ink);
    min-height: 100vh;
}

.brand-btn,
.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
}

.brand-btn:hover,
.btn-primary:hover,
.brand-btn:focus,
.btn-primary:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: #c7ccd3;
    border-color: #c7ccd3;
    color: #6b7280;
    box-shadow: none;
    cursor: not-allowed;
}

.admin-nav {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}

.kiosk-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.kiosk-card {
    border: 0;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(36, 48, 65, 0.12);
    background: rgba(255, 255, 255, 0.96);
}

.choice-card {
    min-height: 180px;
    border-radius: 24px;
    border: 2px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.choice-card:hover,
.choice-card:focus {
    transform: translateY(-2px);
    border-color: var(--brand);
    box-shadow: 0 12px 30px rgba(232, 66, 83, 0.16);
}

.product-card {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #ebedf0;
    height: 100%;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f5f5f5;
}

.stock-pill {
    font-size: 0.9rem;
}

.kiosk-checkbox {
    width: 4rem;
    height: 2rem;
    margin-top: 0.3rem;
}

.stat-card {
    border: 0;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(36, 48, 65, 0.08);
}

.table-card {
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(36, 48, 65, 0.07);
}

.settings-jump-card {
    position: sticky;
    top: 1.5rem;
}

.settings-jump-nav {
    gap: 0.5rem;
}

.settings-jump-link {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    background: #f8fafc;
    border: 1px solid #e9edf2;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.settings-jump-link:hover,
.settings-jump-link:focus {
    background: #fff1f3;
    border-color: rgba(232, 66, 83, 0.35);
    color: var(--brand-dark);
    transform: translateY(-1px);
}

.settings-section + .settings-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eceff3;
}

.settings-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.muted-note {
    color: var(--muted);
}

.step-shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 248, 0.98));
}

.step-indicator {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.step-pill {
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: #f3f5f7;
    color: var(--muted);
    font-weight: 600;
}

.step-pill.active {
    background: var(--brand);
    color: #fff;
}

.step-pane {
    display: none;
}

.step-pane.active {
    display: block;
}

.choice-card.disabled-card {
    opacity: 0.55;
    pointer-events: none;
}

.choice-card [data-kiosk-action-message] {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
    text-align: center;
}

.category-button {
    text-align: left;
    color: inherit;
}

.category-button.is-selected,
.product-choice.is-selected {
    border-color: var(--brand);
    box-shadow: 0 12px 30px rgba(232, 66, 83, 0.16);
}

.product-choice {
    cursor: pointer;
}

.product-choice.disabled-card {
    opacity: 0.55;
    cursor: not-allowed;
    border-style: dashed;
}

.product-choice.disabled-card:hover,
.product-choice.disabled-card:focus {
    transform: none;
    border-color: #d7dbe0;
    box-shadow: none;
}

.analytics-stat {
    border-left: 6px solid var(--brand);
}

.mini-metric {
    border-radius: 18px;
    background: #f9fafb;
}

.record-meta-stack {
    display: grid;
    gap: 0.18rem;
}

.record-action-panel {
    padding: 0.9rem 1rem;
    border: 1px solid #e6eaf0;
    border-radius: 16px;
    background: #f8fafc;
}

.review-table td,
.loans-table td {
    vertical-align: top;
}

.action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.review-detail-stack {
    display: grid;
    gap: 0.28rem;
}

.audit-log-detail-row td {
    background: transparent;
}

.audit-log-detail-panel {
    margin: 0.25rem 0 0.75rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e6eaf0;
    border-radius: 16px;
    background: #f8fafc;
}

.audit-log-detail-code {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ink);
}

.kiosk-timeout-modal {
    position: fixed;
    inset: 0;
    background: rgba(36, 48, 65, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2000;
}

.kiosk-timeout-dialog {
    width: min(100%, 32rem);
    background: #fff;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 24px 60px rgba(36, 48, 65, 0.24);
    text-align: center;
}

.processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(36, 48, 65, 0.5);
}

.processing-overlay-dialog {
    width: min(100%, 30rem);
    padding: 2rem;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(36, 48, 65, 0.24);
    text-align: center;
}

.chart-panel {
    min-height: 340px;
}

.chart-toolbar {
    gap: 0.75rem;
}

.chart-canvas-wrap {
    position: relative;
    min-height: 280px;
}

.chart-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 991.98px) {
    .settings-jump-card {
        position: static;
    }

    .settings-section-header {
        flex-direction: column;
    }
}
