:root {
    --kopling-dark: #2f1b12;
    --kopling-brown: #5c3824;
    --kopling-caramel: #c99055;
    --kopling-cream: #fff8ec;
    --kopling-soft: #f4eadb;
}
body { background: #faf7f2; color: #34261f; }
.navbar-kopling { background: linear-gradient(135deg, var(--kopling-dark), var(--kopling-brown)); }
.navbar-brand { display:flex; align-items:center; padding:.25rem 0; }
.navbar-brand img { width: 64px; height: 64px; object-fit: contain; background:#fff; border-radius:.85rem; padding:2px; box-shadow:0 4px 16px rgba(0,0,0,.22); }
.hero-brand-logo { width:min(290px,75vw); height:auto; object-fit:contain; background:#fff; border-radius:1.5rem; padding:.65rem; box-shadow:0 16px 42px rgba(0,0,0,.24); }
.auth-brand-logo { width:150px; height:150px; object-fit:contain; background:#fff; border:1px solid #eee4d7; border-radius:1.25rem; padding:.35rem; box-shadow:0 10px 28px rgba(56,34,22,.12); }
.receipt-brand-logo { width:175px; max-width:70%; height:auto; object-fit:contain; }
.member-card-logo { width:58px; height:58px; object-fit:contain; background:#fff; border-radius:.75rem; padding:2px; }
.hero-kopling { background: radial-gradient(circle at top right, #d6a46e 0, #6a4128 42%, #2f1b12 100%); color: white; border-radius: 1.5rem; }
.card { border: 0; border-radius: 1rem; box-shadow: 0 10px 30px rgba(56, 34, 22, .08); }
.product-card { transition: transform .2s ease, box-shadow .2s ease; overflow: hidden; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 38px rgba(56, 34, 22, .14); }
.product-image { height: 190px; object-fit: cover; width: 100%; background: linear-gradient(135deg, #ead1b1, #8b5b36); }
.product-placeholder { height: 190px; display:flex; align-items:center; justify-content:center; font-size:4rem; background:linear-gradient(135deg,#f1dcc0,#b98755); }
.btn-kopling { background: var(--kopling-brown); border-color: var(--kopling-brown); color: white; }
.btn-kopling:hover, .btn-kopling:focus { background: var(--kopling-dark); border-color: var(--kopling-dark); color:white; }
.text-kopling { color: var(--kopling-brown) !important; }
.bg-kopling-soft { background: var(--kopling-soft); }
.stat-card .icon { width: 50px; height: 50px; border-radius: 14px; display:flex; align-items:center; justify-content:center; background:var(--kopling-soft); color:var(--kopling-brown); font-size:1.4rem; }
.table > :not(caption) > * > * { padding: .85rem .75rem; vertical-align: middle; }
.badge-status { padding:.45rem .7rem; border-radius:999px; }
.sidebar-link { color:#5e4a3e; padding:.7rem .9rem; border-radius:.75rem; display:block; text-decoration:none; }
.sidebar-link:hover, .sidebar-link.active { background:var(--kopling-soft); color:var(--kopling-dark); font-weight:600; }
.receipt { max-width: 420px; margin:auto; font-family: "Courier New", monospace; background:white; padding:22px; }
.qris-box { max-width: 320px; margin:auto; border:2px dashed #8b5b36; border-radius:1rem; padding:1rem; background:#fff; }
@media print {
    .no-print, nav, footer { display:none !important; }
    body { background:white; }
    .receipt { box-shadow:none; max-width:80mm; padding:0; }
}

.member-scanner-frame {
    min-height: 320px;
    overflow: hidden;
    border: 2px dashed #8b5b36;
    border-radius: 1rem;
    background: #111;
}
.member-scanner-frame video,
.member-scanner-frame canvas {
    border-radius: .85rem;
}
#memberBarcodeReader__scan_region {
    background: #111;
}
#memberBarcodeReader__dashboard {
    background: #fff;
    padding: .75rem;
}
@media (max-width: 575.98px) {
    .navbar-brand img { width:54px; height:54px; }
    .member-scanner-frame { min-height: 250px; }
    #openMemberScanner { font-size: 0; }
    #openMemberScanner .bi { font-size: 1rem; }
}

/* v1.7 — photo slider shared by visitor, admin, cashier, and member pages */
.kopling-photo-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 1.5rem;
    color: #fff;
    background: var(--kopling-dark);
    box-shadow: 0 18px 45px rgba(47, 27, 18, .20);
}
.kopling-photo-hero--large { min-height: 520px; }
.kopling-photo-hero--compact { min-height: 320px; }
.kopling-photo-hero__slides,
.kopling-photo-hero__slide,
.kopling-photo-hero__overlay {
    position: absolute;
    inset: 0;
}
.kopling-photo-hero__slide {
    z-index: -3;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.035);
    transition: opacity 1s ease, transform 10s linear;
}
.kopling-photo-hero__slide.is-active {
    opacity: 1;
    transform: scale(1.095);
}
.kopling-photo-hero__overlay {
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(24, 12, 7, .91) 0%, rgba(52, 28, 16, .82) 38%, rgba(70, 40, 22, .57) 68%, rgba(20, 12, 8, .48) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .04));
}
.kopling-photo-hero__content {
    position: relative;
    z-index: 2;
    min-height: inherit;
    display: flex;
    align-items: center;
    padding: 3.5rem 4.5rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .34);
}
.kopling-photo-hero--compact .kopling-photo-hero__content { padding-top: 2.75rem; padding-bottom: 2.75rem; }
.kopling-photo-hero__subtitle {
    max-width: 790px;
    color: rgba(255, 255, 255, .84);
}
.kopling-photo-hero__logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .75rem;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .28);
    backdrop-filter: blur(6px);
}
.kopling-photo-hero__logo {
    width: min(250px, 24vw);
    max-height: 245px;
    object-fit: contain;
}
.kopling-photo-hero--compact .kopling-photo-hero__logo {
    width: min(165px, 18vw);
    max-height: 165px;
}
.kopling-photo-hero__nav {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    color: #fff;
    background: rgba(25, 14, 8, .52);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
    transform: translateY(-50%);
    transition: background .2s ease, transform .2s ease;
    backdrop-filter: blur(6px);
}
.kopling-photo-hero__nav:hover,
.kopling-photo-hero__nav:focus-visible {
    color: #2f1b12;
    background: #ffc107;
    transform: translateY(-50%) scale(1.06);
}
.kopling-photo-hero__nav--prev { left: 16px; }
.kopling-photo-hero__nav--next { right: 16px; }
.kopling-photo-hero__dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 18px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}
.kopling-photo-hero__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 999px;
    background: rgba(255, 255, 255, .36);
    transition: width .2s ease, background .2s ease;
}
.kopling-photo-hero__dot.is-active {
    width: 27px;
    background: #ffc107;
    border-color: #ffc107;
}
.kopling-photo-hero .btn-outline-light {
    background: rgba(33, 18, 10, .30);
    backdrop-filter: blur(4px);
}
.kopling-photo-hero .btn-outline-light:hover { background: #fff; }

@media (max-width: 991.98px) {
    .kopling-photo-hero--large { min-height: 480px; }
    .kopling-photo-hero--compact { min-height: 300px; }
    .kopling-photo-hero__content { padding: 3rem 4rem; }
}
@media (max-width: 767.98px) {
    .kopling-photo-hero--large { min-height: 500px; }
    .kopling-photo-hero--compact { min-height: 310px; }
    .kopling-photo-hero__content { padding: 3.4rem 3.4rem 3.7rem; }
    .kopling-photo-hero__overlay {
        background: linear-gradient(90deg, rgba(24, 12, 7, .91), rgba(48, 25, 14, .68));
    }
    .kopling-photo-hero__nav { width: 40px; height: 40px; }
    .kopling-photo-hero__nav--prev { left: 10px; }
    .kopling-photo-hero__nav--next { right: 10px; }
}
@media (max-width: 575.98px) {
    .kopling-photo-hero { border-radius: 1.1rem; }
    .kopling-photo-hero--large { min-height: 500px; }
    .kopling-photo-hero--compact { min-height: 330px; }
    .kopling-photo-hero__content { padding: 3.3rem 2.65rem 4rem; }
    .kopling-photo-hero__content .display-5,
    .kopling-photo-hero__content .display-6 { font-size: 2rem; }
    .kopling-photo-hero__nav { top: auto; bottom: 11px; transform: none; }
    .kopling-photo-hero__nav:hover,
    .kopling-photo-hero__nav:focus-visible { transform: scale(1.05); }
    .kopling-photo-hero__nav--prev { left: 14px; }
    .kopling-photo-hero__nav--next { right: 14px; }
    .kopling-photo-hero__dots { bottom: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .kopling-photo-hero__slide { transition: none; transform: none !important; }
}


/* v1.8 — auth background photo for login and register */
.auth-photo-page {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 220px);
    border-radius: 1.5rem;
    background: #2f1b12;
    box-shadow: 0 18px 45px rgba(47, 27, 18, .16);
}
.auth-photo-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../images/auth/login-register-bg.jpg');
    background-size: cover;
    background-position: center center;
    transform: scale(1.03);
}
.auth-photo-page::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(24, 12, 7, .80), rgba(52, 28, 16, .55) 40%, rgba(255,255,255,.18));
}
.auth-photo-page__inner {
    position: relative;
    z-index: 2;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}
.auth-photo-page .card {
    width: 100%;
    border: 0;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(8px);
    box-shadow: 0 18px 48px rgba(24, 12, 7, .20);
}
.auth-photo-page .auth-photo-caption {
    position: absolute;
    left: 1.2rem;
    bottom: 1rem;
    z-index: 2;
    color: #fff;
    font-size: .95rem;
    text-shadow: 0 2px 14px rgba(0,0,0,.55);
    line-height: 1.35;
}
.auth-photo-page .auth-photo-caption strong {
    display: block;
    font-size: 1.1rem;
    letter-spacing: .02em;
}
@media (max-width: 767.98px) {
    .auth-photo-page {
        min-height: calc(100vh - 170px);
        border-radius: 1rem;
    }
    .auth-photo-page__inner {
        padding: 1.25rem .25rem 3.5rem;
    }
    .auth-photo-page .auth-photo-caption {
        left: .85rem;
        right: .85rem;
        bottom: .8rem;
        font-size: .86rem;
    }
}
