/* public/staff/css/style.css - High-End Marine Blau, Mobile First */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0A2342;
    --primary-light: #153e75;
    --accent: #007AFF; /* iOS Blue */
    --success: #34C759; /* iOS Green */
    --danger: #FF3B30; /* iOS Red */
    --bg-color: #F2F2F7; /* iOS Light Gray */
    --surface: #FFFFFF;
    --text-main: #1C1C1E;
    --text-muted: #8E8E93;
    --border: rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    overscroll-behavior-y: none;
}

/* TOP APP BAR - Premium Solid with subtle gradient */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(10, 35, 66, 0.15);
    padding-bottom: 0.5rem;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    margin-bottom: 1.25rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem 0.75rem 1.5rem;
    position: relative;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-brand {
    display: flex;
    align-items: center;
    z-index: 10;
}

.header-brand img {
    height: 3rem;
    width: auto;
    object-fit: contain;
}

.header-tools { display: flex; align-items: center; gap: 16px; }
.header-tools button {
    font-size: 1.2rem; padding: 8px; background: rgba(255,255,255,0.15); 
    border-radius: 12px; border: none; color: white; cursor: pointer;
    transition: background 0.3s;
    backdrop-filter: blur(10px);
}
.header-tools button:active { background: rgba(255,255,255,0.25); transform: scale(0.95); }
.status-indicator-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 10px currentColor; }
.bg-ready { background-color: #34C759; color: #34C759; }
.bg-loading { background-color: #FFCC00; color: #FFCC00; }
.bg-error { background-color: #FF3B30; color: #FF3B30; }

/* DROPDOWN MENU */
.dropdown-menu {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 20px;
    padding: 1rem;
    position: absolute;
    top: 80px;
    right: 1.5rem;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0,0,0,0.05);
}

.dropdown-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-menu a, .dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.dropdown-menu a:active, .dropdown-menu button:active {
    background: var(--bg-color);
}

.dropdown-menu a.active-page {
    background: rgba(0, 122, 255, 0.1);
    color: var(--accent);
}

.dropdown-menu .icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

/* MAIN CONTENT */
main { padding: 0 1.25rem 2rem 1.25rem; max-width: 600px; margin: 0 auto; }

/* CARDS - Soft, floating, premium */
.card, .customer-card, .tab-card {
    background: var(--surface);
    border-radius: 28px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.2s;
}

/* BUTTONS */
.btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 1rem 1.5rem; border: none; border-radius: 20px;
    font-size: 1.05rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-height: 56px; gap: 8px; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }

.btn-primary { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white; box-shadow: 0 6px 20px rgba(10, 35, 66, 0.2); 
}
.btn-secondary { background: #E5E5EA; color: var(--primary); font-weight: 700; }
.btn-danger { background: #FF3B30; color: white; box-shadow: 0 6px 20px rgba(255, 59, 48, 0.25); }
.btn-success { background: #34C759; color: white; box-shadow: 0 6px 20px rgba(52, 199, 89, 0.25); }

/* INPUTS */
.search-bar, .form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 1.1rem 1.25rem; border: 2px solid transparent;
    border-radius: 18px; font-size: 1.05rem; background: var(--bg-color);
    outline: none; -webkit-appearance: none; color: var(--text-main);
    transition: all 0.2s; font-family: inherit; font-weight: 500;
}
.search-bar::placeholder, .form-group input::placeholder { color: var(--text-muted); font-weight: 400; }
.search-bar:focus, .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

/* Checkbox Override */
input[type="checkbox"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    width: auto;
    padding: 0;
    margin: 0;
    accent-color: var(--danger);
    transform: scale(1.3);
    cursor: pointer;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* MODALS (BOTTOM SHEETS) */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s;
    padding: 1rem;
}
.modal:not(.hidden) { opacity: 1; pointer-events: auto; }

.modal-content {
    background: var(--surface); width: 100%; max-width: 500px; border-radius: 24px;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    transform: scale(0.95); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 92vh; overflow-y: auto; position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.modal:not(.hidden) .modal-content { transform: scale(1); }

/* Modal Drag Handle Indicator (Optional, but keeping it for style) */
.modal-content::before {
    content: ''; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 48px; height: 6px; background: #D1D1D6; border-radius: 10px;
}

.modal-content h3 { color: var(--primary); margin-bottom: 1.5rem; font-size: 1.5rem; text-align: center; font-weight: 800; letter-spacing: -0.5px;}
.modal-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 2rem; }

/* UTILS */
.hint { color: var(--text-muted); font-size: 0.95rem; text-align: center; margin-bottom: 1rem; font-weight: 500;}
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-1 { margin-top: 1rem; }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1.5rem 0; }
.stat-box { background: var(--bg-color); padding: 1rem 0.5rem; border-radius: 20px; text-align: center; }
.stat-box span { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; margin-bottom: 0.25rem; letter-spacing: 0.5px; }
.stat-box strong { display: block; font-size: 1.3rem; color: var(--primary); font-weight: 800; letter-spacing: -0.5px; }

/* ACTIONS GRID */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

/* BADGES */
.badge { padding: 0.4rem 0.8rem; border-radius: 100px; font-size: 0.75rem; font-weight: 700; color: white; display: inline-block; letter-spacing: 0.5px; text-transform: uppercase; }
.bg-gold { background: linear-gradient(135deg, #FFD700 0%, #F59D00 100%); box-shadow: 0 2px 10px rgba(245, 157, 0, 0.3); }
.bg-silver { background: linear-gradient(135deg, #E0E0E0 0%, #9E9E9E 100%); box-shadow: 0 2px 10px rgba(158, 158, 158, 0.3); }
.bg-bronze { background: linear-gradient(135deg, #CD7F32 0%, #A0522D 100%); box-shadow: 0 2px 10px rgba(160, 82, 45, 0.3); }
.bg-dark { background: var(--primary); }
.bg-purple { background: linear-gradient(135deg, #AF52DE 0%, #5E5CE6 100%); box-shadow: 0 2px 10px rgba(94, 92, 230, 0.3); }

/* POS SYSTEM */
.pos-categories { display: flex; overflow-x: auto; gap: 0.75rem; padding-bottom: 1rem; scrollbar-width: none; margin-bottom: 0.5rem;}
.pos-categories::-webkit-scrollbar { display: none; }
.cat-btn { padding: 0.75rem 1.5rem; background: var(--surface); border: none; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-radius: 100px; font-weight: 700; color: var(--text-muted); white-space: nowrap; cursor: pointer; transition: all 0.2s; }
.cat-btn.active { background: var(--primary); color: white; box-shadow: 0 4px 15px rgba(10, 35, 66, 0.2); }

.pos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 15px; }
.prod-btn { background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; padding: 4px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 90px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); transition: transform 0.1s; overflow: hidden; }
.prod-btn:active { transform: scale(0.95); background: #f8f9fa; }
.prod-name { font-weight: 800; font-size: 0.75rem; color: var(--primary); margin-bottom: 2px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; word-wrap: break-word; hyphens: auto; width: 100%; }
.prod-size { font-size: 0.65rem; color: var(--text-muted); display: block; margin-bottom: 4px; }
.prod-price { font-size: 0.8rem; color: var(--success); font-weight: 700; display: block; }

.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.cart-controls { display: flex; align-items: center; gap: 0.75rem; }
.cart-btn { width: 40px; height: 40px; border-radius: 14px; border: none; background: var(--bg-color); font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; color: var(--primary); cursor: pointer; transition: transform 0.1s;}
.cart-btn:active { transform: scale(0.9); }

/* SCANNER */
#reader { border-radius: 28px; overflow: hidden; border: none; box-shadow: 0 10px 40px rgba(0,0,0,0.08); background: var(--surface); }

/* HIGH-END BUTTONS */
.btn-highend {
    width: 100%;
    padding: 1.1rem;
    border-radius: 20px;
    border: none;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, #153e75 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(10, 35, 66, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-highend:active {
    transform: scale(0.97);
    box-shadow: 0 5px 15px rgba(10, 35, 66, 0.1);
}

.btn-highend-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #f39c12 100%);
    box-shadow: 0 10px 25px rgba(230, 126, 34, 0.2);
}

/* EXTRA REFINEMENTS */
.badge.bg-dark { background: #1C1C1E; color: #fff; }
.customer-header h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.4px; color: var(--primary); }

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 10px 25px rgba(10, 35, 66, 0.15); }
    50% { transform: scale(1.02); box-shadow: 0 15px 35px rgba(0, 122, 255, 0.3); }
    100% { transform: scale(1); box-shadow: 0 10px 25px rgba(10, 35, 66, 0.15); }
}
