/* ---------------------------------------------------------------------------
 | Customer demo app — a phone-shaped shell around the public /api/v1 endpoints.
 | Loaded by resources/views/customer/app.blade.php (no build step, CDN fonts).
 * ------------------------------------------------------------------------- */

:root {
    --brand: #0b63f6;
    --brand-dark: #0a4fc4;
    --brand-soft: #e8f0ff;
    --ink: #0d1526;
    --muted: #7a8699;
    --line: #e9edf3;
    --bg: #f4f6fa;
    --ok: #12b76a;
    --warn: #f79009;
    --danger: #e02424;
    --radius: 18px;
    --shadow: 0 8px 24px rgba(13, 21, 38, .07);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Cairo", system-ui, sans-serif;
}

body {
    background: radial-gradient(1200px 700px at 50% -10%, #1d2b52 0%, #0b1122 60%, #070b16 100%);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    padding: 28px;
}

/* ------------------------------- desk side ------------------------------- */
.desk {
    max-width: 340px;
    color: #cbd5e1;
}

.desk h1 {
    font-size: 26px;
    color: #fff;
    margin: 0 0 10px;
}

.desk p {
    font-size: 14px;
    line-height: 1.9;
    margin: 0 0 18px;
    color: #94a3b8;
}

.desk .chipset {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.desk .chipset span {
    font-size: 12px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    padding: 6px 12px;
    border-radius: 999px;
}

.desk .creds {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 2;
}

.desk .creds b {
    color: #fff;
}

.desk a {
    color: #7aa7ff;
    text-decoration: none;
}

/* --------------------------------- phone --------------------------------- */
.phone {
    position: relative;
    width: 400px;
    height: 848px;
    max-height: calc(100vh - 56px);
    background: #0a0a0c;
    border-radius: 52px;
    padding: 12px;
    box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 0 2px #26272c inset;
    flex: none;
}

.phone::after {
    /* side button */
    content: "";
    position: absolute;
    inset-inline-end: -3px;
    top: 190px;
    width: 3px;
    height: 74px;
    background: #2b2c31;
    border-radius: 3px;
}

.screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg);
    border-radius: 42px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* status bar */
.statusbar {
    height: 44px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    position: relative;
    z-index: 5;
}

.statusbar.light {
    color: var(--ink);
    background: #fff;
}

.notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 26px;
    background: #0a0a0c;
    border-radius: 16px;
    z-index: 6;
}

/* app bar */
.appbar {
    flex: none;
    background: var(--brand);
    color: #fff;
    padding: 4px 16px 16px;
}

.appbar.light {
    background: #fff;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.appbar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
}

.appbar h2 {
    font-size: 17px;
    margin: 0;
    font-weight: 700;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iconbtn {
    width: 36px;
    height: 36px;
    flex: none;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    color: inherit;
    font-size: 17px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.appbar.light .iconbtn {
    background: #f1f4f9;
}

.iconbtn .badge {
    position: absolute;
    margin: -22px 0 0 -18px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    padding: 0 4px;
}

/* body */
.view {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-bottom: 18px;
}

.view::-webkit-scrollbar {
    width: 0;
}

.pad {
    padding: 16px;
}

/* bottom nav */
.tabbar {
    flex: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 8px 4px 14px;
}

.tabbar button {
    border: 0;
    background: none;
    display: grid;
    gap: 3px;
    justify-items: center;
    font: inherit;
    font-size: 10.5px;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 0;
    position: relative;
}

.tabbar button i {
    font-size: 20px;
}

.tabbar button.on {
    color: var(--brand);
    font-weight: 700;
}

.tabbar .dot {
    position: absolute;
    top: 2px;
    inset-inline-start: calc(50% + 6px);
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    padding: 0 3px;
}

/* ------------------------------- components ------------------------------ */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 12px;
}

.section-head h3 {
    margin: 0;
    font-size: 15.5px;
}

.section-head a {
    font-size: 12px;
    color: var(--brand);
    text-decoration: none;
    cursor: pointer;
}

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

.tiny {
    font-size: 11.5px;
}

.sm {
    font-size: 12.5px;
}

.price {
    color: var(--brand);
    font-weight: 700;
}

.strike {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 400;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 13px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform .1s, opacity .15s;
}

.btn:active {
    transform: scale(.98);
}

.btn:disabled {
    opacity: .55;
    cursor: default;
}

.btn.block {
    width: 100%;
}

.btn.ghost {
    background: var(--brand-soft);
    color: var(--brand);
}

.btn.soft {
    background: #f1f4f9;
    color: var(--ink);
}

.btn.danger {
    background: #fdeceb;
    color: var(--danger);
}

.btn.sm {
    padding: 8px 13px;
    font-size: 12.5px;
    border-radius: 11px;
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 6px;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: none;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: 8px 15px;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
    white-space: nowrap;
}

.chip.on {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 700;
}

.pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475467;
}

.pill.ok {
    background: #e7f7ee;
    color: #067647;
}

.pill.warn {
    background: #fff5e6;
    color: #b54708;
}

.pill.bad {
    background: #fdeceb;
    color: #b42318;
}

.pill.info {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.field {
    margin-bottom: 13px;
}

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #344054;
}

.field .req {
    color: var(--danger);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 13px;
    padding: 12px 14px;
    font: inherit;
    font-size: 13.5px;
    color: var(--ink);
    outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(11, 99, 246, .12);
}

.field textarea {
    min-height: 88px;
    resize: vertical;
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rowline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--line);
}

.rowline:last-child {
    border-bottom: 0;
}

.switch {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    cursor: pointer;
    padding: 10px 0;
}

.switch input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

/* products */
.pgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pcard {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.pcard .thumb {
    width: 100%;
    height: 106px;
}

/* Seed data ships without photos, so a tinted icon tile stands in for the
   generic placeholder file instead of a grey "no image" block. */
.thumb {
    display: block;
    object-fit: cover;
    background: #eef1f6;
    flex: none;
}

.thumb.ph {
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .9);
    font-size: 24px;
    background: linear-gradient(135deg, #93aed6, #5b7fb8);
}

.pcard .body {
    padding: 9px 10px 11px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.pcard h4 {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 37px;
}

.hscroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.hscroll::-webkit-scrollbar {
    display: none;
}

.hscroll>* {
    flex: none;
    width: 148px;
}

/* list rows */
.lrow {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    padding: 11px;
    box-shadow: var(--shadow);
    cursor: pointer;
    margin-bottom: 10px;
}

.lrow .thumb,
.lrow img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #eef1f6;
    flex: none;
}

.lrow .grow {
    flex: 1;
    min-width: 0;
}

.lrow h4 {
    margin: 0 0 3px;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef1f6;
}

/* banners / hero */
.hero {
    background: var(--brand);
    color: #fff;
    padding: 0 16px 26px;
    border-radius: 0 0 26px 26px;
}

.searchbox {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, .17);
    border-radius: 14px;
    padding: 11px 14px;
    color: #fff;
}

.searchbox input {
    flex: 1;
    border: 0;
    background: none;
    outline: none;
    color: #fff;
    font: inherit;
    font-size: 13px;
}

.searchbox input::placeholder {
    color: rgba(255, 255, 255, .75);
}

.slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.slider::-webkit-scrollbar {
    display: none;
}

.slide {
    flex: none;
    width: 100%;
    scroll-snap-align: center;
    border-radius: 18px;
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
}

.slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .7));
}

.slide.ph {
    background: linear-gradient(135deg, #1b3a6b, #0b63f6);
}

.slide.ph .ph-icon {
    font-size: 46px;
    color: rgba(255, 255, 255, .35);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.slide * {
    position: relative;
}

/* sector tiles */
.sectors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11px;
}

.sector {
    background: #fff;
    border-radius: 16px;
    padding: 13px 8px;
    display: grid;
    justify-items: center;
    gap: 7px;
    box-shadow: var(--shadow);
    cursor: pointer;
    text-align: center;
}

.sector .ic {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: #fff;
}

.sector span {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
}

/* misc */
.empty {
    text-align: center;
    padding: 46px 20px;
    color: var(--muted);
}

.empty i {
    font-size: 44px;
    opacity: .35;
    display: block;
    margin-bottom: 12px;
}

.loader {
    display: grid;
    place-items: center;
    padding: 60px 0;
}

.spin {
    width: 30px;
    height: 30px;
    border: 3px solid var(--brand-soft);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: sp .7s linear infinite;
}

@keyframes sp {
    to {
        transform: rotate(360deg);
    }
}

.skel {
    background: linear-gradient(90deg, #eceff4 25%, #f5f7fa 50%, #eceff4 75%);
    background-size: 400% 100%;
    animation: sk 1.2s infinite;
    border-radius: 12px;
}

@keyframes sk {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: 0 0;
    }
}

/* toast */
.toast {
    position: absolute;
    inset-inline: 18px;
    bottom: 92px;
    z-index: 60;
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.toast div {
    background: #101828;
    color: #fff;
    border-radius: 13px;
    padding: 12px 15px;
    font-size: 13px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .3);
    animation: up .25s ease;
}

.toast div.ok {
    background: #067647;
}

.toast div.bad {
    background: #b42318;
}

@keyframes up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* sheet */
.sheet-wrap {
    position: absolute;
    inset: 0;
    z-index: 70;
    display: none;
}

.sheet-wrap.on {
    display: block;
}

.sheet-bg {
    position: absolute;
    inset: 0;
    background: rgba(9, 15, 27, .45);
    animation: fade .2s;
}

@keyframes fade {
    from {
        opacity: 0;
    }
}

.sheet {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    max-height: 88%;
    overflow-y: auto;
    scrollbar-width: none;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 8px 16px 22px;
    animation: slide .28s cubic-bezier(.2, .8, .3, 1);
}

@keyframes slide {
    from {
        transform: translateY(100%);
    }
}

.sheet::-webkit-scrollbar {
    width: 0;
}

.sheet .grab {
    width: 42px;
    height: 4px;
    border-radius: 4px;
    background: #d8dee7;
    margin: 6px auto 12px;
}

.sheet h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

/* stepper */
.stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.stepper button {
    width: 32px;
    height: 32px;
    border: 0;
    background: #f6f8fb;
    font-size: 16px;
    cursor: pointer;
    color: var(--brand);
}

.stepper span {
    min-width: 38px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
}

.slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.slot {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 11px;
    padding: 9px 4px;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.slot.on {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 700;
}

.slot:disabled {
    opacity: .4;
    cursor: default;
    text-decoration: line-through;
}

.timeline {
    padding-inline-start: 18px;
    border-inline-start: 2px solid var(--line);
    margin-inline-start: 6px;
}

.timeline li {
    list-style: none;
    position: relative;
    padding-bottom: 15px;
}

.timeline li::before {
    content: "";
    position: absolute;
    inset-inline-start: -25px;
    top: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

/* auth screen */
.auth {
    padding: 26px 22px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(170deg, var(--brand) 0%, #0a3ea8 55%, #072a70 100%);
    color: #fff;
}

.auth .logo {
    width: 66px;
    height: 66px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .16);
    display: grid;
    place-items: center;
    font-size: 30px;
    margin-bottom: 16px;
}

.auth h1 {
    font-size: 23px;
    margin: 0 0 6px;
}

.auth p.sub {
    margin: 0 0 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, .8);
    line-height: 1.8;
}

.auth .field label {
    color: rgba(255, 255, 255, .9);
}

.auth .field input {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
}

.auth .field input::placeholder {
    color: rgba(255, 255, 255, .55);
}

.auth .btn {
    background: #fff;
    color: var(--brand-dark);
}

.auth .link {
    color: #fff;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
}

.demo-hint {
    background: rgba(255, 255, 255, .12);
    border: 1px dashed rgba(255, 255, 255, .3);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.9;
    margin-bottom: 18px;
}

/* splash shown while the bootstrap calls resolve */
.splash {
    height: 100%;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 16px;
    background: linear-gradient(170deg, var(--brand) 0%, #0a3ea8 55%, #072a70 100%);
    color: #fff;
}

.splash .logo {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .16);
    display: grid;
    place-items: center;
    font-size: 34px;
}

.splash .spin {
    border-color: rgba(255, 255, 255, .25);
    border-top-color: #fff;
    width: 24px;
    height: 24px;
}

/* onboarding */
.onb {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.onb .art {
    flex: 1;
    background-size: cover;
    background-position: center;
}

.onb .txt {
    padding: 22px;
    text-align: center;
}

.onb h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 14px 0 18px;
}

.dots i {
    width: 7px;
    height: 7px;
    border-radius: 4px;
    background: #d8dee7;
}

.dots i.on {
    width: 20px;
    background: var(--brand);
}

/* responsive: on a real phone drop the frame */
@media (max-width: 900px) {
    .desk {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        background: var(--bg);
    }

    .phone {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
    }

    .screen {
        border-radius: 0;
    }

    .notch {
        display: none;
    }
}
