html, body {
    overflow-x: hidden;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    height: 100vh;
    background-color: #FAFAFA;
    margin: 0 auto;
    overflow-x: hidden;

    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* TOAST */
.toast-overlay.success .toast-icon { color: #22c55e; }
.toast-overlay.error .toast-icon { color: #ef4444; }
.toast-overlay.warning .toast-icon { color: #f59e0b; }
.toast-overlay.info .toast-icon { color: #3b82f6; }

.page {
    margin-top: .5rem;
}

a {
    text-decoration: none;
    color: inherit;
}

.label.required::after, label.required::after {
    color: red;
    content: ' *';
}

.input-error {
    border: 2px solid #dc3545 !important;
    border-radius: 8px;
}

.brand {
    color: #BBFF00;
}

.bg-brand {
    background-color: #BBFF00;
    color: #333231;
}

label {
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

input, textarea {
    font-size: 16px; /* prevents iOS zoom */
}

input[type="checkbox"]{
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
}

#washFilterModal input[type="checkbox"] {
    width: 20px;
    width: 20px;
    margin-bottom: 0px;
}

#washFilterModal .form-control {
    padding: .25rem;
}

#washFilterModal .ts-wrapper .ts-control {

    padding: .5rem 2.25rem .5rem .75rem !important;
}

#washFilterModal label {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.form-control {
    padding: .75rem .5rem;
}

.form-group {
    margin-bottom: 1rem;
}

#app-loader {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top-color: #BBFF00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #FFFFFF;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0px 0px 10px 0px rgb(0,0,0,.05);
    z-index: 1000;
}

/* nav items */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 11px;
    text-decoration: none;
    gap: 2px;
    width: 20%;
    text-align: center;
}

.nav-item i {
    font-size: 21px;
}

/* active state (this matters a LOT for UX) */
.nav-item.active {
    color: #BBFF00;
}

/* FAB */
.bottom-nav .fab {
    position: relative;
    top: -15px;
}

.bottom-nav .fab i {
    background-color: #333231;
    color: #BBFF00;
    padding: 20px;
    border-radius: 50%;
}

.top-link {
    font-weight: 100;
    font-size: 1rem
}

.group .swipe-item {
    border-bottom: 1px solid #EEEEEE;
}

.group .swipe-item:last-child {
    border-bottom: none;
}

.list .title {
    font-weight: 500;
    font-size: 1rem;
}

.list .description {
    font-size: .875rem;
    color: #999999;
}

/* give page content breathing room */
#app-content {
    padding-bottom: 90px;
}

.btn {
    padding: .875rem .75rem;
    margin: .5rem;
    font-weight: 500;
    border: none;
}

.btn-sm {
    padding: .25rem 1rem;
}

.btn-xsm {
    padding: .5rem .75rem;
}

.btn-circle {
    padding: 7px 14px;
    border-radius: 50%;
}

.btn-circle.dropdown-toggle::after {
    display: none !important;
}

/* DROP DOWNS */
.dropdown-menu.mobile-menu {
    min-width: 220px;
    border: none;
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden;
}
.dropdown-menu.mobile-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.15s ease;
}
.dropdown-menu.mobile-menu .dropdown-item:active,
.dropdown-menu.mobile-menu .dropdown-item:hover {
    background: #f3f5f7;
}
.dropdown-menu.mobile-menu i {
    width: 20px;
    text-align: center;
    opacity: 0.8;
}

.add {
    background-color: #FFFFFF;
    padding: 10px 15px;
    border-radius: 50%;
    box-shadow: 0px 0px 5px 0px rgb(0,0,0,.15);
}

.filter-pill {
    border-radius: 15px;
    padding: 5px 10px;
    background-color: #FFFFFF;
    box-shadow: 0px 0px 5px 0px rgb(0, 0, 0, .15);
}

.filter-pill.active {
    background-color: #BBFF00;
    color: #333231;
}

/* GROUP */
.group {
    background-color: #FFFFFF;
    border-radius: 5px;
    box-shadow: 0px 0px 5px 0px rgb(0,0,0,.05);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ALERTS */
.btn-primary {
    background-color: #BBFF00;
    border: #BBFF00;
    color: #333231;

}

.btn-primary:active, .btn-primary:hover {
    background-color: #333231;
    color: #BBFF00;
    border-color: #333231;
}

.btn-secondary {
    background-color: #333231;
    border: #333231;
    color: #FFFFFF;
}

.btn-secondary:active, .btn-secondary:hover {
    background-color: #BBFF00;
    color: #333231;
    border-color: #BBFF00;
}

.btn-remove {
    background-color: red;
    border-radius: 50%;
    color: #FFFFFF;
    border: red;
    padding: 0px 4px;
    position: absolute;
    margin-left: -10px;
    font-size: 10px;
}

/* AVATAR */
.avatar {
    background-color: #BBFF00;
    border-radius: 50%;
}

.avatar-inner {
    padding: 10px 15px;
    font-weight: 500;
    font-size: 1.2rem;
    width: 53px;
    text-align: center;
}

/* ALERTS */
.input-error {
    border: 2px solid #ff3b30 !important;
    background: rgba(255, 59, 48, 0.08);
}

.error-shake {
    animation: shake 0.25s ease-in-out;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

.status-box {
    display: none;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 500;
}

.status-box.success {
    background: #d1fae5;
    color: #065f46;
}

.status-box.error {
    background: #fee2e2;
    color: #991b1b;
}

.status-box.info {
    background: #e0f2fe;
    color: #075985;
}

/* ACTIVE WASH */
.active-wash-banner {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: #BBFF00;
    color: #333231;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
}

.active-wash-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#activeWashCustomer {
    font-weight: bold;
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
}

/* PAGE */
.page {
    padding: 16px;
    padding-bottom: 80px; /* space for bottom nav */
}

.page-header h2 {
    margin: 0;
}

.card {
    background: #1c1c1e;
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
}

/* NEW WASH */
.container {
        margin: 0 auto;
        padding: 15px;
    }

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 1rem 0rem;
}

.header h1 {
    margin-bottom: 0px;
}

.btn-back {
    color: #AAAAAA;
}

.card {
    background: white;
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

input, textarea {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    font-size: 16px;
    outline: none;
}

input:focus, textarea:focus {
    border-color: #007bff;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #FAFAFA;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    box-shadow: 0px 0px 7px 0px rgb(0 0 0 / 15%);

    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.top-action {
    padding: .65rem .75rem;
    margin: 0px;
}

.label {
    font-size: 12px;
    color: #777;
    margin-bottom: 5px;
}

/* PHOTO UPLOADS */
.photo-grid {
    display: flex;
    gap: 12px;
}

.photo-box {
    flex: 1;
    background: #FAFAFA;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    color: white;
    position: relative;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid #DDDDDD;
}

.photo-box:active {
    transform: scale(0.98);
}

/* inner icon + label */
.photo-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.photo-inner i {
    font-size: 24px;
    color: #333231;
}

.photo-inner span {
    font-size: 13px;
    color: #ccc;
}

/* previews overlay */
.photo-preview {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    min-height: 70px;
    padding: 8px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #DDDDDD;
}

.photo-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.photo-preview:empty {
    display: none;
}

.photo-preview-wrapper {
    display: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.photo-preview-wrapper.hidden {
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
}

.photo-count {
    position: absolute;
    top: -15px;
    padding: 15px;
    background: #BBFF00;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FAFAFA;
}

.preview-section {
    display: flex;
    gap: 12px;
}

.preview-section > div {
    flex: 1;
}

.preview-title {
    font-size: 12px;
    color: #777;
    margin-bottom: 6px;
}

/* REMOVE BUTTON */
.photo-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #ff3b30;
    color: white;
    font-size: 14px;
    line-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.photo-remove-btn:active {
    transform: scale(0.9);
}

/* SETTINGS */
.setting {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #DDDDDD
}

.setting i {
    padding-left: 1.2rem;
    font-size: 1.5rem;
}
.setting-name {
    padding: 1rem 1.2rem;
    line-height: 1rem;
}

.setting small {
    font-size: .75rem;
}

/* TOAST */
.toast-container {
    position: fixed;
    width: 100%;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 9999;
}

/* each toast behaves like your old centered box */
.toast-item {
    background: #fff;
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
    min-width: 220px;
    max-width: 300px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    opacity: 0;
    transform: scale(0.95);
    transition: all 0.18s ease;

    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.95);
}

/* show animation */
.toast-item.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* icon */
.toast-icon {
    font-size: 34px;
    margin-bottom: 2px;
}

/* message */
.toast-message {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

/* type colors (optional) */
.toast-item.success .toast-icon { color: #22c55e; }
.toast-item.error .toast-icon { color: #ef4444; }
.toast-item.warning .toast-icon { color: #f59e0b; }
.toast-item.info .toast-icon { color: #3b82f6; }

@keyframes popIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.wash-center-state {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wash-action-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* SWIPE ACTION */
.swipe-item {
    position: relative;
    background: #f8f9fa;
}

.swipe-content {
    position: relative;
    z-index: 2;
    background: white;
    transition: none; /* IMPORTANT */
    will-change: transform;
}

.swipe-action {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 1;
}

/* RIGHT SIDE = NEXT */
.swipe-action:not(.delete) {
    right: 0;
}

/* LEFT SIDE = DELETE */
.swipe-action.delete {
    left: 0;
    background: #dc3545;
    color: #FFFFFF;
}

.swipe-item {
    touch-action: pan-y;
}

.swipe-content {
    touch-action: pan-y;
}


.swipe-item[data-status="paid"] .swipe-action:not(.delete) {
    opacity: 0.3;
    pointer-events: none;
}

/* ----------------------
TOM SELECT
---------------------- */
/* TomSelect wrapper as a Bootstrap select */
.ts-wrapper {
    width: 100% !important;
}

ts-control > *, .ts-dropdown-content, .ts-control .item {
	font-size: 1rem!important;
	font-weight: 500!important;
}

.ts-control {
    width: 100% !important;
    min-height: 31px; /* match your form-control-sm height */
	display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
	border-radius: .375rem;
	white-space: normal;
}

.ts-control input {
    width: 100% !important;
	flex: 1 1 auto !important;
    min-width: 20 !important;
    height: auto !important;
}

/* Prevent the selected item from forcing a wrap */
.ts-control .item {
    white-space: nowrap !important;
}

.ts-dropdown {
    width: auto !important;
    min-width: 250px; /* adjust as needed */
    max-width: 500px; /* optional cap */
    white-space: normal;
    z-index: 9999999 !important;
}

.ts-dropdown .option {
	padding: .875rem!important;
	white-space: normal;
}

.ts-wrapper .ts-control {
    position: relative;
	padding: .75rem 2.25rem .75rem .75rem !important;
    line-height: 1.5;
	border-color: #dee2e6;
}

.ts-wrapper .ts-control::after {
    content: "\f078"; /* FontAwesome down arrow */
    font-family: "Font Awesome 6 Free"; /* or your FA version */
    font-weight: 900;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #495057; /* match Bootstrap text color */
	font-size: 12px;
}

.ts-wrapper.single .ts-control, .ts-wrapper.single .ts-control input {
    cursor: pointer;
    font-size: 1rem;
	color: #212529;
}

.ts-control {
    width: 100% !important;      /* Make it full width of its container */
    min-width: 0 !important;     /* Prevent shrinking below container */
    box-sizing: border-box;
}

.optgroup-header {
    color: #999999 !important;
    background-color: #FAFAFA !important;
}

.ts-wrapper,
.ts-control,
.ts-dropdown {
    touch-action: manipulation;
}

/* TABS */
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    background-color: #BBFF00;
    color: #333231;
}

.nav-pills .nav-link {
    color: #333231;
    font-size: .875rem;
    border: 1px solid #DDDDDD;
    padding: .5rem 1.5rem;
    background-color: #F0F0F0;
}

/* AFTER HOURS */
.action-sheet {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.action-sheet .sheet {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    animation: slideUp 0.2s ease;
    margin: 1.2rem;
    text-align: center;
}
.action-icon {
    font-size: 3rem;
}

.action-sheet .close {
    position: absolute;
    right: 2rem;
}

.action-sheet .close button {
    background: none;
    border: none;
    color: #CCCCCC;
    font-size: 1.2rem;
}

.action-sheet .title {
    font-weight: 600;
    margin-bottom: 6px;
}

.action-sheet .text {
    font-size: 14px;
    color: #666;
    margin-bottom: 14px;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* PHOTO GALLERY */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.photo-gallery a {
    position: relative;
    display: block;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
}

/* ACTIVITIES */
/* TIMELINE WRAPPER */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ITEM CARD */
.activity-item {
    gap: 14px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #eee;
    border-left: 4px solid #ddd;
    border-radius: 8px;
    transition: 0.15s ease;
}

.activity-item:hover {
    border-left-color: #999;
    background: #fcfcfc;
}

/* TIME COLUMN */
.activity-left {
    margin-bottom: .5rem;
    flex-shrink: 0;
}

.activity-time {
    font-size: 11px;
    color: #999;
}

/* MAIN CONTENT */
.activity-body {
    flex: 1;
}

/* MAIN MESSAGE */
.activity-message {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

/* SINGLE CHANGE ROW */
.change-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    padding: 2px 0;
}

/* FIELD NAME */
.change-field {
    color: #777;
    min-width: 120px;
}

/* VALUE GROUP */
.change-values {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* OLD VALUE */
.change-old {
    color: #b33;
    text-decoration: line-through;
    opacity: 0.8;
}

/* ARROW */
.change-arrow {
    color: #aaa;
}

/* NEW VALUE */
.change-new {
    color: #1a7f37;
    font-weight: 500;
}

/* CHECKLISTS */
.checklist-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* -----------------------------------
PHOTO UPLOAD
----------------------------------- */

.photo-upload-box {

    display: block;

    border: 2px dashed var(--border-color);

    border-radius: 18px;

    padding: 32px 20px;

    text-align: center;

    cursor: pointer;

    transition: 0.2s ease;

    background: var(--card-bg);
}

.photo-upload-box:hover {

    border-color: var(--primary);
    background: rgba(255,255,255,0.02);
}

.photo-upload-inner {

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.photo-upload-icon {

    font-size: 32px;
    opacity: 0.8;
}

.photo-upload-title {

    font-size: 16px;
    font-weight: 600;
}

.photo-upload-subtitle {

    font-size: 13px;
    opacity: 0.7;
}

/* -----------------------------------
PHOTO GRID
----------------------------------- */

.checklist-photo-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(120px, 1fr));

    gap: 12px;
}

.checklist-photo-item {

    position: relative;
}

.checklist-photo-thumb {

    width: 100%;

    aspect-ratio: 1 / 1;

    object-fit: cover;

    border-radius: 14px;

    border: 1px solid var(--border-color);
}

/* -----------------------------------
REMOVE BUTTON
----------------------------------- */

.checklist-photo-remove {

    position: absolute;

    top: 6px;
    right: 6px;

    width: 28px;
    height: 28px;

    border: none;

    border-radius: 50%;

    background: rgba(0,0,0,0.7);

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}