:root {
    /* PRIMARY COLORS: Medical Teal & Sky Blue */
    --primary: #0d9488;  /* Teal 600 */
    --primary-dark: #0f766e; /* Teal 700 */
    --secondary: #0ea5e9; /* Sky Blue */
    --warning: #f59e0b; /* Golden Orange */
    --danger: #ef4444; 
    --bg-gradient: linear-gradient(135deg, #f0fdfa 0%, #e2e8f0 100%); /* Light Teal-Grey tint */
    --surface: #ffffff;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --input-bg: #f9fafb;
    --nav-height: 65px;
}

body.dark-mode {
    --primary: #2dd4bf; /* Teal 400 */
    --primary-dark: #14b8a6; /* Teal 500 */
    --secondary: #38bdf8;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --surface: #1e293b;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-light: #94a3b8;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --input-bg: #334155;
}

/* GLOBAL SCALING FIX FOR MOBILE */
html { font-size: 14px; }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }
.hidden { display: none !important; }

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
body.dark-mode ::-webkit-scrollbar-thumb { background: #475569; }

body { 
    background: var(--bg-gradient); color: var(--text-main); height: 100dvh; overflow: hidden; display: flex; flex-direction: column;
}

#app-container { 
    flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; background: transparent;
}

/* --- LOCK & STATUS SCREENS --- */
#admin-lock-screen, #status-screen, #login-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 10000;
}
#admin-lock-screen { background: #0f172a; color: white; display: flex; align-items: center; justify-content: center; }
#status-screen { background: var(--bg-gradient); color: var(--text-main); display: flex; align-items: center; justify-content: center; }

/* --- MEDICAL STYLE LOGIN REDESIGN --- */
#login-screen {
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.login-header-visual {
    height: 45%; 
    width: 100%;
    background-image: linear-gradient(to bottom, rgba(13, 148, 136, 0.9), rgba(15, 23, 42, 0.6)), url('https://images.unsplash.com/photo-1587854692152-cbe660dbde88?q=80&w=2069&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-overlay {
    text-align: center;
    padding: 20px;
    color: white;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.logo-icon {
    font-size: 3rem;
    color: #ccfbf1; /* Very light teal */
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.brand-solanacy {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    text-shadow: 0 4px 6px rgba(0,0,0,0.2);
    font-family: 'Outfit', sans-serif;
}

.brand-tagline {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.login-bottom-sheet {
    flex: 1;
    background: white;
    margin-top: -30px; /* Overlap effect */
    border-radius: 30px 30px 0 0;
    position: relative;
    z-index: 10;
    padding: 30px 25px 80px 25px; 
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.05);
    overflow-y: auto; 
}

.login-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.login-app-title {
    font-size: 1.4rem; 
    font-weight: 600; 
    color: #115e59; /* Dark Teal Text */
    line-height: 1.4;
    margin-bottom: 25px;
    margin-top: 10px;
}

.login-separator {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 25px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
}

.sep-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.sep-text {
    padding: 0 10px;
}

/* Updated Button Style */
.zomato-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: white;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
}

.zomato-btn:active {
    transform: scale(0.98);
    background: #f8fafc;
}

.login-footer-legal {
    margin-top: auto;
    font-size: 0.75rem;
    color: #94a3b8;
    padding-top: 25px;
    padding-bottom: 15px; 
    line-height: 1.5;
    max-width: 300px;
}

.legal-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.legal-link:hover {
    text-decoration: underline;
}

/* --- REGISTRATION SCREEN STYLES --- */

.modal-overlay-fullscreen {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: #ffffff;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.reg-header-visual {
    height: 30%; 
    width: 100%;
    background-image: linear-gradient(135deg, rgba(13, 148, 136, 0.9), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1631549916768-4119b2e5f926?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end; 
    padding: 20px;
}

.reg-overlay-content {
    color: white;
    width: 100%;
    padding-bottom: 40px; 
}

.reg-project-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.reg-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

.logout-link-btn-floating {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: 0.2s;
}
.logout-link-btn-floating:hover {
    background: rgba(255,255,255,0.3);
}

.reg-bottom-sheet {
    flex: 1;
    background: #f8fafc; 
    margin-top: -30px;
    border-radius: 24px 24px 0 0;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

.reg-form-content {
    flex: 1;
    overflow-y: auto; 
    padding: 30px 20px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title .material-icons-outlined {
    color: var(--primary);
    font-size: 1.2rem;
}

.input-group-modern {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: border-color 0.2s;
}

.input-group-modern:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.1);
}

.input-icon {
    color: #94a3b8;
    margin-right: 12px;
}

.input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-wrapper label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 2px;
}

.input-wrapper input {
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #1e293b;
    width: 100%;
    padding: 0;
}

.pricing-container-horizontal {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    margin: 0 -10px;
    padding: 5px 10px 15px 10px;
}

.pricing-card-modern {
    min-width: 150px;
    flex: 1;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px;
    position: relative;
    cursor: pointer;
    transition: 0.2s;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pricing-card-modern.selected {
    border-color: var(--primary);
    background: #f0fdfa;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
    transform: translateY(-2px);
}

.check-circle {
    display: none;
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 5;
}

.pricing-card-modern.selected .check-circle {
    display: flex;
}

.check-circle .material-icons-outlined {
    font-size: 16px;
    font-weight: bold;
}

.pricing-card-modern h4 {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 5px;
}

.price-tag {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}
.price-tag small {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.features-list {
    list-style: none;
    font-size: 0.7rem;
    color: #64748b;
    text-align: left;
    width: 100%;
    margin-top: auto;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
}
.features-list li {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}
.features-list li::before {
    content: "•";
    color: var(--primary);
    margin-right: 5px;
    font-size: 1rem;
    line-height: 0;
}

.badge-pop {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.staff-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
}

.add-staff-btn {
    background: transparent;
    border: 1px dashed var(--primary);
    color: var(--primary);
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.2s;
}
.add-staff-btn:hover {
    background: rgba(13, 148, 136, 0.05);
}

.reg-footer-scrollable {
    margin-top: 20px;
    width: 100%;
    padding-bottom: 20px;
}

.submit-reg-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(13, 148, 136, 0.2);
    transition: transform 0.1s;
}
.submit-reg-btn:active {
    transform: scale(0.98);
}

/* --- GENERAL UI --- */
.login-card { 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(20px); 
    padding: 3rem 2rem; 
    border-radius: 24px; 
    text-align: center; 
    width: 90%; 
    max-width: 400px; 
    border: 1px solid rgba(255,255,255,0.5); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    color: #1f2937;
}
body.dark-mode .login-card {
    background: rgba(30, 41, 59, 0.9);
    color: #f8fafc;
    border-color: #334155;
}

.lock-content { text-align: center; padding: 2rem; max-width: 400px; width: 90%; }
.lock-icon { font-size: 5rem; color: #ef4444; margin-bottom: 20px; background: rgba(239, 68, 68, 0.1); padding: 20px; border-radius: 50%; }
.lock-content h2 { font-size: 2rem; margin-bottom: 10px; font-weight: 700; }
.lock-content p { color: #94a3b8; margin-bottom: 30px; line-height: 1.6; }
.logout-btn-lock { background: #ef4444; color: white; border: none; padding: 10px 25px; border-radius: 30px; cursor: pointer; font-weight: 600; transition: 0.3s; }

/* --- TOP BAR --- */
.top-bar {
    height: 60px; padding: 0 1rem; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); flex-shrink: 0; 
    z-index: 100;
}
body.dark-mode .top-bar { background: rgba(30, 41, 59, 0.9); }
.header-actions { display: flex; gap: 8px; align-items: center; position: relative; }
.user-profile { display: flex; align-items: center; gap: 10px; max-width: 45%; }
#user-photo { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); flex-shrink: 0;}

.user-details { display: flex; flex-direction: column; overflow: hidden; max-width: 150px; }
#header-company-name { 
    color: var(--primary); font-weight: 700; font-size: 0.9rem; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.role-badge { font-size: 0.65rem; background: var(--primary); color: white; padding: 1px 6px; border-radius: 4px; font-weight: 500; align-self: flex-start; }

/* DROPDOWN & MENU */
.dropdown-menu {
    position: absolute; top: 50px; right: 0;
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 200px; padding: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 100;
}
.menu-item-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--input-bg); }
.menu-select { border: none; background: transparent; color: var(--text-main); font-size: 0.9rem; outline: none; width: 100%; cursor: pointer; }
.menu-item-btn { 
    display: flex; align-items: center; gap: 10px; padding: 10px; width: 100%;
    background: transparent; border: none; color: var(--text-main);
    text-align: left; cursor: pointer; font-size: 0.9rem; border-radius: 8px;
}
.menu-item-btn:hover { background: rgba(0,0,0,0.05); }
.icon-btn { background: transparent; border: none; color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 5px; }

/* PAGE LAYOUT */
#main-content { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.page-view { height: 100%; display: flex; flex-direction: column; padding: 1rem; max-width: 800px; margin: 0 auto; width: 100%; }

/* --- BILLING PAGE REDESIGN (SPLIT LAYOUT) --- */
.billing-main-layout {
    flex: 1; display: flex; gap: 12px; padding: 5px; overflow: hidden;
}

/* SEARCH BAR FIX */
.search-wrapper { margin: 0 0 10px 0; z-index: 20; position: relative; flex-shrink: 0; }
.search-box { 
    display: flex; align-items: center; background: var(--card-bg); border-radius: 12px; 
    border: 1px solid var(--border); box-shadow: var(--shadow); padding: 0 8px 0 4px;
    height: 50px;
}
#medicine-search { 
    flex: 1; border: none; background: transparent; padding: 10px; outline: none; font-size: 0.95rem; color: var(--text-main); 
    min-width: 0; /* Prevents input from pushing icon out */
}
.scan-trigger { 
    background: var(--primary); color: white; border: none; width: 40px; height: 40px; border-radius: 10px; 
    cursor: pointer; display:flex; align-items:center; justify-content:center; flex-shrink: 0; margin: 4px;
}
.search-icon { flex-shrink: 0; color: var(--text-light); } 

.dropdown-results { position: absolute; top: 110%; left: 0; width: 100%; background: var(--card-bg); border: 1px solid var(--border); max-height: 250px; overflow-y: auto; border-radius: 12px; box-shadow: var(--shadow); z-index: 50; }
.search-item { padding: 12px 15px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.search-item:hover { background: rgba(var(--primary), 0.05); }

/* Left Card (Items) */
.billing-left-card {
    flex: 1.2; background: var(--card-bg); border-radius: 16px; border: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow);
}

/* Right Card (Summary) */
.billing-right-card {
    flex: 0.8; background: var(--card-bg); border-radius: 16px; border: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 15px; box-shadow: var(--shadow);
}

.bill-header { padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.bill-header h2 { font-size: 1rem; color: var(--text-main); font-weight: 700; }
.text-danger-btn { background: transparent; border: none; color: var(--danger); cursor: pointer; padding: 5px; }
.resume-btn { background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 5px 12px; border-radius: 20px; cursor: pointer; display: flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 500; }

.bill-items-header { 
    padding: 8px 15px; background: rgba(128,128,128,0.03); display: grid; grid-template-columns: 2fr 0.8fr 1fr 30px; 
    font-size: 0.75rem; font-weight: 600; color: var(--text-light); text-transform: uppercase;
}

.scrollable-list { flex: 1; overflow-y: auto; padding: 0 10px; }
.cart-item { 
    display: grid; grid-template-columns: 2fr 0.8fr 1fr 30px; padding: 10px 5px; border-bottom: 1px solid var(--border); align-items: center; font-size: 0.9rem;
}
.cart-item input { width: 45px; padding: 4px; border-radius: 6px; border: 1px solid var(--border); text-align: center; background: var(--input-bg); color: var(--text-main); font-size: 0.9rem; }

.empty-cart-visual {
    height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-light); opacity: 0.5; padding: 20px; text-align: center;
}
.empty-cart-visual span { font-size: 3rem; margin-bottom: 10px; }
.empty-cart-visual p { font-size: 0.9rem; }
.empty-cart { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-light); opacity: 0.7; }

/* Summary Styling */
.summary-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 15px; }
.summary-rows { flex: 1; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.85rem; color: var(--text-light); }
.summary-row b, .summary-row span:last-child { color: var(--text-main); font-weight: 600; }
.summary-row.divider { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 8px; }
.discount-row { color: var(--primary) !important; font-weight: 600; }
.discount-row span:last-child { color: var(--primary) !important; }

.icon-edit-btn { background: rgba(13, 148, 136, 0.1); border: none; color: var(--primary); padding: 2px 5px; border-radius: 6px; cursor: pointer; display: flex; margin-left: 5px; }
.icon-edit-btn span { font-size: 1rem; }

.grand-total-section { 
    margin: 15px 0; padding: 15px 0; border-top: 2px solid var(--border); display: flex; justify-content: space-between; align-items: center;
}
.grand-total-section span:first-child { font-size: 1rem; font-weight: 800; color: var(--primary); letter-spacing: 0.5px; }
#cart-total { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

.summary-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto;}
.btn-hold-modern { 
    background: var(--warning); color: white; border: none; padding: 12px; border-radius: 10px; 
    font-weight: 700; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}
.btn-print-modern { 
    background: var(--primary); color: white; border: none; padding: 12px; border-radius: 10px; 
    font-weight: 700; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}

/* INVENTORY & ANALYTICS */
.page-header { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.action-btn { background: var(--primary); color: white; border: none; padding: 8px 16px; border-radius: 10px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; }
.table-wrapper { flex: 1; overflow: auto; background: var(--card-bg); border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); position: relative; }
table { width: 100%; border-collapse: collapse; min-width: 100%; } 
thead th { position: sticky; top: 0; background: var(--card-bg); z-index: 5; padding: 10px; text-align: left; border-bottom: 2px solid var(--border); color: var(--text-light); font-weight: 600; white-space: nowrap; font-size: 0.85rem; }
tbody td { padding: 10px; border-bottom: 1px solid var(--border); color: var(--text-main); font-size: 0.85rem; vertical-align: middle; }
.icon-action { padding: 5px; border-radius: 8px; border: none; cursor: pointer; background: transparent; }
.edit-btn { color: var(--primary); }
.del-btn { color: var(--danger); }
.analytics-scroll-container { flex: 1; overflow-y: auto; padding-bottom: 20px; }
.filter-container { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 15px; scrollbar-width: none; }
.filter-btn { white-space: nowrap; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text-light); font-size: 0.85rem; cursor: pointer; }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.dashboard-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.card { background: var(--card-bg); padding: 20px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; align-items: center; gap: 15px; }
.icon-box { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.total-sales .icon-box { background: rgba(79, 70, 229, 0.1); color: var(--primary); }
.total-orders .icon-box { background: rgba(236, 72, 153, 0.1); color: var(--secondary); }
.glass-card { background: var(--card-bg); padding: 20px; border-radius: 16px; border: 1px solid var(--border); margin-bottom: 20px; box-shadow: var(--shadow); }

/* MISC & UTILS */
.pdf-btn, .wp-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--input-bg); cursor: pointer; display: flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 500; transition: 0.2s; }
.pdf-btn:hover { background: #e0e7ff; color: var(--primary); }
.wp-btn { color: #25D366; border-color: #25D366; background: rgba(37, 211, 102, 0.1); }
#bottom-nav { height: 65px; background: rgba(255, 255, 255, 0.95); border-top: 1px solid var(--border); display: flex; flex-shrink: 0; z-index: 50; }
body.dark-mode #bottom-nav { background: rgba(30, 41, 59, 0.95); }
.nav-item { flex: 1; border: none; background: transparent; color: var(--text-light); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.nav-item.active { color: var(--primary); }
.developer-credit { text-align: center; font-size: 0.75rem; color: var(--text-light); padding: 8px 0; width: 100%; opacity: 0.8; letter-spacing: 0.5px; font-weight: 500; flex-shrink: 0; }

/* MODALS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 100; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-box { background: var(--card-bg); width: 90%; max-width: 450px; border-radius: 24px; padding: 1.5rem; border: 1px solid var(--border); box-shadow: 0 10px 25px rgba(0,0,0,0.2); max-height: 90vh; display: flex; flex-direction: column; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-shrink: 0; }
.close-icon { background: rgba(128,128,128,0.1); border: none; border-radius: 50%; padding: 5px; cursor: pointer; }
.input-group { margin-bottom: 15px; }
.full-input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text-main); font-size: 1rem; }
.row-group { display: flex; gap: 15px; margin-bottom: 15px; }
.modal-primary-btn { width: 100%; background: var(--primary); color: white; padding: 14px; border: none; border-radius: 12px; font-weight: 600; font-size: 1rem; cursor: pointer; margin-top: 10px; }
.camera-container { width: 100%; height: 350px; background: #000; border-radius: 16px; position: relative; overflow: hidden; margin-bottom: 15px; flex-shrink: 0; }
#camera-feed { width: 100%; height: 100%; object-fit: cover; }
#capture-canvas { position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover; z-index: 2; }
.scanner-controls { text-align: center; }
.google-btn.old { width: 100%; padding: 14px; display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-main); cursor: pointer; margin-top: 25px; font-weight: 500; font-size: 1rem; box-shadow: var(--shadow); }
.warning-box { border-left: 5px solid var(--warning); }
.warning-header h3 { color: var(--warning); display: flex; align-items: center; gap: 10px; }

/* --- SUPER ADMIN & PRICING STYLES --- */
#sa-notif-badge { position: absolute; top: 0; right: 0; width: 10px; height: 10px; background: #ef4444; border-radius: 50%; border: 2px solid var(--card-bg); }

.pricing-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    gap: 12px; 
    margin-top: 10px; 
    margin-bottom: 20px; 
}

.pricing-card { 
    border: 2px solid var(--border); 
    padding: 15px; 
    border-radius: 16px; 
    cursor: pointer; 
    position: relative; 
    background: var(--input-bg); 
    transition: 0.2s; 
    text-align: center; 
    display: flex;
    flex-direction: column;
}

.pricing-card:hover { 
    border-color: var(--primary); 
    background: rgba(79, 70, 229, 0.05); 
}

.selected-plan {
    border-color: #2563eb !important; 
    background: rgba(37, 99, 235, 0.08) !important;
}

.pricing-card.popular {
    border-color: #eab308;
}
.pricing-card .badge { 
    position: absolute; 
    top: -10px; 
    left: 50%;
    transform: translateX(-50%);
    background: #eab308; 
    color: black; 
    font-size: 0.65rem; 
    padding: 2px 10px; 
    border-radius: 10px; 
    font-weight: 800; 
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pricing-card h4 { 
    margin-bottom: 5px; 
    color: var(--text-main); 
    font-weight: 700;
}

.pricing-card .price { 
    font-weight: 800; 
    color: var(--primary); 
    font-size: 1.4rem;
    margin-bottom: 10px;
}
.pricing-card .price span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
}

.plan-features {
    list-style: none;
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: auto;
}
.plan-features li {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}
.plan-features li .material-icons-outlined {
    font-size: 0.9rem;
    color: var(--primary);
}

.sa-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.sa-tab { flex: 1; background: transparent; border: none; padding: 10px; color: var(--text-light); cursor: pointer; border-bottom: 2px solid transparent; font-weight: 500; }
.sa-tab.active { color: #eab308; border-bottom-color: #eab308; }
.badge-count { background: #ef4444; color: white; padding: 1px 5px; border-radius: 6px; font-size: 0.7rem; margin-left: 5px; }
.client-item { background: var(--input-bg); padding: 15px; border-radius: 12px; margin-bottom: 10px; border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.client-item:hover { background: rgba(0,0,0,0.05); }

.client-status { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; font-weight: 600; }
.status-active { background: #dcfce7; color: #166534; }
.status-pending { background: #fef9c3; color: #854d0e; }
.status-rejected { background: #fee2e2; color: #991b1b; }

.logout-link-btn { background: transparent; border: none; color: var(--danger); text-decoration: underline; cursor: pointer; }
.sa-controls { max-height: 70vh; overflow-y: auto; }

/* NEW: V3.3.0 Styles */
.switch-label { display: flex; align-items: center; cursor: pointer; gap: 10px; }
.switch-input { display: none; }
.slider { position: relative; width: 50px; height: 26px; background: #ccc; border-radius: 34px; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background: white; border-radius: 50%; transition: .4s; }
.switch-input:checked + .slider { background: #22c55e; }
.switch-input:checked + .slider:before { transform: translateX(24px); }

.apikey-item {
    background: var(--card-bg); border: 1px solid var(--border); padding: 15px;
    border-radius: 12px; margin-bottom: 10px; display: flex; justify-content: space-between;
    align-items: center; cursor: pointer; transition: 0.2s;
}
.apikey-item:hover { border-color: var(--primary); }
.key-limit-bar { height: 6px; width: 100%; background: #eee; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.key-fill { height: 100%; transition: width 0.3s ease; }

.key-status-red { border-left: 5px solid var(--danger); }
.key-status-green { border-left: 5px solid #22c55e; }

/* Super Admin Nav adjustments */
#sa-bottom-nav .nav-item.active span { color: #eab308; }
#sa-bottom-nav .nav-item span { font-size: 0.8rem; }

/* NOTIFICATIONS & BROADCAST */
.notif-item {
    padding: 12px; 
    border-bottom: 1px solid var(--border); 
    cursor: default;
    position: relative;
}
.notif-item:last-child { border-bottom: none; }

.notif-broadcast { 
    background: rgba(79, 70, 229, 0.05); 
    border-left: 4px solid var(--primary); 
}

/* ALERTS */
.alert-red {
    background: #fee2e2; 
    border-left: 4px solid #ef4444; 
    color: #991b1b;
}

.alert-yellow {
    background: #fef9c3; 
    border-left: 4px solid #eab308; 
    color: #854d0e;
}

.msg-bubble {
    padding: 10px; border-radius: 10px; background: var(--input-bg); margin-bottom: 8px;
    font-size: 0.9rem; border: 1px solid var(--border);
}
.msg-time { font-size: 0.7rem; color: var(--text-light); display: block; margin-top: 4px; text-align: right; }

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.pulse-badge {
    animation: pulse-red 2s infinite;
}

/* VOICE AGENT ANIMATION */
@keyframes pulse-ring {
    0% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); opacity: 1; }
    50% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(14, 165, 233, 0); opacity: 1; }
    100% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); opacity: 1; }
}

.voice-pulse-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-radius: 50%;
    margin: 20px auto;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.5);
}

.pulse-active {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --- SCROLLABLE MEDICINE MODAL FIX --- */
#medicine-form {
    flex: 1;              
    overflow-y: auto;     
    padding-right: 5px;   
    margin-bottom: 5px;
    scrollbar-width: thin; 
    scrollbar-color: var(--primary) transparent;
}
#medicine-form::-webkit-scrollbar { width: 6px; }
#medicine-form::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 10px; }
.scrollable-modal { display: flex; flex-direction: column; max-height: 85vh; }

/* RESPONSIVE LOGIC (MOBILE DEFAULT) */
@media(max-width: 1023px) {
    /* STACKED Layout for Mobile */
    .billing-main-layout { flex-direction: column; overflow-y: auto; }
    .billing-left-card { min-height: 55vh; } 
    .billing-right-card { flex: none; margin-bottom: 20px; min-height: 30vh; }
    .btn-hold-modern, .btn-print-modern { padding: 14px; }
    .developer-credit { padding-bottom: 20px; }
}

/* DESKTOP FLUID DASHBOARD LAYOUT (1000% Professional) */
@media (min-width: 1024px) {
    /* Root adjustments */
    html { font-size: 16px; }
    body { background: var(--input-bg); }

    /* Main Layout Grid - The "Dashboard" Structure */
    #app-container {
        display: grid;
        grid-template-columns: 260px 1fr; /* Sidebar | Content */
        grid-template-rows: 70px 1fr;     /* Header | Body */
        grid-template-areas:
            "sidebar header"
            "sidebar main";
        height: 100vh;
        width: 100vw;
        margin: 0;
        border-radius: 0;
        overflow: hidden;
    }

    /* Sidebar Styling (Both User & Admin) */
    #bottom-nav, #sa-bottom-nav {
        grid-area: sidebar;
        position: relative;
        height: 100%;
        width: 100%;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 20px;
        background: var(--surface);
        border-right: 1px solid var(--border);
        border-top: none;
        z-index: 50;
        order: -1; /* Ensure it stays left */
    }

    .nav-item {
        flex-direction: row; 
        justify-content: flex-start;
        padding: 15px 25px;
        gap: 15px;
        font-weight: 500;
        font-size: 1rem;
        height: auto;
        flex: none; 
        transition: all 0.3s ease;
        margin: 5px 15px;
        border-radius: 12px;
    }

    .nav-item:hover {
        background: rgba(13, 148, 136, 0.08);
    }

    .nav-item.active {
        background: var(--primary);
        color: white !important;
        box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
    }
    .nav-item.active span { color: white; }

    /* Header Styling */
    .top-bar {
        grid-area: header;
        position: relative;
        width: 100%;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 0 30px;
        border-radius: 0;
        left: auto; right: auto; top: auto;
    }

    /* Main Content Styling */
    #main-content {
        grid-area: main;
        margin-top: 0;
        padding: 0;
        background: var(--input-bg);
        overflow: hidden; 
    }

    .page-view {
        max-width: 100%; 
        padding: 25px;
        height: 100%;
    }

    /* Billing Page - Fluid Split View */
    .billing-main-layout {
        display: grid;
        grid-template-columns: 2fr 1fr; /* 66% - 33% split */
        gap: 25px;
        height: 100%;
        padding: 0;
        overflow: hidden;
        flex-direction: row; /* Reset flex direction */
    }

    /* Search Bar */
    .search-wrapper {
        margin-bottom: 20px;
    }

    /* Cards - Full Height */
    .billing-left-card, .billing-right-card {
        height: 100%;
        background: var(--surface);
        border: 1px solid var(--border);
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
        border-radius: 16px;
        min-height: 0; /* Reset mobile min-height */
        margin-bottom: 0;
    }

    .billing-left-card {
        overflow: hidden; 
        display: flex;
        flex-direction: column;
    }

    .billing-right-card {
        overflow-y: auto;
    }

    /* Tables (Stock/Analytics) */
    .table-wrapper {
        height: 100%;
        overflow: auto;
        border-radius: 12px;
        background: var(--surface);
    }
    
    /* Dashboard Cards (Analytics) */
    .dashboard-cards {
        grid-template-columns: repeat(4, 1fr); /* 4 Cards in a row */
    }
}

/* --- PROFILE DASHBOARD --- */

.profile-header-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.profile-header-card::before {
    content: '';
    position: absolute;
    top: -50px; left: -50px;
    width: 100px; height: 100px;
    background: var(--primary);
    opacity: 0.1;
    border-radius: 50%;
    filter: blur(40px);
}

.profile-image-container {
    width: 110px;
    height: 110px;
    margin-bottom: 15px;
    position: relative;
    padding: 4px;
    border: 2px dashed var(--primary);
    border-radius: 50%;
}

#profile-pic-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    background: var(--input-bg);
}

#profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

#profile-email {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* NEW PROFILE GRID */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.profile-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.profile-card:active { transform: scale(0.98); }

.p-card-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.p-card-text { flex: 1; }
.p-card-text h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-main); margin-bottom: 2px; }
.p-card-text p { font-size: 0.75rem; color: var(--text-light); }
.arrow { color: var(--text-light); opacity: 0.5; }

/* FULL SCREEN MODALS */
.full-screen-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-gradient);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.fs-header {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.fs-back-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
}

.fs-header h2 {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 600;
}

.fs-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.fs-section-title {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    margin: 25px 0 10px 0;
    letter-spacing: 0.5px;
}

/* SUBSCRIPTION CARD */
.sub-plan-card {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(13, 148, 136, 0.3);
    margin-bottom: 10px;
}

.plan-name { font-size: 1.8rem; font-weight: 800; display: block; }
.plan-status { background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }

.progress-bar-container {
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: white;
    border-radius: 10px;
}

/* USAGE CARD */
.usage-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    display: flex;
    gap: 15px;
    align-items: center;
}

.usage-icon-box {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* STAFF LIST */
.staff-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
}

.staff-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #ccc;
    display: inline-block;
    margin-right: 8px;
}
.staff-online { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.6); }

/* =========================================
   LANDING PAGE STYLES (ADD TO END OF CSS)
   ========================================= */

#landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    background: #ffffff;
    z-index: 20000;
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    color: #1f2937;
    transition: opacity 0.5s ease;
}

.bg-gray { background: #f9fafb; }

/* --- Navigation --- */
.lp-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.lp-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.lp-logo-icon {
    font-size: 1.8rem;
    color: var(--primary);
}

.lp-nav-links {
    display: flex;
    gap: 30px;
}

.lp-nav-links a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.lp-nav-links a:hover {
    color: var(--primary);
}

.lp-btn-login {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.lp-btn-login:hover {
    background: var(--primary);
    color: white;
}

/* --- Hero Section --- */
.lp-hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.lp-hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
    padding-right: 20px;
}

.lp-badge {
    display: inline-block;
    background: rgba(13, 148, 136, 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.lp-hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 20px;
    color: #111827;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.6;
}

.lp-cta-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.lp-btn-primary {
    background: var(--primary);
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(13, 148, 136, 0.3);
    transition: transform 0.2s;
}

.lp-btn-primary:hover {
    transform: translateY(-2px);
}

.lp-btn-secondary {
    padding: 15px 30px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.lp-btn-secondary:hover {
    background: #f9fafb;
}

.lp-trusted-badge {
    font-size: 0.9rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* --- 3D Visual --- */
.lp-hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.lp-3d-card {
    width: 450px;
    height: 300px;
    transform: rotateY(-15deg) rotateX(5deg);
    transform-style: preserve-3d;
    animation: float-3d 6s ease-in-out infinite;
}

@keyframes float-3d {
    0%, 100% { transform: rotateY(-15deg) rotateX(5deg) translateY(0); }
    50% { transform: rotateY(-12deg) rotateX(2deg) translateY(-20px); }
}

.lp-card-glass {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 
        20px 20px 50px rgba(0,0,0,0.15),
        -5px -5px 20px rgba(255,255,255,0.8);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.lp-card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.lp-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

.lp-mock-row {
    display: flex;
    gap: 15px;
}

.lp-mock-stat {
    flex: 1;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 10px;
}

.lp-mock-chart {
    flex: 1;
    background: linear-gradient(180deg, rgba(13, 148, 136, 0.1) 0%, rgba(255,255,255,0) 100%);
    border-bottom: 2px solid var(--primary);
    position: relative;
    border-radius: 8px;
}

.lp-floating-badge {
    position: absolute;
    bottom: 20px;
    right: -20px;
    background: white;
    padding: 8px 15px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    transform: translateZ(50px);
    animation: float-badge 3s ease-in-out infinite;
}

.spin-slow { animation: spin 3s linear infinite; }

/* --- Trust Bar --- */
.lp-trust-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 30px;
    background: white;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.lp-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
}
.lp-trust-item .material-icons-outlined { color: var(--primary); }

/* --- Common Sections --- */
.lp-section {
    padding: 80px 5%;
}

.lp-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    opacity: 0;
    transform: translateY(20px);
}

.lp-section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #111827;
}

.lp-section-header p {
    color: #6b7280;
    font-size: 1rem;
}

/* --- Problem vs Solution --- */
.lp-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.lp-compare-card {
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
}

.lp-compare-card h3 { margin-bottom: 20px; font-size: 1.5rem; }

.problem { background: #fef2f2; border-color: #fee2e2; }
.problem h3 { color: #991b1b; }
.problem ul { list-style: none; }
.problem li { margin-bottom: 12px; color: #7f1d1d; display: flex; align-items: center; gap: 10px; }
.problem li::before { content: "•"; color: #ef4444; font-weight: bold; }

.solution { background: #f0fdfa; border-color: #ccfbf1; box-shadow: 0 10px 30px rgba(13, 148, 136, 0.1); }
.solution h3 { color: #115e59; }
.solution ul { list-style: none; }
.solution li { margin-bottom: 12px; color: #134e4a; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.solution li .material-icons-outlined { color: var(--primary); }

/* --- Feature Grid --- */
.lp-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.lp-feature-card {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid #f3f4f6;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.lp-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(13, 148, 136, 0.3);
}

.lp-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}
.lp-icon-box.orange { background: #ffedd5; color: #f97316; }
.lp-icon-box.teal { background: #ccfbf1; color: #0d9488; }
.lp-icon-box.red { background: #fee2e2; color: #ef4444; }
.lp-icon-box.blue { background: #e0f2fe; color: #0ea5e9; }
.lp-icon-box.purple { background: #f3e8ff; color: #a855f7; }
.lp-icon-box.green { background: #dcfce7; color: #22c55e; }
.lp-icon-box.dark { background: #e2e8f0; color: #1e293b; }
.lp-icon-box.gold { background: #fef9c3; color: #ca8a04; }

/* --- Timeline (How It Works) --- */
.lp-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    text-align: center;
}

.lp-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 0 0 8px rgba(13, 148, 136, 0.1);
}

.lp-line {
    flex: 1;
    height: 3px;
    background: #e5e7eb;
    margin-top: 25px;
}

/* --- Video Demo --- */
.lp-demo-container {
    background: #111827;
    border-radius: 20px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.lp-play-btn {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    cursor: pointer;
    margin-bottom: 20px;
    transition: 0.3s;
}

.lp-play-btn:hover { background: var(--primary); border-color: var(--primary); transform: scale(1.1); }
.lp-play-btn span { font-size: 2.5rem; }

/* --- Pricing --- */
.lp-pricing-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.lp-price-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    text-align: center;
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    transition: 0.3s;
    position: relative;
}

.lp-price-card:hover { transform: translateY(-5px); }

.lp-price-card.popular {
    border: 2px solid var(--primary);
    box-shadow: 0 20px 40px rgba(13, 148, 136, 0.1);
}

.lp-price-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.lp-price-card h3 { color: #1f2937; margin-bottom: 10px; }
.lp-price-card .price { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin-bottom: 20px; }
.lp-price-card .price span { font-size: 1rem; color: #6b7280; font-weight: 400; }

.lp-price-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 25px;
}

.lp-price-card li {
    margin-bottom: 10px;
    color: #4b5563;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.lp-price-card li span { color: var(--primary); }

.lp-btn-outline {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.lp-btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.lp-btn-primary.full { width: 100%; justify-content: center; }

/* --- FAQ --- */
.lp-faq-container { max-width: 700px; margin: 0 auto; }
.lp-faq-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    cursor: pointer;
}
.lp-faq-q {
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lp-faq-a {
    max-height: 0;
    padding: 0 20px;
    color: #6b7280;
    transition: max-height 0.3s ease, padding 0.3s;
    font-size: 0.95rem;
}
.lp-faq-item.active .lp-faq-a { padding-bottom: 15px; }
.lp-faq-item.active .arrow { transform: rotate(180deg); }

/* --- Footer --- */
.lp-footer {
    background: #111827;
    color: #d1d5db;
    padding: 60px 5% 20px;
}

.lp-footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.lp-footer-brand p { font-size: 0.9rem; margin-top: 15px; line-height: 1.6; }
.lp-footer-brand b { color: white; }

.lp-footer h4 { color: white; font-size: 1.1rem; margin-bottom: 20px; }

.lp-footer-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.lp-footer-legal a {
    display: block;
    color: #9ca3af;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 0.9rem;
    transition: 0.2s;
}
.lp-footer-legal a:hover { color: var(--primary); }

.lp-footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
}

/* --- Animation Classes --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.visible { opacity: 1 !important; transform: translateY(0) !important; }

@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* --- Responsive LP --- */
@media (max-width: 768px) {
    .lp-nav-links { display: none; }
    .lp-hero { flex-direction: column; text-align: center; padding-top: 40px; }
    .lp-hero-content { padding-right: 0; }
    .lp-cta-group { justify-content: center; }
    .lp-hero-visual { width: 100%; margin-top: 50px; }
    .lp-3d-card { width: 100%; height: 220px; }
    .lp-comparison-grid { grid-template-columns: 1fr; }
    .lp-timeline { flex-direction: column; align-items: flex-start; padding-left: 20px; }
    .lp-line { width: 3px; height: 30px; flex: none; margin: 5px 0 5px 23px; }
    .lp-step { flex-direction: row; align-items: center; gap: 15px; text-align: left; }
    .step-icon { margin-bottom: 0; width: 40px; height: 40px; font-size: 1rem; }
    .lp-footer-content { grid-template-columns: 1fr; gap: 30px; }
}
/* --- BUG FIXES (V3.5) --- */

/* Fix 1: Profile Image Squashing */
.profile-header-card {
    flex-shrink: 0 !important; /* Header ke choto hote debena */
    min-height: auto;
}

.profile-image-container {
    width: 110px !important;
    height: 110px !important;
    flex-shrink: 0 !important; /* Image gol thakbe, chapta hobe na */
}

/* Fix 2: Enable Scrolling on Profile Page & Show Logout Button */
#profile-page {
    display: flex;
    flex-direction: column;
    overflow-y: auto !important; /* Scroll on korbe */
    padding-bottom: 100px !important; /* Nicher Nav bar theke dure rakhbe */
    height: 100%;
}

.profile-menu-list {
    flex-shrink: 0; /* Menu list jate choto na hoy */
    margin-bottom: 20px;
}

/* Fix 3: Ensure Content doesn't hide behind Bottom Nav */
.page-view {
    padding-bottom: 80px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch; /* Smooth scroll for mobile */
}
/* ============================================
   UPGRADE MODAL - NEW PLAN-AWARE STYLES (V3.5)
   ============================================ */
.upgrade-modal-box {
    max-width: 440px;
    padding: 28px 24px;
    border-radius: 24px;
    text-align: center;
}

.upgrade-icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.upgrade-icon-wrap .material-icons-outlined {
    font-size: 32px;
}

.upgrade-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}

.upgrade-subtitle {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 18px;
    line-height: 1.5;
}

.upgrade-plan-detail-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    text-align: left;
    transition: all 0.2s;
}

.upgrade-plan-detail-card.selectable-card {
    cursor: pointer;
}

.upgrade-plan-detail-card.selectable-card:active {
    transform: scale(0.98);
}

.plan-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.plan-detail-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

.plan-price-tag {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 800;
}

.plan-price-tag small {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-light);
}

.plan-badge-active {
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.plan-badge-recommended-top {
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.upgrade-features-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.upgrade-features-list li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.83rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

.upgrade-features-list .material-icons-outlined {
    font-size: 0.95rem;
    color: var(--primary);
    flex-shrink: 0;
}

.upgrade-features-list li .material-icons-outlined[style*="upgrade"] {
    color: #7c3aed;
}

.selected-plan-msg {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    min-height: 20px;
    margin: 5px 0;
}

.upgrade-wa-btn {
    background: #25D366 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.upgrade-wa-btn:disabled {
    background: #d1d5db !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Priority Support Section */
.upgrade-support-section {
    background: linear-gradient(135deg, #f0fdfa, #e0f2fe);
    border: 1px solid #b2f5ea;
    border-radius: 14px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}

.support-label {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 500;
}

.support-call-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0d9488;
    color: white;
    padding: 11px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    transition: 0.2s;
}

.support-call-btn:hover {
    background: #0f766e;
    transform: translateY(-1px);
}

.support-call-btn .material-icons-outlined {
    font-size: 1.1rem;
}

.support-email-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    transition: 0.2s;
}

.support-email-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   LANDING PAGE - ENHANCED 3D ANIMATIONS (V3.5)
   ============================================ */

/* 3D Hero Visual Improvement */
.lp-3d-card {
    perspective: 1200px;
    animation: float3d 6s ease-in-out infinite;
}

@keyframes float3d {
    0%, 100% { transform: translateY(0px) rotateX(3deg) rotateY(-5deg); }
    25% { transform: translateY(-12px) rotateX(5deg) rotateY(-3deg); }
    50% { transform: translateY(-8px) rotateX(2deg) rotateY(-8deg); }
    75% { transform: translateY(-15px) rotateX(4deg) rotateY(-4deg); }
}

.lp-card-glass {
    transform-style: preserve-3d;
    box-shadow: 
        0 25px 50px rgba(13,148,136,0.2),
        0 10px 20px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.6);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { box-shadow: 0 25px 50px rgba(13,148,136,0.2), 0 10px 20px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.6); }
    50% { box-shadow: 0 35px 60px rgba(13,148,136,0.35), 0 15px 30px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.8); }
}

/* Floating particles on hero */
.lp-hero {
    position: relative;
    overflow: hidden;
}

.lp-hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(13,148,136,0.12) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: orb1 8s ease-in-out infinite;
    pointer-events: none;
}

.lp-hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14,165,233,0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
    animation: orb2 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes orb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 20px) scale(1.1); }
}

@keyframes orb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -30px) scale(1.15); }
}

/* Feature card 3D hover effect */
.lp-feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.lp-feature-card:hover {
    transform: translateY(-8px) rotateX(3deg);
    box-shadow: 0 20px 40px rgba(13,148,136,0.15), 0 8px 16px rgba(0,0,0,0.08);
}

/* Price card 3D effect */
.lp-price-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lp-price-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.lp-price-card.popular {
    animation: popularPulse 3s ease-in-out infinite;
}

@keyframes popularPulse {
    0%, 100% { box-shadow: 0 20px 40px rgba(13,148,136,0.2); }
    50% { box-shadow: 0 25px 50px rgba(13,148,136,0.4); }
}

/* Animated gradient hero text */
.text-gradient {
    background: linear-gradient(135deg, #0d9488, #0ea5e9, #8b5cf6, #0d9488);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Staggered animation for trust bar items */
.lp-trust-item {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
}

.lp-trust-item:nth-child(1) { animation-delay: 0.1s; }
.lp-trust-item:nth-child(2) { animation-delay: 0.2s; }
.lp-trust-item:nth-child(3) { animation-delay: 0.3s; }
.lp-trust-item:nth-child(4) { animation-delay: 0.4s; }

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

/* Floating mock badge animation */
.lp-floating-badge {
    animation: floatBadge 3s ease-in-out infinite !important;
}

@keyframes floatBadge {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* Step icon pulse */
.step-icon {
    animation: stepPulse 2s ease-in-out infinite;
}

.lp-step:nth-child(3) .step-icon { animation-delay: 0.3s; }
.lp-step:nth-child(5) .step-icon { animation-delay: 0.6s; }

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(13,148,136,0.3); }
    50% { box-shadow: 0 0 0 10px rgba(13,148,136,0); }
}

/* ============================================
   CUSTOMER SUPPORT PROFILE CARD
   ============================================ */
.p-card-icon.support-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

/* ============================================
   STAFF MANAGEMENT - ONLINE STATUS
   ============================================ */
.staff-online-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    flex-shrink: 0;
}

.staff-online-dot.online {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
    animation: onlinePulse 2s ease-in-out infinite;
}

.staff-online-dot.offline {
    background: #9ca3af;
}

@keyframes onlinePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

.staff-member-row {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    gap: 10px;
}

.staff-member-row .staff-info {
    flex: 1;
}

.staff-member-row .staff-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.staff-member-row .staff-email {
    font-size: 0.75rem;
    color: var(--text-light);
}

.staff-member-row .staff-status-txt {
    font-size: 0.72rem;
    font-weight: 600;
}

.staff-member-row .staff-status-txt.online {
    color: #16a34a;
}

.staff-member-row .staff-status-txt.offline {
    color: #9ca3af;
}

/* Owner-only add staff section */
.owner-only-section {
    display: none;
}

.is-owner .owner-only-section {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 1 — NEXT LEVEL DESIGN SYSTEM
   Direction: Apple Health + Linear App energy — ultra-refined,
   surgical whitespace, liquid glass, typographic hierarchy
═══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --t0: #0D9488;
  --t1: #0f766e;
  --t2: #134e4a;
  --tglow: rgba(13,148,136,0.18);
  --tglow-sm: rgba(13,148,136,0.10);
  --surface: rgba(255,255,255,0.72);
  --surface-raised: rgba(255,255,255,0.92);
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --rule: rgba(15,23,42,0.07);
  --rule-strong: rgba(13,148,136,0.20);
  --radius-card: 18px;
  --radius-pill: 999px;
  --radius-chip: 8px;
  --shadow-lift: 0 2px 8px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-float: 0 8px 32px rgba(15,23,42,0.10), 0 2px 8px rgba(15,23,42,0.06);
  --shadow-teal: 0 6px 24px rgba(13,148,136,0.28);
  --blur: blur(20px) saturate(180%);
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
}
.dark-mode {
  --surface: rgba(15,23,42,0.72);
  --surface-raised: rgba(30,41,59,0.92);
  --ink: #f1f5f9;
  --ink-2: #94a3b8;
  --ink-3: #475569;
  --rule: rgba(255,255,255,0.06);
  --rule-strong: rgba(13,148,136,0.20);
  --shadow-lift: 0 2px 8px rgba(0,0,0,0.24), 0 1px 2px rgba(0,0,0,0.16);
  --shadow-float: 0 8px 32px rgba(0,0,0,0.32), 0 2px 8px rgba(0,0,0,0.20);
}

/* ═══════════════════════════════════════════════════════════════
   ANALYTICS SECTION TABS — pill switcher, Apple segmented control
═══════════════════════════════════════════════════════════════ */
.an-tabs {
  display: flex;
  gap: 6px;
  padding: 14px 0 10px;
  flex-wrap: wrap;
}

.an-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--rule);
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
  outline: none;
}

.an-tab:hover {
  border-color: var(--rule-strong);
  color: var(--t0);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.an-tab.active {
  background: linear-gradient(135deg, var(--t0) 0%, var(--t1) 100%);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-teal);
  transform: translateY(-1px);
}

.an-section { padding-top: 4px; }
.an-section.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════════
   CHART CARDS — glass panels
═══════════════════════════════════════════════════════════════ */
.an-chart-card {
  padding: 22px 20px 18px;
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1.5px solid var(--rule);
  box-shadow: var(--shadow-lift);
  transition: box-shadow 0.2s, transform 0.2s;
}
.an-chart-card:hover {
  box-shadow: var(--shadow-float);
  transform: translateY(-2px);
}
.an-chart-card + .an-chart-card { margin-top: 16px; }
.an-chart-card h3 {
  margin: 0 0 18px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
  gap: 7px;
}
.an-chart-card h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ═══════════════════════════════════════════════════════════════
   GST HEADER CARD
═══════════════════════════════════════════════════════════════ */
.gst-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg,
    rgba(13,148,136,0.06) 0%,
    rgba(15,118,110,0.03) 100%);
  border: 1.5px solid var(--rule-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  margin-bottom: 14px;
}
.gst-header-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.gst-header-card p {
  margin: 3px 0 0;
  font-size: 0.74rem;
  color: var(--ink-3);
  font-weight: 500;
}

.gst-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--rule-strong);
  background: rgba(13,148,136,0.06);
  color: var(--t0);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.18s;
}
.gst-export-btn:hover {
  background: linear-gradient(135deg, var(--t0), var(--t1));
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-teal);
  transform: translateY(-1px);
}
.gst-export-btn .material-icons-outlined { font-size: 0.95rem; }

/* ═══════════════════════════════════════════════════════════════
   GST SUB-TABS — underline style, clean
═══════════════════════════════════════════════════════════════ */
.gst-tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 18px;
  border-bottom: 1.5px solid var(--rule);
  padding-bottom: 0;
}
.gst-tab {
  position: relative;
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  border-radius: 0;
}
.gst-tab::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0; right: 0;
  height: 2.5px;
  background: var(--t0);
  border-radius: 99px;
  transform: scaleX(0);
  transition: transform 0.22s cubic-bezier(.34,1.56,.64,1);
}
.gst-tab.active {
  color: var(--t0);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.gst-tab.active::after { transform: scaleX(1); }

/* ═══════════════════════════════════════════════════════════════
   GST MONTH BADGE
═══════════════════════════════════════════════════════════════ */
.gst-month-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--tglow-sm);
  border: 1px solid var(--rule-strong);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--t0);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   GST STAT CARDS — Apple Health widget style
═══════════════════════════════════════════════════════════════ */
.gst-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
@media (max-width: 600px) {
  .gst-stat-row { grid-template-columns: repeat(2, 1fr); }
}

.gst-stat-card {
  padding: 14px 16px 12px;
  border-radius: 14px;
  background: var(--surface-raised);
  border: 1.5px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: var(--shadow-lift);
  transition: transform 0.18s, box-shadow 0.18s;
}
.gst-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}
.gst-stat-card.teal {
  background: linear-gradient(145deg, var(--t0) 0%, var(--t2) 100%);
  border-color: transparent;
  box-shadow: var(--shadow-teal);
}
.gst-stat-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.gst-stat-card.teal .gst-stat-label { color: rgba(255,255,255,0.65); }
.gst-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.gst-stat-card.teal .gst-stat-value { color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   B2B / B2C SECTION HEADERS — editorial divider style
═══════════════════════════════════════════════════════════════ */
.gst-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(90deg, var(--tglow-sm), transparent);
  border-left: 3px solid var(--t0);
}
.gst-section-header.b2b {
  background: linear-gradient(90deg, rgba(99,102,241,0.07), transparent);
  border-left-color: #818cf8;
}
.gst-section-pill {
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  background: linear-gradient(135deg, var(--t0), var(--t1));
  color: white;
}
.gst-section-pill.b2b {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}
.gst-section-tip {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--ink-3);
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════
   GST TABLE — Linear/Notion quality data table
═══════════════════════════════════════════════════════════════ */
.gst-table-wrapper {
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--rule);
  box-shadow: var(--shadow-lift);
  margin-bottom: 8px;
}
.gst-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.79rem;
}
.gst-table thead tr {
  background: linear-gradient(90deg, var(--t0) 0%, var(--t1) 100%);
}
.gst-table th {
  color: white;
  padding: 11px 12px;
  text-align: left;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.gst-table th:not(:first-child) { text-align: right; }
.gst-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.gst-table td:not(:first-child):not(:nth-child(2)) { text-align: right; }
.gst-table tbody tr {
  transition: background 0.12s;
}
.gst-table tbody tr:nth-child(even) {
  background: rgba(13,148,136,0.025);
}
.gst-table tbody tr:hover {
  background: rgba(13,148,136,0.06);
}
.gst-table tbody tr:last-child td { border-bottom: none; }
.gst-table tfoot tr td {
  background: linear-gradient(90deg,
    rgba(13,148,136,0.08), rgba(13,148,136,0.04));
  border-top: 2px solid var(--rule-strong);
  font-weight: 800;
  color: var(--ink);
  padding: 11px 12px;
}
.gst-table tfoot tr td:not(:first-child) { text-align: right; }

/* ── Dark mode table ─────────────────────────────────────── */
.dark-mode .gst-table tbody tr:nth-child(even) {
  background: rgba(13,148,136,0.04);
}
.dark-mode .gst-table tbody tr:hover {
  background: rgba(13,148,136,0.10);
}
.dark-mode .gst-table tfoot tr td {
  background: rgba(13,148,136,0.12);
}

/* ═══════════════════════════════════════════════════════════════
   CHIPS — monospace data labels
═══════════════════════════════════════════════════════════════ */
.hsn-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-chip);
  background: var(--tglow-sm);
  border: 1px solid var(--rule-strong);
  color: var(--t0);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.gst-rate-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--rule);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE — quiet, informative
═══════════════════════════════════════════════════════════════ */
.gst-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 20px;
  text-align: center;
  color: var(--ink-3);
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px dashed var(--rule);
  margin-bottom: 10px;
}
.gst-empty-state .material-icons-outlined {
  font-size: 2.2rem;
  color: var(--ink-3);
  opacity: 0.5;
}
.gst-empty-state p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-2);
}
.gst-empty-state small {
  font-size: 0.74rem;
  color: var(--ink-3);
  max-width: 260px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   SALES HISTORY TABLE — upgraded
═══════════════════════════════════════════════════════════════ */
.history-table tbody tr {
  transition: background 0.12s;
}
.history-table tbody tr:hover {
  background: rgba(13,148,136,0.04);
}

/* ═══════════════════════════════════════════════════════════════
   MEDICINE MODAL — HSN field placeholder styling
═══════════════════════════════════════════════════════════════ */
#med-hsn { font-family: var(--mono); font-size: 0.88rem; letter-spacing: 0.04em; }
#med-hsn::placeholder { font-family: 'Outfit', sans-serif; letter-spacing: 0; font-size: 0.82rem; }

/* ═══════════════════════════════════════════════════════════════
   MICRO-ANIMATIONS
═══════════════════════════════════════════════════════════════ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.an-section:not(.hidden) .gst-stat-card {
  animation: fadeSlideUp 0.3s ease both;
}
.an-section:not(.hidden) .gst-stat-card:nth-child(1) { animation-delay: 0.04s; }
.an-section:not(.hidden) .gst-stat-card:nth-child(2) { animation-delay: 0.08s; }
.an-section:not(.hidden) .gst-stat-card:nth-child(3) { animation-delay: 0.12s; }
.an-section:not(.hidden) .gst-stat-card:nth-child(4) { animation-delay: 0.16s; }

.an-section:not(.hidden) .gst-table-wrapper {
  animation: fadeSlideUp 0.35s ease 0.1s both;
}
.an-section:not(.hidden) .an-chart-card {
  animation: fadeSlideUp 0.35s ease both;
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 1 v3 — NEXT LEVEL DESIGN SYSTEM
   Cormorant + Outfit · Apple Health Analytics · Glass GST
═══════════════════════════════════════════════════════════════ */

/* ── Global Font Override ──────────────────────────────────── */
* { font-family: 'Outfit', sans-serif; }
h1, h2, h3, .company-name, #header-company-name,
.an-kpi-value, .gst-stat-value {
    font-family: 'Cormorant Garamond', 'Outfit', serif;
    letter-spacing: -0.01em;
}
.an-kpi-value, .gst-stat-value,
#total-sales-amount, #total-orders-count {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
    --t0: #0D9488;  --t1: #0f766e;  --t2: #134e4a;
    --tglow:    rgba(13,148,136,0.18);
    --tglow-sm: rgba(13,148,136,0.09);
    --surface:  rgba(255,255,255,0.75);
    --surface-raised: rgba(255,255,255,0.95);
    --ink:  #0f172a;  --ink-2: #475569;  --ink-3: #94a3b8;
    --rule: rgba(15,23,42,0.07);
    --rule-strong: rgba(13,148,136,0.20);
    --r-card: 18px;  --r-pill: 999px;  --r-chip: 8px;
    --shadow-lift:  0 2px 8px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.03);
    --shadow-float: 0 8px 32px rgba(15,23,42,0.10), 0 2px 8px rgba(15,23,42,0.05);
    --shadow-teal:  0 6px 24px rgba(13,148,136,0.30);
    --blur: blur(20px) saturate(180%);
    --mono: 'JetBrains Mono', monospace;
}
.dark-mode {
    --surface: rgba(15,23,42,0.75);
    --surface-raised: rgba(30,41,59,0.95);
    --ink: #f1f5f9;  --ink-2: #94a3b8;  --ink-3: #475569;
    --rule: rgba(255,255,255,0.06);
    --shadow-lift:  0 2px 8px rgba(0,0,0,0.28), 0 1px 2px rgba(0,0,0,0.18);
    --shadow-float: 0 8px 32px rgba(0,0,0,0.36), 0 2px 8px rgba(0,0,0,0.22);
}

/* ════════════════════════════════════════════════════════════
   ANALYTICS PAGE — Apple Health scroll style
════════════════════════════════════════════════════════════ */

/* Page header */
.an-page-header {
    padding: 4px 0 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.an-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.an-page-title h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin: 0;
}
.an-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    background: rgba(13,148,136,0.10);
    border: 1px solid rgba(13,148,136,0.20);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--t0);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.an-live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--t0);
    animation: livePulse 2s ease infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

/* Search input */
.an-search-input {
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--rule);
    background: var(--surface-raised);
    color: var(--text-main);
    font-size: 0.88rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    backdrop-filter: var(--blur);
}
.an-search-input:focus {
    border-color: var(--t0);
    box-shadow: 0 0 0 3px var(--tglow-sm);
}

/* Filter pills */
.an-filter-row {
    display: flex;
    gap: 6px;
    padding: 6px 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.an-filter-row::-webkit-scrollbar { display: none; }

.an-filter-pill {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: var(--r-pill);
    border: 1.5px solid var(--rule);
    background: var(--surface);
    backdrop-filter: var(--blur);
    color: var(--ink-2);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}
.an-filter-pill:hover {
    border-color: var(--rule-strong);
    color: var(--t0);
    transform: translateY(-1px);
}
.an-filter-pill.active {
    background: linear-gradient(135deg, var(--t0), var(--t1));
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-teal);
    transform: translateY(-1px);
}

/* KPI cards */
.an-kpi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.an-kpi-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--r-card);
    background: var(--surface-raised);
    border: 1.5px solid var(--rule);
    box-shadow: var(--shadow-lift);
    transition: transform 0.18s, box-shadow 0.18s;
    backdrop-filter: var(--blur);
}
.an-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}
.an-kpi-card.primary {
    background: linear-gradient(135deg, var(--t0) 0%, var(--t2) 100%);
    border-color: transparent;
    box-shadow: var(--shadow-teal);
}
.an-kpi-icon {
    font-size: 1.5rem;
    color: var(--t0);
    opacity: 0.85;
}
.an-kpi-card.primary .an-kpi-icon { color: rgba(255,255,255,0.8); }
.an-kpi-body { display: flex; flex-direction: column; gap: 2px; }
.an-kpi-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-3);
}
.an-kpi-card.primary .an-kpi-label { color: rgba(255,255,255,0.65); }
.an-kpi-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
}
.an-kpi-card.primary .an-kpi-value { color: white; }

/* Section labels */
.an-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-3);
    margin-bottom: 10px;
}
.an-section-label .material-icons-outlined {
    font-size: 0.95rem;
    color: var(--t0);
    opacity: 0.7;
}
.an-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}

/* Chart cards */
.an-chart-card {
    padding: 18px 16px;
    border-radius: var(--r-card);
    background: var(--surface-raised);
    border: 1.5px solid var(--rule);
    box-shadow: var(--shadow-lift);
    backdrop-filter: var(--blur);
    transition: transform 0.18s, box-shadow 0.18s;
}
.an-chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}
.an-chart-card h3 {
    margin: 0 0 14px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-3);
}

/* History card */
.an-history-card {
    border-radius: var(--r-card);
    overflow: hidden;
    border: 1.5px solid var(--rule);
    box-shadow: var(--shadow-lift);
}
.history-table tbody tr:hover { background: rgba(13,148,136,0.04); }
.mode-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: var(--r-pill);
    background: rgba(13,148,136,0.08);
    border: 1px solid rgba(13,148,136,0.18);
    color: var(--t0);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ════════════════════════════════════════════════════════════
   SETTINGS — section labels
════════════════════════════════════════════════════════════ */
.settings-section-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-3);
    padding: 10px 0 8px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ════════════════════════════════════════════════════════════
   GST MODAL HEADER — inside full-screen modal
════════════════════════════════════════════════════════════ */
#modal-gst .fs-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}
#modal-gst .fs-header h2 { flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════
   GST DESIGN SYSTEM (all the glass components)
════════════════════════════════════════════════════════════ */

/* GST tab-bar — underline style */
.gst-tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1.5px solid var(--rule);
}
.gst-tab {
    position: relative;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--ink-3);
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 600;
    transition: color 0.2s;
}
.gst-tab::after {
    content: '';
    position: absolute;
    bottom: -1.5px; left: 0; right: 0;
    height: 2.5px;
    background: var(--t0);
    border-radius: 99px;
    transform: scaleX(0);
    transition: transform 0.22s cubic-bezier(.34,1.56,.64,1);
}
.gst-tab.active { color: var(--t0); }
.gst-tab.active::after { transform: scaleX(1); }

/* Month badge */
.gst-month-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--r-pill);
    background: var(--tglow-sm);
    border: 1px solid var(--rule-strong);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--t0);
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

/* GST header card */
.gst-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-radius: var(--r-card);
    background: linear-gradient(135deg, rgba(13,148,136,0.07), rgba(15,118,110,0.03));
    border: 1.5px solid var(--rule-strong);
    backdrop-filter: var(--blur);
    margin-bottom: 14px;
}
.gst-header-card h3 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
}
.gst-header-card p { margin: 3px 0 0; font-size: 0.74rem; color: var(--ink-3); }

/* Export buttons */
.gst-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--rule-strong);
    background: rgba(13,148,136,0.07);
    color: var(--t0);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.18s;
}
.gst-export-btn:hover {
    background: linear-gradient(135deg, var(--t0), var(--t1));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-teal);
    transform: translateY(-1px);
}
.gst-export-btn .material-icons-outlined { font-size: 0.95rem; }

/* Stat row */
.gst-stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
@media (max-width: 580px) { .gst-stat-row { grid-template-columns: repeat(2,1fr); } }
.gst-stat-card {
    padding: 13px 14px 11px;
    border-radius: 14px;
    background: var(--surface-raised);
    border: 1.5px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: var(--shadow-lift);
    transition: transform 0.16s, box-shadow 0.16s;
}
.gst-stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.gst-stat-card.teal {
    background: linear-gradient(145deg, var(--t0) 0%, var(--t2) 100%);
    border-color: transparent;
    box-shadow: var(--shadow-teal);
}
.gst-stat-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-3);
}
.gst-stat-card.teal .gst-stat-label { color: rgba(255,255,255,0.65); }
.gst-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.gst-stat-card.teal .gst-stat-value { color: white; }

/* Section headers B2C / B2B */
.gst-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 11px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    background: linear-gradient(90deg, rgba(13,148,136,0.07), transparent);
    border-left: 3px solid var(--t0);
}
.gst-section-header.b2b {
    background: linear-gradient(90deg, rgba(99,102,241,0.07), transparent);
    border-left-color: #818cf8;
}
.gst-section-pill {
    padding: 3px 11px;
    border-radius: var(--r-pill);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    background: linear-gradient(135deg, var(--t0), var(--t1));
    color: white;
}
.gst-section-pill.b2b { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.gst-section-tip { margin-left: auto; font-size: 0.7rem; color: var(--ink-3); font-weight: 400; }

/* GST table */
.gst-table-wrapper {
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid var(--rule);
    box-shadow: var(--shadow-lift);
    margin-bottom: 8px;
}
.gst-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.gst-table thead tr {
    background: linear-gradient(90deg, var(--t0) 0%, var(--t1) 100%);
}
.gst-table th {
    color: white;
    padding: 10px 11px;
    text-align: left;
    white-space: nowrap;
    font-size: 0.71rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.gst-table th:not(:first-child):not(:nth-child(2)) { text-align: right; }
.gst-table td { padding: 9px 11px; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.gst-table td:not(:first-child):not(:nth-child(2)) { text-align: right; font-family: var(--mono); font-size: 0.78rem; }
.gst-table tbody tr:nth-child(even) { background: rgba(13,148,136,0.025); }
.gst-table tbody tr:hover { background: rgba(13,148,136,0.06); }
.gst-table tbody tr:last-child td { border-bottom: none; }
.gst-table tfoot tr td {
    background: rgba(13,148,136,0.07);
    border-top: 2px solid var(--rule-strong);
    font-weight: 800;
    color: var(--ink);
    padding: 10px 11px;
    font-family: var(--mono);
}
.gst-table tfoot tr td:not(:first-child):not(:nth-child(2)) { text-align: right; }

/* Chips */
.hsn-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--r-chip);
    background: var(--tglow-sm);
    border: 1px solid var(--rule-strong);
    color: var(--t0);
    font-size: 0.71rem;
    font-weight: 700;
    font-family: var(--mono);
}
.gst-rate-chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: var(--r-pill);
    background: var(--surface);
    border: 1px solid var(--rule);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink);
}

/* Empty state */
.gst-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    text-align: center;
    color: var(--ink-3);
    border-radius: 14px;
    background: var(--surface);
    border: 1.5px dashed var(--rule);
    margin-bottom: 10px;
}
.gst-empty-state .material-icons-outlined { font-size: 2rem; opacity: 0.4; }
.gst-empty-state p { margin: 0; font-size: 0.88rem; font-weight: 700; color: var(--ink-2); }
.gst-empty-state small { font-size: 0.74rem; max-width: 240px; line-height: 1.5; }

/* Dark mode adjustments */
.dark-mode .gst-stat-card     { background: #1e293b; border-color: #334155; }
.dark-mode .gst-table td      { border-color: #1e293b; }
.dark-mode .gst-table tbody tr:nth-child(even) { background: rgba(13,148,136,0.05); }
.dark-mode .gst-table tfoot tr td { background: rgba(13,148,136,0.12); }
.dark-mode .an-kpi-card       { background: rgba(30,41,59,0.9); }
.dark-mode .an-chart-card     { background: rgba(30,41,59,0.85); }

/* ════════════════════════════════════════════════════════════
   MICRO-ANIMATIONS
════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.an-kpi-card { }


.an-chart-card { }
.gst-stat-card { }




.gst-table-wrapper { }
