/* ============================================================
   NANA KITCHEN — CLIENT ORDERING PAGE
   Glassmorphism Pastel Redesign (เข้าชุดกับหน้า Admin)
   ไม่แก้ class/id เดิม — ทับด้วย CSS selector ล้วน
   ============================================================ */

:root {
    /* Pastel palette — เข้าชุดกับ admin */
    --c-peach:    #ffd6a5;
    --c-coral:    #ffb4a2;
    --c-pink:     #ffc8dd;
    --c-lavender: #cdb4db;
    --c-sky:      #bde0fe;
    --c-mint:     #b9fbc0;
    --c-cream:    #fff5e6;

    /* Brand */
    --brand:      #ff8c42;
    --brand-deep: #ff6b35;
    --brand-soft: #ffb88c;

    /* Semantic (pastel versions) */
    --info-bg:    #bde0fe;
    --info-fg:    #1c5582;
    --success-bg: #b9fbc0;
    --success-fg: #166534;
    --warning-bg: #fde68a;
    --warning-fg: #92400e;
    --danger-bg:  #fecaca;
    --danger-fg:  #991b1b;

    /* Glass */
    --glass:        rgba(255, 255, 255, 0.55);
    --glass-strong: rgba(255, 255, 255, 0.78);
    --glass-soft:   rgba(255, 255, 255, 0.35);
    --glass-border: rgba(255, 255, 255, 0.65);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    --glass-shadow-lg: 0 12px 40px rgba(31, 38, 135, 0.18);

    /* Text */
    --text:       #2d3142;
    --text-soft:  #6c7086;
    --text-muted: #9ca3af;

    /* Radius */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 26px;
}

/* ═════════════ BACKGROUND: Pastel Mesh + Blobs ═════════════ */
body {
    background: linear-gradient(135deg, #fef6e4 0%, #f5e6f5 35%, #e0f0ff 70%, #e8fff0 100%) !important;
    background-attachment: fixed;
    color: var(--text) !important;
    font-family: 'Sarabun', sans-serif !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    animation: floatBlob 22s ease-in-out infinite;
}
body::before {
    width: 420px; height: 420px;
    background: radial-gradient(circle, var(--c-peach), var(--c-coral));
    top: -100px; right: -120px;
}
body::after {
    width: 480px; height: 480px;
    background: radial-gradient(circle, var(--c-lavender), var(--c-sky));
    bottom: -180px; left: -160px;
    animation-delay: -11s;
}
@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(25px, -35px) scale(1.04); }
}

body > .container {
    position: relative;
    z-index: 1;
}

/* ═════════════ USER PROFILE BAR ═════════════ */
#userProfileBar {
    background: var(--glass-strong) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-left: 5px solid #10b981 !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--glass-shadow) !important;
}

/* ═════════════ HERO (Customer Type Selection) ═════════════ */
#customerTypeSelection {
    position: relative;
    margin-top: 24px !important;
}

/* Member card (highlight เด่น) */
#customerTypeSelection .card.border-info {
    background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(189, 224, 254, 0.55)) !important;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--glass-shadow) !important;
    overflow: hidden;
    position: relative;
}
#customerTypeSelection .card.border-info::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(255, 140, 66, 0.3), transparent 70%);
    pointer-events: none;
}

/* Guest card */
#customerTypeSelection .card.border-primary {
    background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(253, 230, 138, 0.45)) !important;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--glass-shadow) !important;
}

/* Card headers โปร่งใส */
#customerTypeSelection .card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255,255,255,0.5) !important;
    color: var(--text) !important;
    font-weight: 600;
    padding-top: 14px;
    padding-bottom: 10px;
}
#customerTypeSelection .card-header.bg-info,
#customerTypeSelection .card-header.bg-primary {
    background: transparent !important;
    color: var(--text) !important;
}
#customerTypeSelection .card-header.bg-info h5,
#customerTypeSelection .card-header.bg-primary h5 {
    color: var(--text) !important;
}

/* ═════════════ GENERIC CARDS ═════════════ */
.card {
    background: var(--glass) !important;
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--glass-shadow) !important;
    overflow: hidden;
}
.card.border-0 { border: 1px solid var(--glass-border) !important; }
.card.border-info,
.card.border-primary,
.card.border-danger,
.card.border-success,
.card.border-warning {
    /* คง border ไว้เพื่อเน้น แต่เปลี่ยนสีให้ pastel */
}

.card-header {
    background: rgba(255, 255, 255, 0.35) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: var(--text) !important;
    font-weight: 600;
    border-radius: var(--r-lg) var(--r-lg) 0 0 !important;
}

/* Card headers สีต่างๆ — เปลี่ยนเป็น pastel */
.card-header.bg-info {
    background: linear-gradient(135deg, rgba(189, 224, 254, 0.75), rgba(133, 183, 235, 0.6)) !important;
    color: var(--info-fg) !important;
}
.card-header.bg-info h6,
.card-header.bg-info h5 { color: var(--info-fg) !important; }

.card-header.bg-primary {
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.8), rgba(255, 107, 53, 0.7)) !important;
    color: white !important;
}
.card-header.bg-primary h6 { color: white !important; }

.card-header.bg-danger {
    background: linear-gradient(135deg, rgba(255, 180, 162, 0.75), rgba(255, 154, 139, 0.65)) !important;
    color: #7a2a1a !important;
}
.card-header.bg-danger h6 { color: #7a2a1a !important; }

.card-header.bg-success {
    background: linear-gradient(135deg, rgba(185, 251, 192, 0.8), rgba(143, 217, 168, 0.65)) !important;
    color: var(--success-fg) !important;
}
.card-header.bg-success h6 { color: var(--success-fg) !important; }

.card-header.bg-secondary {
    background: linear-gradient(135deg, rgba(205, 180, 219, 0.65), rgba(189, 167, 205, 0.55)) !important;
    color: #3a2e55 !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, rgba(253, 230, 138, 0.75), rgba(252, 211, 77, 0.6)) !important;
    color: var(--warning-fg) !important;
}

.card-header.bg-white {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* กรณี card ใน modal - ปกติ */
.modal-body .card {
    background: rgba(255, 255, 255, 0.85) !important;
}

/* ═════════════ CUSTOMER SECTION (Forms) ═════════════ */
#customerSection {
    border-top: 1px dashed rgba(255, 140, 66, 0.25) !important;
    margin-top: 20px !important;
    padding-top: 24px !important;
}

/* ═════════════ BUTTONS ═════════════ */
.btn {
    border-radius: var(--r-sm) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep)) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    background: linear-gradient(135deg, var(--brand-deep), #e65a28) !important;
    box-shadow: 0 6px 18px rgba(255, 107, 53, 0.4) !important;
    color: white !important;
}

.btn-success {
    background: linear-gradient(135deg, #6ec98a, #10b981) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-success:not(:disabled):hover {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}
.btn-success:disabled,
.btn-success.disabled {
    background: rgba(156, 163, 175, 0.6) !important;
    color: white !important;
    box-shadow: none !important;
    opacity: 0.7;
}

.btn-info {
    background: linear-gradient(135deg, #6dc7d9, #17a2b8) !important;
    border: none !important;
    color: white !important;
}

.btn-warning {
    background: linear-gradient(135deg, #ffd56b, #ffa800) !important;
    border: none !important;
    color: #5a3a1a !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ff8a8a, #e74c3c) !important;
    border: none !important;
    color: white !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.6) !important;
    color: var(--text) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    color: var(--text) !important;
}

.btn-light {
    background: rgba(255, 255, 255, 0.7) !important;
    color: var(--text) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn-light:hover {
    background: rgba(255, 255, 255, 0.95) !important;
}

.btn-white {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(8px);
}

.btn-outline-primary {
    background: rgba(255,255,255,0.4) !important;
    color: var(--brand-deep) !important;
    border: 1.5px solid var(--brand-soft) !important;
    backdrop-filter: blur(8px);
}
.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep)) !important;
    color: white !important;
    border-color: transparent !important;
}

.btn-outline-secondary {
    background: rgba(255,255,255,0.4) !important;
    color: var(--text-soft) !important;
    border: 1.5px solid rgba(156, 163, 175, 0.5) !important;
}
.btn-outline-secondary:hover {
    background: rgba(255,255,255,0.75) !important;
    color: var(--text) !important;
}

.btn-outline-dark {
    background: rgba(255,255,255,0.6) !important;
    color: var(--text) !important;
    border: 1.5px solid rgba(45, 49, 66, 0.2) !important;
    backdrop-filter: blur(8px);
}
.btn-outline-dark:hover {
    background: var(--text) !important;
    color: white !important;
    border-color: var(--text) !important;
}

.btn-link {
    color: var(--brand-deep) !important;
}
.btn-link:hover { color: var(--brand) !important; }

/* Submit order button — ให้เด่นสุด */
#saveBtn {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep)) !important;
    color: white !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4) !important;
    padding: 16px !important;
    transition: all 0.25s ease !important;
}
#saveBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.55) !important;
}
#saveBtn:disabled {
    background: rgba(156, 163, 175, 0.5) !important;
    color: rgba(255,255,255,0.85) !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* Confirm location button ใน map modal */
#btnConfirmLocation {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep)) !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px !important;
    font-weight: 600 !important;
    font-size: 1.05rem !important;
    box-shadow: 0 6px 18px rgba(255, 107, 53, 0.3) !important;
}

/* ═════════════ FORMS ═════════════ */
.form-control,
.custom-select,
select.form-control {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: var(--r-sm) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text) !important;
    transition: all 0.2s ease;
    padding: 10px 14px;
}
.form-control:focus,
.custom-select:focus {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: var(--brand-soft) !important;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.2) !important;
    outline: none;
}
.form-control::placeholder { color: var(--text-muted); }

.input-group-text {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: var(--r-sm) !important;
    color: var(--text-soft) !important;
}

textarea.form-control { min-height: 60px; }

/* Date/time inputs */
input[type="date"].form-control,
input[type="time"].form-control {
    font-weight: 500;
    color: var(--text) !important;
}

/* ═════════════ ALERTS ═════════════ */
.alert {
    border-radius: var(--r-md) !important;
    border: 1px solid rgba(255,255,255,0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 14px 18px;
}
.alert-info {
    background: rgba(189, 224, 254, 0.55) !important;
    color: var(--info-fg) !important;
}
.alert-warning {
    background: rgba(253, 230, 138, 0.55) !important;
    color: var(--warning-fg) !important;
}
.alert-success {
    background: rgba(185, 251, 192, 0.55) !important;
    color: var(--success-fg) !important;
}
.alert-danger {
    background: rgba(254, 202, 202, 0.55) !important;
    color: var(--danger-fg) !important;
}

#memberWelcome {
    background: linear-gradient(135deg, rgba(185, 251, 192, 0.6), rgba(189, 224, 254, 0.4)) !important;
    border: 1px solid rgba(255,255,255,0.75) !important;
}

/* ═════════════ BADGES ═════════════ */
.badge {
    border-radius: 10px !important;
    padding: 4px 10px !important;
    font-weight: 500 !important;
}
.badge-info {
    background: rgba(189, 224, 254, 0.8) !important;
    color: var(--info-fg) !important;
}
.badge-success {
    background: rgba(185, 251, 192, 0.85) !important;
    color: var(--success-fg) !important;
}
.badge-warning {
    background: rgba(253, 230, 138, 0.85) !important;
    color: var(--warning-fg) !important;
}
.badge-danger {
    background: rgba(254, 202, 202, 0.85) !important;
    color: var(--danger-fg) !important;
}
.badge-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep)) !important;
    color: white !important;
}

/* ═════════════ CART LIST ═════════════ */
#cartContainer,
#cartEmptyMsg {
    background: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px dashed rgba(255, 140, 66, 0.3) !important;
    border-radius: var(--r-md) !important;
    color: var(--text-soft) !important;
}

#cartEmptyMsg i {
    color: var(--brand-soft) !important;
}

/* Item rows ใน cart (จริงๆ อยู่ในของ JS render) */
#cartContainer > div:not(#cartEmptyMsg) {
    border-radius: var(--r-md);
}

/* Instant food summary */
#instant-food-summary {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(14px) !important;
    border: 1px solid var(--glass-border) !important;
    border-left: 5px solid #10b981 !important;
    border-radius: var(--r-md) !important;
    box-shadow: var(--glass-shadow) !important;
}
#instant-food-total {
    color: var(--success-fg) !important;
}

/* ═════════════ MODALS ═════════════ */
.modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: 0 25px 70px rgba(0,0,0,0.3) !important;
}
.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    border-radius: var(--r-lg) var(--r-lg) 0 0 !important;
}
.modal-header.bg-info {
    background: linear-gradient(135deg, rgba(189, 224, 254, 0.9), rgba(133, 183, 235, 0.8)) !important;
    color: var(--info-fg) !important;
}
.modal-header.bg-info h5,
.modal-header.bg-info .close { color: var(--info-fg) !important; }

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.06) !important;
}

.close {
    color: var(--text) !important;
    opacity: 0.6;
    text-shadow: none;
}
.close:hover { opacity: 1; }

/* Map modal */
#mapSelectionModal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ═════════════ TABLES ═════════════ */
.table {
    background: transparent;
    color: var(--text) !important;
}
.table thead th {
    background: rgba(255, 255, 255, 0.4) !important;
    color: var(--text-soft) !important;
    border: none !important;
    font-weight: 600;
    font-size: 0.85rem;
}
.table tbody td {
    border-color: rgba(0,0,0,0.05) !important;
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background: rgba(255, 140, 66, 0.06) !important;
}
.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* ═════════════ DROPDOWNS ═════════════ */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--r-md) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12) !important;
    padding: 6px !important;
}
.dropdown-item {
    border-radius: 8px !important;
    color: var(--text) !important;
    padding: 8px 12px !important;
}
.dropdown-item:hover {
    background: rgba(255, 140, 66, 0.1) !important;
    color: var(--brand-deep) !important;
}

/* ═════════════ LINKS: Line / Facebook / Call ═════════════ */
a[href^="tel:"] {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1.5px solid var(--glass-border) !important;
    border-radius: 50px !important;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}
a[href^="tel:"]:hover {
    background: white !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* LINE button */
a[href*="line.me"] {
    background: linear-gradient(135deg, #00c96c, #00b14f) !important;
    box-shadow: 0 4px 14px rgba(0, 177, 79, 0.3);
    border: none !important;
}
a[href*="line.me"]:hover {
    box-shadow: 0 6px 20px rgba(0, 177, 79, 0.5);
}

/* Facebook button */
a[href*="facebook.com"] {
    background: linear-gradient(135deg, #1877f2, #0d5ab8) !important;
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.3);
    border: none !important;
}
a[href*="facebook.com"]:hover {
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.5);
}

/* ═════════════ HEADINGS & MISC ═════════════ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
}

hr {
    border-top-color: rgba(255, 140, 66, 0.25) !important;
}

.text-primary { color: var(--brand-deep) !important; }
.text-info    { color: var(--info-fg) !important; }
.text-success { color: var(--success-fg) !important; }
.text-warning { color: var(--warning-fg) !important; }
.text-danger  { color: var(--danger-fg) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-soft) !important; }

/* Backgrounds */
.bg-light {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(6px);
}
.bg-white {
    background: rgba(255, 255, 255, 0.8) !important;
}

/* border utilities ให้ดูนุ่มขึ้น */
.border { border-color: rgba(255, 255, 255, 0.6) !important; }

/* ═════════════ STATUS CONFIRMATION CARDS (Modal summary) ═════════════ */
.card.bg-info.text-white {
    background: linear-gradient(135deg, rgba(189, 224, 254, 0.9), rgba(133, 183, 235, 0.75)) !important;
    color: var(--info-fg) !important;
}
.card.bg-info.text-white * { color: var(--info-fg) !important; }

.card.bg-success.text-white {
    background: linear-gradient(135deg, rgba(185, 251, 192, 0.9), rgba(143, 217, 168, 0.75)) !important;
    color: var(--success-fg) !important;
}
.card.bg-success.text-white * { color: var(--success-fg) !important; }

/* ═════════════ ADDRESS BOOK ═════════════ */
#addressBookSection .list-group-item {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--r-sm) !important;
    margin-bottom: 6px;
    color: var(--text);
}
#addressBookSection .list-group-item.active {
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.85), rgba(255, 107, 53, 0.75)) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.25);
}

/* ═════════════ CUSTOM SCROLLBAR ═════════════ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.04); border-radius: 10px; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 140, 66, 0.35);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 140, 66, 0.55); }

/* ═════════════ FLOATING ELEMENTS ═════════════ */
.shadow, .shadow-sm, .shadow-lg {
    box-shadow: var(--glass-shadow) !important;
}

/* ═════════════ MAP (Leaflet) ═════════════ */
.leaflet-container {
    border-radius: var(--r-md);
    overflow: hidden;
}

/* ═════════════ RESPONSIVE ═════════════ */
@media (max-width: 767px) {
    body::before, body::after { opacity: 0.35; }
    .card { border-radius: var(--r-md) !important; }
    #saveBtn { font-size: 1.05rem !important; padding: 14px !important; }
}

/* ═════════════ LOGIN / Sign-in buttons ═════════════ */
button[onclick*="google"],
.g_id_signin {
    border-radius: var(--r-md) !important;
}

/* Google-like button styling */
button[onclick*="handleGoogle"],
button[onclick*="loginWith"] {
    background: white !important;
    border: 1.5px solid var(--glass-border) !important;
    color: var(--text) !important;
    padding: 12px !important;
    border-radius: var(--r-md) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    transition: all 0.2s ease;
}
button[onclick*="handleGoogle"]:hover,
button[onclick*="loginWith"]:hover {
    background: white !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
    transform: translateY(-1px);
}

/* ═════════════════════════════════════════════
   [ADD 2026-04-24] ADMIN ORDER BANNER (P3)
   แสดงเมื่อแอดมินสั่งซื้อแทนลูกค้า
   ═════════════════════════════════════════════ */
.admin-order-banner {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.35);
    margin: -16px -16px 16px -16px;  /* ขยายให้เต็มกว้างถ้ามี padding ที่ container */
    animation: slideDownBanner 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    overflow: hidden;
    position: relative;
}
.admin-order-banner::before {
    content: "";
    position: absolute;
    top: -30px; right: -30px;
    width: 140px; height: 140px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    pointer-events: none;
}
.admin-order-banner::after {
    content: "";
    position: absolute;
    bottom: -50px; left: 20%;
    width: 100px; height: 100px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}
@keyframes slideDownBanner {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}

.admin-order-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    max-width: 100%;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.admin-order-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.admin-order-text {
    flex: 1;
    min-width: 180px;
    line-height: 1.4;
}
.admin-order-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.92;
    margin-bottom: 1px;
}
.admin-order-customer {
    font-size: 0.95rem;
    font-weight: 500;
}
.admin-order-customer strong {
    font-size: 1rem;
    margin-right: 6px;
}
.admin-order-phone, .admin-order-history {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    padding: 1px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    margin-right: 6px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.admin-order-back-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #c2410c !important;
    padding: 7px 14px;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.84rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.admin-order-back-btn:hover {
    background: white;
    color: #c2410c !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none !important;
}

@media (max-width: 576px) {
    .admin-order-banner-inner { padding: 10px 14px; gap: 10px; }
    .admin-order-text { min-width: 140px; }
    .admin-order-title { font-size: 0.72rem; }
    .admin-order-customer { font-size: 0.86rem; }
    .admin-order-phone, .admin-order-history { font-size: 0.72rem; padding: 1px 8px; }
    .admin-order-back-btn { font-size: 0.78rem; padding: 6px 10px; }
}

/* ═════════════════════════════════════════════
   [ADD 2026-04-24] OVER QUOTA WARNING MODAL
   เมื่อ admin จะสั่งเกิน quota
   ═════════════════════════════════════════════ */
.over-quota-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.over-quota-modal {
    background: white;
    border-radius: 18px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: popIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.over-quota-header {
    background: linear-gradient(135deg, #fb923c, #ea580c);
    color: white;
    padding: 22px 24px;
    text-align: center;
}
.over-quota-icon {
    width: 60px; height: 60px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 10px;
}
.over-quota-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.over-quota-body {
    padding: 22px 24px;
}
.over-quota-msg {
    font-size: 0.96rem;
    color: #2d3142;
    line-height: 1.6;
    margin-bottom: 16px;
}
.over-quota-msg strong { color: #c2410c; }

.over-quota-stat-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
}
.over-quota-stat-box .label { color: #6b7280; }
.over-quota-stat-box .value { color: #c2410c; font-weight: 700; }

.over-quota-reason-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 6px;
}
.over-quota-reason-input {
    width: 100%;
    border: 1.5px solid #fed7aa;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.94rem;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
    transition: border-color 0.15s;
}
.over-quota-reason-input:focus {
    outline: none;
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.over-quota-confirm-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 14px;
    background: #fef3c7;
    border-radius: 10px;
    font-size: 0.88rem;
    color: #78350f;
    cursor: pointer;
}
.over-quota-confirm-check input { transform: scale(1.2); }

.over-quota-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px 22px;
    border-top: 1px solid #f3f4f6;
}
.over-quota-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    font-family: inherit;
}
.over-quota-btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
}
.over-quota-btn-cancel:hover { background: #e5e7eb; }
.over-quota-btn-confirm {
    background: linear-gradient(135deg, #fb923c, #ea580c);
    color: white;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}
.over-quota-btn-confirm:hover {
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.45);
    transform: translateY(-1px);
}
.over-quota-btn-confirm:disabled {
    background: #d1d5db !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ═════════════ PRINT (คงเดิม) ═════════════ */
@media print {
    body::before, body::after { display: none; }
    body {
        background: white !important;
        backdrop-filter: none !important;
    }
    .card {
        background: white !important;
        backdrop-filter: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ═════════════════════════════════════════════
   [ADD 2026-04-25] BUILDER SLOT SELECTED STATE
   แยกชัดเจนระหว่าง slot ที่เลือกแล้ว vs ยังไม่เลือก
   ใช้ attribute selector — ทำงานอัตโนมัติเมื่อ JS set data-selected-menu
   ═════════════════════════════════════════════ */

/* Slot ที่เลือกเมนูแล้ว — พื้นหลังเขียวพาสเทล + แถบเขียวด้านซ้าย (ใช้ inset shadow แทน border) */
.builder-slot-card[data-selected-menu]:not([data-selected-menu=""]) {
    background: linear-gradient(135deg,
                rgba(185, 251, 192, 0.55),
                rgba(220, 252, 231, 0.45)) !important;
    box-shadow: inset 4px 0 0 #10b981, 0 2px 8px rgba(16, 185, 129, 0.12) !important;
    transition: all 0.3s ease;
}

/* Header ของ slot ที่เลือกแล้ว — โปร่งใสให้เห็นพื้นหลังเขียว */
.builder-slot-card[data-selected-menu]:not([data-selected-menu=""]) .builder-slot-header {
    background: transparent !important;
    border-bottom: none !important;
}

/* Slot ที่ยังไม่ได้เลือก — โค้งมนสะอาด ไม่มี border-left */
.builder-slot-card:not([data-selected-menu]),
.builder-slot-card[data-selected-menu=""] {
    background: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.2s ease;
}

/* Hover effect บน slot ที่ยังไม่เลือก */
.builder-slot-card:not([data-selected-menu]) .builder-slot-header:hover,
.builder-slot-card[data-selected-menu=""] .builder-slot-header:hover {
    background: rgba(255, 248, 235, 0.6) !important;
}

/* Icon ที่ยังไม่เลือก (➕) ให้ดูเด่นเป็นสีส้ม Nana */
.builder-slot-card:not([data-selected-menu]) .toggle-icon,
.builder-slot-card[data-selected-menu=""] .toggle-icon {
    color: #ff8c42 !important;
    background: rgba(255, 140, 66, 0.12);
    border-radius: 50%;
    padding: 2px;
    width: 22px;
    height: 22px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Animation เมื่อเปลี่ยนสถานะเป็น selected */
@keyframes slotSelectedPulse {
    0%   { box-shadow: inset 4px 0 0 #10b981, 0 2px 8px rgba(16, 185, 129, 0.2); }
    50%  { box-shadow: inset 4px 0 0 #10b981, 0 4px 16px rgba(16, 185, 129, 0.3); }
    100% { box-shadow: inset 4px 0 0 #10b981, 0 2px 8px rgba(16, 185, 129, 0.12); }
}
.builder-slot-card[data-selected-menu]:not([data-selected-menu=""]) {
    animation: slotSelectedPulse 0.4s ease;
}

/* ═════════════════════════════════════════════
   [ADD 2026-04-26] CART SUMMARY MERGE
   รวมยอดรวมไว้ใน "รายการในตะกร้า" — ลบความซ้ำซ้อน
   ═════════════════════════════════════════════ */

/* ซ่อน list ของ "สรุปรายการอาหาร" (ซ้ำกับตะกร้า) */
#instant-food-summary #instant-food-list {
    display: none !important;
}

/* ซ่อน text "ตรวจสอบความถูกต้องก่อนคำนวณค่าส่ง" + hr ที่ไม่ต้องการ */
#instant-food-summary small.text-muted,
#instant-food-summary hr {
    display: none !important;
}

/* แปลง "สรุปรายการอาหาร" ให้เป็น "Total Bar" ที่ดูเหมือน footer ของตะกร้า */
#instant-food-summary {
    margin-top: -8px !important;
    border-radius: 0 0 var(--r-md) var(--r-md) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-left: none !important;
    border-top: 2px dashed rgba(16, 185, 129, 0.3) !important;
    background: linear-gradient(135deg,
                rgba(220, 252, 231, 0.65),
                rgba(187, 247, 208, 0.55)) !important;
    backdrop-filter: blur(12px);
    padding: 14px 20px !important;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.08) !important;
}

/* เปลี่ยน label จาก "สรุปรายการอาหาร" ให้สั้นลง */
#instant-food-summary h5 {
    font-size: 1rem !important;
    color: var(--success-fg) !important;
    margin: 0 !important;
    font-weight: 600 !important;
}
#instant-food-summary h5 i {
    display: none !important;
}
#instant-food-summary h5::before {
    content: "💰 ";
}

/* ขยายตัวเลขยอดรวมให้เด่น */
#instant-food-summary #instant-food-total {
    font-size: 1.6rem !important;
    line-height: 1 !important;
}

/* ใช้ flex จัดให้พอดีในบรรทัดเดียว ใน mobile ก็ดูดี */
#instant-food-summary > .d-flex {
    align-items: center !important;
}

/* ระยะห่างของ cart container */
#cartContainer {
    margin-bottom: 0 !important;
}

/* No Image placeholder ดูสวยขึ้น (พื้นหลังพาสเทล + ไอคอน) */
.cart-image-placeholder,
.order-item img[src=""],
.order-item img:not([src]) {
    background: linear-gradient(135deg,
                rgba(255, 214, 165, 0.4),
                rgba(255, 200, 221, 0.4)) !important;
    border: 1px dashed rgba(255, 140, 66, 0.3) !important;
    color: rgba(255, 140, 66, 0.6) !important;
    font-size: 0.65rem !important;
    text-align: center;
}
