html { font-size: 14px; box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
@media screen and (min-width: 640px) { html { font-size: 15px; } }
@media screen and (min-width: 1024px) { html { font-size: 16px; } }

body, button, input, textarea, select, div, span, h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans Thai', sans-serif !important;
}

body {
    background-color: #f0f4f8;
    margin: 0; padding: 0;
    overflow-x: hidden;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

#root {
    max-width: 100vw;
    overflow-x: hidden;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.animate-in { animation: fade-in 0.2s ease-out; }
.slide-up { animation: slide-up 0.2s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.combo-container { position: relative; }
.combo-list {
    max-height: 220px; overflow-y: auto; position: absolute; width: 100%;
    background: white; border: 1px solid #e2e8f0; border-radius: 1rem;
    z-index: 50; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    margin-top: 4px; padding: 0.5rem;
}
.combo-item { padding: 0.75rem 1rem; cursor: pointer; transition: all 0.2s; border-radius: 0.5rem; color: #475569; font-size: 0.95rem; }
.combo-item:hover { background-color: #eff6ff; color: #2563eb; font-weight: 500; }

.map-container { width: 100%; aspect-ratio: 1/1; border-radius: 1rem; z-index: 1; }
@media (min-width: 768px) { .map-container { aspect-ratio: 16/9; } }
.full-map-container { height: calc(100vh - 180px); width: 100%; border-radius: 1.5rem; z-index: 1; }

.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px; height: 20px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 8px);
}

.modal-safe {
    width: calc(100% - 2rem);
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

img {
    max-width: 100%;
    height: auto;
}

input, select, textarea {
    font-size: 16px !important;
}
@media screen and (min-width: 640px) {
    input, select, textarea {
        font-size: inherit !important;
    }
}

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: 1.25rem;
}

@media screen and (max-width: 360px) {
    .customer-grid { grid-template-columns: 1fr !important; }
}

.text-safe {
    word-break: break-word;
    overflow-wrap: anywhere;
}