﻿/* GIVE LABEL — one stylesheet, built on Bootstrap 5. Keep it small and plain. */

:root {
    --gl-primary: #2453d4;
    --gl-primary-dark: #1b3fa6;
    --gl-accent: #ffb400;
    --gl-bg: #f4f6fb;
    --gl-surface: #ffffff;
    --gl-border: #e3e7ef;
    --gl-text: #1d2433;
    --gl-muted: #6b7486;
    --gl-radius: 12px;
    --gl-sidebar: 232px;
    --gl-bottomnav: 64px;

    --bs-primary: var(--gl-primary);
    --bs-primary-rgb: 36, 83, 212;
    --bs-body-color: var(--gl-text);
    --bs-body-font-size: 0.95rem;
    --bs-border-color: var(--gl-border);
}

html { font-size: 16px; }

body {
    background: var(--gl-bg);
    color: var(--gl-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "Microsoft JhengHei", sans-serif;
}

/* Buttons and inputs: big enough to hit with a thumb. */
.btn { border-radius: 10px; font-weight: 500; }
.btn-primary { --bs-btn-bg: var(--gl-primary); --bs-btn-border-color: var(--gl-primary); --bs-btn-hover-bg: var(--gl-primary-dark); --bs-btn-hover-border-color: var(--gl-primary-dark); --bs-btn-active-bg: var(--gl-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--gl-primary); --bs-btn-border-color: var(--gl-primary); --bs-btn-hover-bg: var(--gl-primary); --bs-btn-hover-border-color: var(--gl-primary); }
.btn-lg { min-height: 48px; }
.form-control, .form-select { border-radius: 10px; min-height: 44px; }
.form-label { font-weight: 500; margin-bottom: 0.35rem; }
.form-text { color: var(--gl-muted); }
a { color: var(--gl-primary); }

.card-plain {
    background: var(--gl-surface);
    border: 1px solid var(--gl-border);
    border-radius: var(--gl-radius);
    padding: 1.25rem;
}

.text-muted { color: var(--gl-muted) !important; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--gl-text); }
.brand-text { font-weight: 800; font-size: 1.2rem; color: #0a1f55; white-space: nowrap; }
.brand-text .bt-tech { color: var(--gl-primary); }
.brand-text .bt-suffix { font-size: 0.62em; letter-spacing: 0.08em; color: var(--gl-accent); margin-left: 0.35em; }
/* Built-in mark (parcel + stacked labels); flips to a white parcel on dark backgrounds. */
.brand-mark { width: 34px; height: 34px; flex: none; margin-right: 0.45rem; }
.brand-mark .bm-box { fill: var(--gl-primary); }
.brand-mark .bm-edge { fill: none; stroke: #fff; stroke-width: 1.5; opacity: 0.4; }
.brand-mark .bm-tape { fill: none; stroke: var(--gl-accent); stroke-width: 3; }
.brand-mark .bm-l3 { fill: #dfe7fb; }
.brand-mark .bm-l2 { fill: #9db0e6; }
.brand-mark .bm-l1 { fill: #fff; }
.brand-mark .bm-bar { fill: #0a1f55; }
.brand-logo { max-height: 32px; max-width: 160px; }

/* ---------- Public pages ---------- */
.public-header { background: var(--gl-surface); border-bottom: 1px solid var(--gl-border); padding: 0.75rem 0; }
.public-main { padding-top: 2rem; padding-bottom: 3rem; min-height: calc(100vh - 140px); }
.public-footer { color: var(--gl-muted); font-size: 0.85rem; padding: 1.25rem 0; border-top: 1px solid var(--gl-border); }

.auth-card { max-width: 420px; margin: 0 auto; }
.auth-back { max-width: 420px; margin: 0 auto 0.75rem; }
.auth-back a { color: var(--bs-secondary-color); text-decoration: none; font-size: 0.925rem; }
.auth-back a:hover { color: var(--bs-primary); }
.auth-card h1 { font-size: 1.5rem; font-weight: 700; }

/* Price check (home page and /Quote) */
.quote-card {
    background: var(--gl-surface); border: 1px solid var(--gl-border); border-radius: var(--gl-radius);
    padding: 1.25rem; box-shadow: 0 6px 24px rgba(29, 36, 51, 0.06);
}
.quote-scope {
    display: inline-block; font-size: 0.8rem; font-weight: 600;
    color: var(--gl-primary); background: rgba(36, 83, 212, 0.08); border-radius: 999px; padding: 0.2rem 0.7rem;
}
.quote-unit { flex: 0 0 4.75rem; }
.quote-card details summary { cursor: pointer; width: fit-content; }
.quote-loading { height: 4.5rem; border-radius: var(--gl-radius); background: linear-gradient(90deg, var(--gl-border) 25%, var(--gl-bg) 50%, var(--gl-border) 75%); background-size: 200% 100%; animation: quote-shimmer 1.2s infinite; }
@keyframes quote-shimmer { to { background-position: -200% 0; } }
/* An icon inside the left edge of a price-check input. */
.quote-field { position: relative; }
.quote-field > i { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: #8a94a8; z-index: 6; pointer-events: none; }
.quote-field > .form-control { padding-left: 2.5rem; }
.quote-card .form-control-lg, .quote-card .input-group-lg > .form-control, .quote-card .input-group-lg > .form-select { min-height: 52px; border-width: 1.5px; }
.btn-quote { background-color: var(--gl-accent); border-color: var(--gl-accent); color: #2b1d00; min-height: 52px; font-weight: 600; }
.btn-quote:hover, .btn-quote:focus, .btn-quote:active, .btn-quote:disabled { background-color: #f0a800; border-color: #f0a800; color: #2b1d00; }

/* Price check results: one row per service. */
.quote-results { background: var(--gl-surface); border: 1px solid var(--gl-border); border-radius: var(--gl-radius); padding: 1rem; }
.quote-summary { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; color: var(--gl-muted); margin-bottom: 0.6rem; }
/* "Estimate only" banner above ZIP-based prices: must be impossible to miss. */
.quote-estimate-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; margin-bottom: 0.75rem;
    border: 2px solid #f0ad00; border-radius: 0.75rem; background: #fff8e1; color: #5c4400; }
.quote-estimate-note .bi-exclamation-triangle-fill { color: #e09b00; }
@media (max-width: 575.98px) { .quote-estimate-note .btn { width: 100%; } }
.offer-list { display: grid; gap: 0.6rem; }
.offer-row { display: flex; align-items: center; gap: 0.75rem; background: var(--gl-surface); border: 1px solid var(--gl-border); border-radius: var(--gl-radius); padding: 0.75rem 0.9rem; }
.offer-row.offer-best { border: 2px solid var(--gl-primary); }
.offer-price { font-size: 1.35rem; font-weight: 800; white-space: nowrap; }
@media (max-width: 575.98px) {
    .offer-row { flex-wrap: wrap; }
    .offer-row .me-auto { flex: 1 1 calc(100% - 4.5rem); }
    .offer-price { margin-left: auto; }
}

/* Carrier badge: the carrier's colours with an icon, not the official logo. */
.carrier-badge {
    flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    width: 3.6rem; height: 2.6rem; border-radius: 8px; border-bottom: 4px solid; color: #fff;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.1;
}
.carrier-badge i { font-size: 0.95rem; }
.carrier-usps { background: #004b87; border-color: #da291c; }
.carrier-fedex { background: #4d148c; border-color: #ff6200; }
.carrier-ups { background: #351c15; border-color: #ffb500; color: #ffb500; }

/* Site notice (admin → Site settings) */
.announcement { background: #fff4d6; border-bottom: 3px solid var(--gl-accent); color: #5c3d00; padding: 0.6rem 0; font-size: 0.92rem; }
.announcement-icon { color: #b37800; font-size: 1.05rem; line-height: 1.4; }
.announcement-link { color: #8a5a00; margin-left: 0.5rem; white-space: nowrap; }
.announcement-close { border: 0; background: transparent; color: #8a5a00; padding: 0 0.25rem; line-height: 1.4; }
.app-announcement { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0 1rem; max-width: 1100px; }
@media (min-width: 992px) { .app-announcement { padding: 0 1.75rem; } }

/* ---------- Home page ---------- */
.public-main-full { min-height: calc(100vh - 140px); }
body:has(.public-main-full) .public-header { border-bottom: 4px solid var(--gl-accent); box-shadow: 0 2px 10px rgba(10, 31, 85, 0.12); position: relative; z-index: 2; }
.home-hero {
    position: relative; color: #fff; padding: 2.25rem 0 2.5rem;
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 18px),
        linear-gradient(160deg, #0a1f55 0%, #14378f 60%, #1f4cc4 100%);
}
.home-hero-text { text-align: center; max-width: 760px; margin: 0 auto 1.5rem; }
.home-hero-text h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.25; margin: 0; }
.home-hero-text p { color: #c9d6f5; font-size: 1.05rem; margin: 0.6rem 0 0; }
.home-quote {
    max-width: 960px; margin: 0 auto; background: var(--gl-surface); color: var(--gl-text);
    border-radius: 16px; box-shadow: 0 18px 50px rgba(5, 18, 60, 0.45); overflow: hidden;
}
.home-quote-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid #eef1f6; }
.home-quote-head h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.home-quote-icon { width: 2rem; height: 2rem; border-radius: 8px; background: var(--gl-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.home-quote-pill { margin-left: auto; font-size: 0.78rem; font-weight: 600; color: var(--gl-primary); background: rgba(36, 83, 212, 0.08); border-radius: 999px; padding: 0.2rem 0.7rem; }
.home-quote .quote-card { border: 0; border-radius: 0; box-shadow: none; padding: 1.1rem 1.25rem; }
.home-quote .quote-scope { display: none; }
.home-results:empty { display: none; }
.home-results { background: #f7f9fc; border-top: 1px solid #eef1f6; padding: 1rem 1.25rem 1.25rem; }
.home-results .quote-results { background: transparent; border: 0; padding: 0; }
.home-points { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.75rem; margin: 1.25rem 0 0; padding: 0; color: #dbe4fb; font-size: 0.92rem; }
.home-points i { color: var(--gl-accent); margin-right: 0.4rem; }
.home-steps { padding: 2.5rem 0; background: var(--gl-surface); }
.home-step { display: flex; gap: 0.9rem; align-items: flex-start; }
.home-step h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.2rem; }
.home-step p { color: var(--gl-muted); font-size: 0.9rem; margin: 0; }
.home-step-icon { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 12px; background: rgba(36, 83, 212, 0.1); color: var(--gl-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.public-footer-dark { background: #0a1f55; color: #9fb0d6; border-top: 0; }

/* Wallet top-up */
.step-dot {
    display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; margin-right: 0.4rem;
    border-radius: 50%; background: var(--gl-primary); color: #fff; font-size: 0.75rem;
}
.topup-instructions { white-space: pre-line; overflow-wrap: anywhere; background: var(--gl-bg); border: 1px dashed var(--gl-border); border-radius: var(--gl-radius); padding: 0.75rem 1rem; font-size: 0.9rem; }
.receipt-thumb { max-width: 100%; max-height: 260px; border: 1px solid var(--gl-border); border-radius: var(--gl-radius); }

/* ---------- Signed-in shell ---------- */
.app { min-height: 100vh; }

/* Sidebar: the home page's dark blue, with faint parcel / truck / plane icons behind the menu. Admin: charcoal. */
.app-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--gl-sidebar);
    flex-direction: column; gap: 0.25rem; overflow: hidden;
    background: linear-gradient(175deg, #0a1f55 0%, #14378f 100%);
    padding: 1.25rem 0.75rem;
}
.app-admin .app-sidebar { background: linear-gradient(175deg, #1a1d24 0%, #2b303b 100%); }
.app-sidebar > :not(.sidebar-deco) { position: relative; z-index: 1; }
.sidebar-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.sidebar-deco i { position: absolute; line-height: 1; color: rgba(255, 255, 255, 0.06); }
.sidebar-deco .deco-box { font-size: 7rem; right: -1.75rem; bottom: 9rem; transform: rotate(-12deg); color: rgba(255, 255, 255, 0.07); }
.sidebar-deco .deco-truck { font-size: 6.5rem; left: -0.75rem; bottom: -0.75rem; }
.sidebar-deco .deco-plane { font-size: 2.75rem; right: 1rem; top: 45%; }
.sidebar-deco .deco-code { font-size: 2.5rem; left: 1.5rem; bottom: 15rem; transform: rotate(8deg); color: rgba(255, 180, 0, 0.12); }
.app-sidebar .brand { padding: 0 0.75rem 1rem; }
.app-sidebar .brand-text, .app-sidebar .brand-text .bt-tech { color: #fff; }
.app-sidebar .brand-mark .bm-box { fill: #fff; }
.app-sidebar .brand-mark .bm-edge { stroke: var(--gl-primary); opacity: 0.35; }
.app-sidebar .brand-mark .bm-l3 { fill: #2a4aa8; }
.app-sidebar .brand-mark .bm-l2 { fill: #6f8fe8; }
.app-sidebar .brand-mark .bm-l1 { fill: #dfe7fb; }
.app-sidebar .brand-logo { background: #fff; border-radius: 8px; padding: 4px 8px; }
.sidebar-badge {
    margin: -0.5rem 0.75rem 0.75rem; font-size: 0.75rem; font-weight: 600;
    color: #8a5a00; background: #fff4d6; border-radius: 6px; padding: 0.15rem 0.5rem; align-self: flex-start;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.sidebar-footer { margin-top: auto; }
.sidebar-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.75rem; border-radius: 10px; border-left: 3px solid transparent;
    color: #c9d6f5; text-decoration: none; font-weight: 500;
}
.app-admin .sidebar-link { color: #c3c8d2; }
.sidebar-link i { font-size: 1.15rem; color: inherit; opacity: 0.85; }
.sidebar-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-link.active { background: rgba(255, 255, 255, 0.14); color: #fff; border-left-color: var(--gl-accent); border-radius: 0 10px 10px 0; }
.sidebar-link.active i { color: var(--gl-accent); opacity: 1; }

.app-main { min-height: 100vh; }
.app-topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--gl-surface); border-bottom: 3px solid var(--gl-accent);
    padding: 0.6rem 1rem;
}
.topbar-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.app-content { padding: 1rem; padding-bottom: calc(var(--gl-bottomnav) + 1.5rem + env(safe-area-inset-bottom)); max-width: 1100px; }

.app-bottomnav {
    position: fixed; inset: auto 0 0 0; z-index: 1030;
    display: flex; height: calc(var(--gl-bottomnav) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--gl-surface); border-top: 1px solid var(--gl-border);
}
.bottomnav-link {
    flex: 1; display: flex; border-top: 3px solid transparent; margin-top: -1px; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--gl-muted); text-decoration: none; font-size: 0.72rem; font-weight: 500;
}
.bottomnav-link i { font-size: 1.3rem; }
.bottomnav-link.active { color: var(--gl-primary); border-top-color: var(--gl-accent); }

/* Coloured icon tile in front of a card title: <span class="title-icon"><i class="bi ..."></i></span>; .title-icon-warm for money. */
.title-icon {
    width: 1.9rem; height: 1.9rem; flex: none; border-radius: 8px; margin-right: 0.5rem;
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
    background: #e3ebff; color: var(--gl-primary); font-size: 1rem;
}
.title-icon-warm { background: #fff1cc; color: #8a5a00; }

@media (min-width: 992px) {
    .app-main { margin-left: var(--gl-sidebar); }
    .app-topbar { padding: 0.75rem 1.75rem; }
    .app-content { padding: 1.75rem; }
}

/* ---------- Dashboard ---------- */
.balance-amount { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.cta-card {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--gl-primary), #3d6cf0);
    color: #fff; border-radius: var(--gl-radius); padding: 1.5rem;
}
.cta-card > * { position: relative; }
.cta-card .cta-deco { position: absolute; right: -0.5rem; bottom: -1.5rem; font-size: 7.5rem; line-height: 1; color: rgba(255, 255, 255, 0.12); pointer-events: none; }
.cta-card .btn { background: var(--gl-accent); color: #2b1d00; border: 0; font-weight: 600; }
.cta-card .btn:hover { background: #ffc633; color: #2b1d00; }
.empty-state { text-align: center; color: var(--gl-muted); padding: 2rem 1rem; }
.empty-state i { font-size: 2.25rem; display: block; margin-bottom: 0.5rem; opacity: 0.6; }

.stat-value { font-size: 1.75rem; font-weight: 800; }

/* ---------- Wallet ---------- */
.ledger-icon {
    flex: none; width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gl-bg); color: var(--gl-muted);
}
.ledger-icon.in { background: #e6f6ec; color: #1e7b45; }

/* ---------- Admin catalog ---------- */
.form-select-sm.level-select { min-height: 36px; min-width: 9rem; }
.min-w-0 { min-width: 0; }
.carrier-tag {
    display: inline-block; min-width: 3.75rem; text-align: center;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em;
    padding: 0.3rem 0.5rem; border-radius: 6px;
    background: rgba(36, 83, 212, 0.08); color: var(--gl-primary);
}

/* ---------- Labels ---------- */
.form-select-sm.address-picker { min-height: 36px; width: auto; max-width: 100%; }

/* Password field with a show/hide eye button. */
.password-toggle { position: relative; }
.password-toggle .form-control { padding-right: 3rem; }
.password-toggle button {
    position: absolute; top: 0; right: 0; height: 100%; width: 3rem;
    border: 0; background: transparent; color: var(--gl-muted);
}
