/* Pulse POS 3.2 - Ultimate Design System */
:root {
    --primary: #0a1931;
    --accent: #6366f1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-main: #f8fafc;
    --border: rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 40px 100px -20px rgba(0, 0, 0, 0.15);
    --glass: rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; outline: none; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: #1e293b;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Watermark Background */
.pos-container {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

.pos-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: url('../../uploads/logo.jpg') no-repeat center;
    background-size: contain;
    opacity: 0.02;
    z-index: 0;
    pointer-events: none;
}

/* Top Navigation Bar Redesign */
.user-profile-mini {
    position: fixed;
    top: 2rem;
    right: 2.5rem;
    z-index: 2000;
}

.profile-actions {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.03),
        0 30px 60px rgba(10, 25, 49, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-btn {
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.6rem 1.2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.nav-btn:hover {
    background: #f8fafc;
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.nav-btn i {
    font-size: 1.1rem;
    color: var(--accent);
}

.nav-divider {
    width: 1px;
    height: 35px;
    background: rgba(0, 0, 0, 0.06);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: white;
    padding: 0.4rem 0.4rem 0.4rem 1.2rem;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.profile-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-role {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 2px;
}

.user-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.avatar-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    padding: 0.8rem;
    display: none;
    z-index: 2500;
    border: 1px solid rgba(0,0,0,0.03);
    animation: slideIn 0.3s ease-out;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1.2rem;
    border-radius: 15px;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    transition: 0.2s;
}

.dropdown-item:hover { background: #f1f5f9; color: var(--primary); }
.dropdown-item.text-danger:hover { background: #fef2f2; color: var(--danger); }
.dropdown-divider { height: 1px; background: #f1f5f9; margin: 0.5rem 0.8rem; }

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: var(--success);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.power-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: all 0.3s;
    text-decoration: none;
}

.power-btn:hover {
    color: var(--danger);
    transform: rotate(90deg) scale(1.1);
}

/* Slider System */
.view-slider {
    display: flex;
    width: 300vw;
    height: 100vh;
    transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1);
    position: relative;
    z-index: 1;
}

.view-page {
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem;
    padding-top: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.view-slider.slide-1 { transform: translateX(0); }
.view-slider.slide-2 { transform: translateX(-100vw); }
.view-slider.slide-3 { transform: translateX(-200vw); }
.view-slider.slide-4 { transform: translateX(-300vw); }

/* Grid UI */
.top-bar { width: 100%; max-width: 1200px; text-align: center; margin-bottom: 5rem; }
.main-title { font-size: 4rem; font-weight: 900; color: var(--primary); letter-spacing: -0.05em; }
.main-subtitle { color: #64748b; font-size: 1.3rem; margin-top: 0.5rem; font-weight: 500; opacity: 0.8; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1300px;
}

.box-card {
    background: white;
    border-radius: 50px;
    padding: 3.5rem;
    text-align: center;
    box-shadow: var(--shadow-premium);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    border: 1px solid rgba(0,0,0,0.01);
}
.box-card:hover { transform: translateY(-15px); box-shadow: 0 60px 120px -20px rgba(0,0,0,0.18); }
.box-card.active { background: var(--primary); color: white; }

.box-number { font-size: 0.85rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.25em; margin-bottom: 2.5rem; }
.box-card.active .box-number { color: rgba(255,255,255,0.3); }

.box-content h3 { font-size: 3rem; font-weight: 900; margin: 0; letter-spacing: -0.02em; }
.box-info { margin-top: 1rem; color: #64748b; font-size: 1.1rem; line-height: 1.5; font-weight: 500; }
.box-card.active .box-info { color: rgba(255,255,255,0.6); }

/* Buttons */
.btn-action {
    width: 100%;
    padding: 1.4rem;
    border-radius: 24px;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #162a4a; transform: scale(1.02); }
.box-card.active .btn-action { background: white; color: var(--primary); }

.btn-action-icon {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    border: none;
    background: #f1f5f9;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}
.btn-action-icon:hover { background: var(--danger); color: white; transform: rotate(90deg); }

.btn-action-ghost {
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--primary);
    padding: 0.8rem 1.4rem;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.btn-action-ghost:hover {
    background: #f8fafc;
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.btn-action-ghost i {
    font-size: 1rem;
    color: var(--accent);
}

/* Wizard & Forms */
.service-form-card {
    width: 100%;
    max-width: 1100px;
    background: white;
    border-radius: 50px;
    padding: 5rem;
    box-shadow: 0 60px 150px rgba(0,0,0,0.12);
    position: relative;
    border: 1px solid rgba(0,0,0,0.01);
}

.wizard-steps { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.wizard-step { 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    gap: 8px; 
    opacity: 0.3; 
    transition: all 0.4s ease; 
    cursor: pointer;
    flex: 1;
}

.wizard-step.active { 
    opacity: 1; 
}

.step-icon {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.2rem;
    transition: 0.3s;
}

.wizard-step.active .step-icon {
    background: var(--accent);
    color: white;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.wizard-step p {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #f1f5f9;
    flex-shrink: 0;
    margin-top: -20px;
}

/* Checkout Layout (Step 6) */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

/* Digital Receipt Style */
.receipt-column {
    display: flex;
    justify-content: center;
}

.digital-receipt {
    background: white;
    width: 100%;
    max-width: 380px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    position: relative;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

/* Zigzag edge effect */
.digital-receipt::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(-45deg, white 5px, transparent 0), linear-gradient(45deg, white 5px, transparent 0);
    background-size: 10px 10px;
}

.receipt-header { text-align: center; margin-bottom: 2rem; }
.receipt-logo { height: 50px; margin-bottom: 1rem; filter: grayscale(1); }
.receipt-header h2 { font-size: 1.2rem; font-weight: 900; margin-bottom: 5px; color: #000; }
.receipt-header p { font-size: 0.8rem; color: #666; margin: 0; }

.receipt-info-row { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 5px; color: #333; }
.receipt-divider { border-top: 1px dashed #ccc; margin: 1.5rem 0; }

.receipt-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.receipt-table th { text-align: left; border-bottom: 1px solid #eee; padding-bottom: 5px; color: #666; }
.receipt-table td { padding: 8px 0; color: #000; }

.receipt-totals { margin-top: 1rem; }
.r-total-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; }
.r-total-row.grand { font-size: 1.2rem; font-weight: 900; border-top: 2px solid #000; padding-top: 10px; margin-top: 10px; }
.r-total-row.discount { color: #666; font-style: italic; }

.receipt-footer { text-align: center; margin-top: 3rem; font-size: 0.8rem; color: #888; }
.barcode-placeholder { font-size: 1.5rem; margin-top: 1rem; letter-spacing: -2px; }

/* Payment Controls Style */
.payment-column {
    background: #f8fafc;
    padding: 3rem;
    border-radius: 40px;
    height: 100%;
}

.control-group { margin-bottom: 2.5rem; }
.price-input-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 18px;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.price-input-box span { font-weight: 700; color: #64748b; font-size: 0.9rem; }
.price-input-box input {
    border: none;
    background: transparent;
    text-align: right;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary);
    width: 100px;
}
.price-input-box input:focus { outline: none; }

.payment-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.toggle-option input { display: none; }
.toggle-box {
    background: white;
    padding: 1.2rem;
    border-radius: 20px;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.toggle-option input:checked + .toggle-box {
    border-color: var(--accent);
    color: var(--accent);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.1);
}

.discount-selection { margin-top: 1.5rem; }
.discount-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.d-chip {
    background: white;
    padding: 0.8rem 1.2rem;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid #f1f5f9;
}
.d-chip:hover { background: #f1f5f9; }
.d-chip.active { background: var(--accent); color: white; border-color: var(--accent); box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2); }

.btn-finish-alt {
    width: 100%;
    height: 75px;
    background: var(--primary);
    color: white;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 20px 40px rgba(10, 25, 49, 0.2);
}
.btn-finish-alt:hover { background: #162a4a; transform: translateY(-3px); }

.form-step { display: none; }
.form-step.active { display: block; animation: slideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1); }

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

/* Inputs */
.input-group { margin-bottom: 2rem; text-align: left; }
.input-label { display: block; font-size: 0.8rem; font-weight: 800; color: #94a3b8; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.15em; }
.form-input {
    width: 100%;
    padding: 1.4rem 1.8rem;
    border-radius: 22px;
    border: 2px solid #f1f5f9;
    background: #f8fafc;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    transition: 0.3s;
}
.form-input:focus { border-color: var(--accent); background: white; box-shadow: 0 15px 30px rgba(99, 102, 241, 0.05); }

/* Tables */
.pulse-table { width: 100%; border-collapse: separate; border-spacing: 0 12px; }
.pulse-table td { padding: 1.8rem; background: #f8fafc; border-radius: 20px; font-weight: 600; }
.pulse-table b { color: var(--primary); font-weight: 800; }

/* Details View Specials */
.details-summary-card { background: #f8fafc; border-radius: 40px; padding: 3rem; border: 1px solid rgba(0,0,0,0.02); }

.payment-box {
    padding: 2.5rem;
    border-radius: 30px;
    background: white;
    border: 2px solid #f1f5f9;
    text-align: center;
    cursor: pointer;
    font-weight: 900;
    font-size: 1.1rem;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
}
.payment-box.active { border-color: var(--accent); background: white; color: var(--primary); box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12); transform: translateY(-5px); }

/* Status Badges */
.status-badge { display: inline-flex; align-items: center; padding: 0.8rem 1.6rem; border-radius: 18px; font-weight: 900; font-size: 0.85rem; letter-spacing: 0.05em; }
.status-badge.active { background: #dcfce7; color: #15803d; }

/* Global Alerts */
.msg-alert {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--primary);
    color: white;
    padding: 1.5rem 3rem;
    border-radius: 28px;
    font-weight: 800;
    z-index: 10000;
    transition: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 30px 60px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 15px;
}
.msg-alert.show { transform: translateX(-50%) translateY(0); }
.msg-success { background: var(--success); }
.msg-error { background: var(--danger); }

/* Customer Info & History UI */
.customer-info-glass {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 25px;
    padding: 1.5rem 2rem;
    animation: slideIn 0.4s ease-out;
}

#history-modal {
    display: none;
    align-items: center;
    justify-content: center;
}

/* Selection Grids (Staff, Service, Price) */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.selection-card {
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.selection-card:hover {
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transform: translateY(-3px);
}

.selection-card.selected {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.1);
}

.selection-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 18px;
}

.selection-icon-box {
    width: 60px;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 1.5rem;
    color: var(--accent);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.selection-info b { display: block; font-size: 1.1rem; color: var(--primary); margin-bottom: 2px; }
.selection-info p { font-size: 0.8rem; color: #94a3b8; font-weight: 700; text-transform: uppercase; }

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.price-chip {
    background: #f1f5f9;
    padding: 1.2rem 0.5rem;
    border-radius: 18px;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    color: var(--primary);
}

.price-chip:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

.price-chip.selected {
    background: var(--primary);
    color: white;
}

/* Summary View */
.summary-details {
    padding: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    font-size: 1.1rem;
}

.summary-item span { color: #64748b; font-weight: 600; }
.summary-item b { color: var(--primary); font-weight: 800; }

/* Auth Overlay & Login UI */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 25, 49, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 3.5rem;
    border-radius: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.2);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: authScale 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes authScale { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.auth-card h2 { font-size: 2.2rem; font-weight: 900; color: var(--primary); margin-bottom: 0.5rem; }
.auth-card p { color: #64748b; margin-bottom: 2.5rem; font-weight: 500; }

.btn-auth {
    width: 100%;
    padding: 1.4rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: 0.3s;
}
.btn-auth:hover { background: #162a4a; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(10, 25, 49, 0.2); }

.pos-container.blurred {
    filter: blur(10px) grayscale(20%);
    pointer-events: none;
    transform: scale(0.98);
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    z-index: 6000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.1);
    position: relative;
}

/* Scrollbar Clean */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }
