:root {
    --primary: #5B5FEF;
    --primary-hover: #4A4EDB;
    --primary-soft: #EEEEFF;
    --accent: #14B8A6;
    --success: #16A34A;
    --success-soft: #ECFDF3;
    --warning: #F59E0B;
    --warning-soft: #FFF8E7;
    --danger: #DC2626;
    --danger-soft: #FEF2F2;
    --bg: #F6F7FB;
    --surface: #FFF;
    --surface-secondary: #FAFAFC;
    --text-primary: #151725;
    --text-secondary: #62677A;
    --text-muted: #9599A9;
    --border: #E7E8EF;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .04);
    --shadow-md: 0 8px 24px rgba(24, 28, 50, .06);
    --shadow-lg: 0 24px 60px rgba(24, 28, 50, .12)
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    font-family: Inter, system-ui, sans-serif;
    color: var(--text-primary);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.55
}

a {
    text-decoration: none;
    color: var(--primary)
}

a:hover {
    color: var(--primary-hover)
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -.025em
}

.text-secondary,
.text-muted {
    color: var(--text-secondary) !important
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -.04em
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--primary), #7C5CFC);
    display: inline-grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 8px 18px rgba(91, 95, 239, .28)
}

.btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: .68rem 1rem;
    transition: .18s ease
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(91, 95, 239, .18)
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px)
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary)
}

.btn-ghost:hover {
    background: var(--surface-secondary);
    color: var(--text-primary)
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 12px;
    color: var(--text-secondary)
}

.icon-btn svg {
    width: 19px
}

.surface,
.kpi,
.auth-card,
.table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm)
}

.surface {
    box-shadow: var(--shadow-md)
}

.eyebrow {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    font-size: 11px
}

.form-label,
label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 7px
}

.form-text {
    color: var(--text-muted)
}

.form-control,
.form-select {
    min-height: 46px;
    border-color: var(--border);
    border-radius: var(--radius-md);
    padding: .7rem .85rem;
    color: var(--text-primary)
}

textarea.form-control {
    min-height: auto
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(91, 95, 239, .11)
}

.form-control::placeholder {
    color: #AFB2BF
}

.badge-soft,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600
}

.badge-soft {
    background: var(--success-soft);
    color: #15803d
}

.status-pill:before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor
}

.status-success {
    background: var(--success-soft);
    color: var(--success)
}

.status-muted {
    background: #F0F1F5;
    color: var(--text-secondary)
}

.avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 12px
}

.app-shell {
    display: flex;
    min-height: 100vh
}

.sidebar {
    width: 256px;
    position: fixed;
    inset: 0 auto 0 0;
    background: #121528;
    color: #AEB2C4;
    padding: 22px 14px;
    z-index: 1040;
    display: flex;
    flex-direction: column
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 20px
}

.sidebar .brand {
    color: #fff
}

.sidebar nav {
    overflow-y: auto
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #AEB2C4;
    padding: 10px 12px;
    border-radius: 10px;
    margin: 2px 0;
    font-size: 13.5px;
    font-weight: 500
}

.sidebar a svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8
}

.sidebar a:hover {
    background: rgba(255, 255, 255, .055);
    color: #fff
}

.sidebar a.active {
    background: rgba(91, 95, 239, .18);
    color: #fff;
    box-shadow: inset 3px 0 var(--primary)
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 14px
}

.plan-mini {
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 12px;
    margin: 0 3px 8px;
    color: #fff
}

.plan-mini small {
    display: block;
    color: #8F94A9;
    margin-top: 3px
}

.plan-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34D399;
    margin-right: 6px
}

.sidebar-close {
    display: none;
    background: transparent;
    border-color: rgba(255, 255, 255, .1);
    color: #fff
}

.main {
    margin-left: 256px;
    width: calc(100% - 256px);
    min-width: 0
}

.topbar {
    height: 72px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1000
}

.topbar-title {
    display: flex;
    gap: 12px;
    align-items: center
}

.topbar-title>div {
    display: flex;
    flex-direction: column
}

.topbar-title small {
    font-size: 11px;
    color: var(--text-muted)
}

.topbar-title strong {
    font-size: 15px
}

.user-chip {
    display: flex;
    gap: 10px;
    align-items: center
}

.user-chip>span:last-child {
    display: flex;
    flex-direction: column
}

.user-chip small {
    font-size: 11px;
    color: var(--text-muted)
}

.mobile-toggle {
    display: none
}

.content {
    padding: 28px;
    max-width: 1500px;
    margin: 0 auto
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px
}

.page-heading h1 {
    font-size: 29px;
    font-weight: 700;
    margin: 0 0 5px
}

.page-heading p {
    margin: 0;
    color: var(--text-secondary)
}

.kpi {
    padding: 20px;
    height: 100%;
    position: relative;
    overflow: hidden
}

.kpi-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500
}

.kpi .value {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.05em;
    margin: 7px 0 3px
}

.kpi-context {
    font-size: 11px;
    color: var(--text-muted)
}

.kpi-icon {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary)
}

.kpi-icon svg {
    width: 18px
}

.table-card {
    overflow: hidden
}

.table {
    font-size: 13px
}

.table>:not(caption)>*>* {
    padding: 14px 18px;
    border-color: var(--border);
    vertical-align: middle
}

.table thead th {
    background: var(--surface-secondary);
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
    white-space: nowrap
}

.table tbody tr:hover {
    background: #FCFCFE
}

.progress {
    height: 7px;
    background: #ECEEF4;
    border-radius: 99px
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), #7C5CFC);
    border-radius: 99px
}

.mini-progress {
    width: 110px
}

.empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary)
}

.empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary)
}

.empty h3 {
    font-size: 17px;
    color: var(--text-primary)
}

.toast {
    border-radius: 14px;
    box-shadow: var(--shadow-lg)
}

.toast-container {
    z-index: 2000
}

.modal-content {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg)
}

.modal-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary)
}

.loyalty-card {
    background: linear-gradient(145deg, #16192B, #33385E);
    color: #fff;
    border-radius: 26px;
    padding: 26px;
    box-shadow: 0 28px 64px rgba(21, 23, 37, .25);
    min-height: 320px;
    position: relative;
    overflow: hidden
}

.loyalty-card>* {
    position: relative;
    z-index: 2
}

.loyalty-card:after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    border: 54px solid rgba(255, 255, 255, .055);
    border-radius: 50%;
    right: -105px;
    top: -110px
}

.stamp-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0
}

.stamp {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    display: inline-grid;
    place-items: center
}

.stamp svg {
    width: 19px
}

.stamp.filled {
    background: #fff;
    color: #151725;
    border-color: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .12)
}

.customer-page {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0, #E9EAFE 0, transparent 42%), var(--bg);
    padding: 28px 15px
}

.customer-card {
    max-width: 440px;
    margin: auto
}

.wallet-btn {
    height: 48px
}

.scanner-stage {
    background: #111423;
    border-radius: 24px;
    width: 100%;
    max-width: 620px;
    aspect-ratio: 1 / 1;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    margin-inline: auto;
    box-shadow: 0 18px 44px rgba(17, 20, 35, .18)
}

.scanner-stage #reader {
    z-index: 1;
    border: 0 !important;
    overflow: hidden;
    background: #080a12
}

.scanner-stage #reader video,
.scanner-stage #reader canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important
}

.scanner-stage #reader__scan_region {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important
}

.scanner-stage #reader__scan_region>img {
    display: none !important
}

.scanner-placeholder {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 24px;
    pointer-events: auto
}

.scan-frame {
    width: min(78vw, 390px);
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, .8);
    border-radius: 22px;
    position: relative
}

.scanner-start {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    min-height: 52px;
    padding-inline: 22px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
    pointer-events: auto !important;
    touch-action: manipulation;
    cursor: pointer
}

.scanner-privacy { margin: 16px 0 0 }
.scanner-item-list { display: grid; gap: 10px }
.scanner-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px }
.scanner-item small { display: block; color: var(--text-secondary); margin-top: 2px }
.scanner-qty { display: flex; align-items: center; overflow: hidden; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 12px }
.scanner-qty button { width: 42px; height: 42px; border: 0; background: var(--primary-soft); color: var(--primary); font-size: 21px; font-weight: 800 }
.scanner-qty input { width: 38px; border: 0; text-align: center; font-weight: 800; background: #fff }

.scan-frame:before,
.scan-frame:after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 4px solid transparent;
    border-top-color: #7C7FFF;
    border-radius: 24px;
    pointer-events: none
}

.scan-frame:after {
    border-top-color: transparent;
    border-bottom-color: #27D1BD
}

.member-sheet {
    border-radius: 20px
}

.member-header {
    display: flex;
    align-items: center;
    gap: 14px
}

.reward-banner {
    background: linear-gradient(135deg, #ECFDF3, #F4FFF8);
    border: 1px solid #CDEED9;
    border-radius: 14px;
    padding: 14px;
    color: #146C36
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at 90% 5%, #E5E7FF, transparent 38%), var(--bg)
}

.auth-card {
    padding: 34px;
    width: min(460px, 100%);
    box-shadow: var(--shadow-md)
}

.section {
    padding: 82px 0
}

.landing-nav {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border)
}

.hero {
    padding: 96px 0 78px;
    background: radial-gradient(circle at 82% 20%, rgba(91, 95, 239, .14), transparent 32%)
}

.display-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -.065em;
    line-height: 1
}

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    display: grid;
    place-items: center
}

.price-card {
    height: 100%;
    padding: 28px
}

.price-card.featured {
    border: 2px solid var(--primary);
    transform: translateY(-8px)
}

.sidebar-scrim {
    display: none
}

@import url('brand.css');

.brand {
    width: 142px;
    height: 46px;
    display: inline-block !important;
    overflow: hidden;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0;
    background: #fff url('../../logo.png') center/128px auto no-repeat;
    border-radius: 11px
}

.brand:hover,
.brand:focus {
    color: transparent !important
}

.brand .brand-mark,
.brand>span {
    display: none !important
}

.navbar-brand.brand {
    margin: 0;
    width: 138px;
    height: 54px;
    background-size: 150px
}

.sidebar .brand {
    width: 150px;
    height: 48px;
    background-size: 136px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .12)
}

.site-footer .brand {
    width: 160px;
    height: 52px;
    background-size: 145px
}

.auth-card .brand {
    width: 170px;
    height: 56px;
    margin-left: auto;
    margin-right: auto;
    background-size: 154px
}

@media(max-width:430px) {
    .navbar-brand.brand {
        width: 124px;
        height: 40px;
        background-size: 112px
    }

    .site-footer .brand {
        width: 148px;
        height: 48px;
        background-size: 134px
    }
}

.auth-card>a.brand {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    background-position: center !important
}

.auth-card>a.brand {
    width: 190px !important;
    height: 63px !important;
    background-size: 174px auto !important
}

.sidebar .brand {
    background-color: transparent !important;
    background-image: url('../../logoo.png') !important;
    background-size: 136px auto !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-radius: 0 !important;
    box-shadow: none !important
}

.sidebar .brand:hover,
.sidebar .brand:focus {
    background-color: transparent !important
}
