@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --font-primary: 'DM Sans', sans-serif;
    --font-title: 'Playfair Display', serif;
    
    /* Light Mode Palette (stardiagnocare.in) */
    --bg-app: #fdfaf6;               /* Warm cream body background */
    --bg-card: #ffffff;
    --bg-sidebar: #0f2544;           /* Deep navy sidebar */
    --bg-sidebar-active: rgba(13, 148, 136, 0.12); /* Teal active background */
    --border-color: #e8e2d9;          /* Warm border */
    
    --text-primary: #1a2332;          /* Slate text */
    --text-secondary: #64748b;        /* Muted slate */
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    --color-primary: #0d9488;         /* Teal */
    --color-primary-glow: rgba(13, 148, 136, 0.15);
    --color-secondary: #0f2544;       /* Navy */
    --color-cyan: #14b8a6;            /* Light Teal */
    --color-success: #16a34a;         /* Accurate Green */
    --color-warning: #f59e0b;
    --color-danger: #dc2626;          /* Red alert */
    
    --card-shadow: 0 2px 16px rgba(15,37,68,.08);
    --glass-border: rgba(255, 255, 255, 0.5);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --sidebar-width: 260px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Mode Palette */
    --bg-app: #090d16;
    --bg-card: #121824;
    --bg-sidebar: #0b0f19;
    --bg-sidebar-active: rgba(20, 184, 166, 0.1);
    --border-color: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --color-primary: #14b8a6;
    --color-primary-glow: rgba(20, 184, 166, 0.2);
    --color-secondary: #0b0f19;
    --color-cyan: #22d3ee;
    
    --card-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.2), 0 5px 15px -3px rgba(0, 0, 0, 0.1);
    --glass-border: rgba(255, 255, 255, 0.05);
}

h1, h2, h3, h4, h5, h6, .hero-title, .sidebar-brand-name, .logo-name, .menu-page-title, .modal-title, .success-title {
    font-family: var(--font-title);
    font-weight: 700;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Dashboard & Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition-smooth);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    padding: 2px;
}

.sidebar-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand-name {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.menu-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.75rem 1rem 0.25rem 1rem;
    letter-spacing: 1px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
    font-size: 0.925rem;
}

.menu-item i {
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    color: var(--text-white);
    background-color: var(--bg-sidebar-active);
    transform: translateX(4px);
}

.menu-item.active {
    color: var(--text-white);
    background: linear-gradient(to right, var(--color-primary), var(--color-cyan));
    box-shadow: 0 4px 15px var(--color-primary-glow);
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.03);
}

.user-avatar-circle {
    width: 38px;
    height: 38px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-primary);
}

.user-meta-info {
    flex-grow: 1;
    overflow: hidden;
}

.user-meta-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta-role {
    font-size: 0.725rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Main Content Area */
.content-wrapper {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

/* Navbar */
.top-navbar {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Themes Toggle */
.theme-toggle-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    background-color: var(--border-color);
    color: var(--color-primary);
}

/* Page Contents */
.main-content {
    padding: 2rem;
    flex-grow: 1;
}

/* Cards Design */
.premium-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    overflow: hidden;
    height: 100%;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.premium-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.premium-card-body {
    padding: 1.5rem;
}

/* Stats Cards */
.stat-card {
    position: relative;
    padding: 1.5rem;
    overflow: hidden;
    z-index: 1;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
    z-index: -1;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Custom Table Styles */
.glass-table-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.glass-table {
    width: 100%;
    margin-bottom: 0 !important;
}

.glass-table th {
    background-color: rgba(0, 0, 0, 0.02) !important;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .glass-table th {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.glass-table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.glass-table tbody tr {
    transition: var(--transition-smooth);
}

.glass-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.02);
}

/* Status Badges */
.badge-premium {
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-premium-paid {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
}

.badge-premium-partial {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--color-warning);
}

.badge-premium-unpaid {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--color-danger);
}

.badge-premium-pending {
    background-color: rgba(59, 130, 246, 0.12);
    color: var(--color-primary);
}

.badge-premium-active {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
}

.badge-premium-inactive {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--color-danger);
}

/* Buttons */
.btn-premium-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-cyan) 100%);
    color: white !important;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--color-primary-glow);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-premium-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
}

.btn-premium-secondary {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
    border-radius: var(--border-radius-sm);
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-premium-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

/* Front Site Hero CSS */
.hero-section {
    background: radial-gradient(circle at 10% 20%, #f0fdf9 0%, #fdfaf6 90%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero-section {
    background: radial-gradient(circle at 10% 20%, #0d1322 0%, #090d16 90%);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Quick Search Bar */
.search-wrapper {
    background: white;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .search-wrapper {
    background: var(--bg-card);
}

.search-input {
    border: none;
    background: transparent;
    padding: 0.75rem 1.5rem;
    width: 100%;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Dynamic Hover Micro-animations */
.hover-lift {
    transition: var(--transition-smooth);
}
.hover-lift:hover {
    transform: translateY(-4px);
}

/* Mobile responsive toggles */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .content-wrapper {
        margin-left: 0 !important;
    }
}

/* ==============================================
   APP SHELL LAYOUT STYLES
=============================================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1050;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    transition: background-color 0.3s, border-color 0.3s;
}

[data-theme="dark"] .app-header {
    background-color: rgba(15, 23, 42, 0.95);
    border-bottom-color: var(--glass-border);
}

body.has-app-layout {
    padding-top: 75px !important;
    padding-bottom: 95px !important;
}

.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .app-bottom-nav {
    background: rgba(15, 23, 42, 0.9);
    border-top-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
}

.app-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    height: 100%;
    flex: 1;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 2px;
    border: none;
    background: transparent;
    padding: 6px 0;
}

.app-bottom-nav .nav-item .nav-icon-wrapper {
    position: relative;
    width: 52px;
    height: 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.25rem;
}

.app-bottom-nav .nav-item .active-icon {
    display: none;
}

.app-bottom-nav .nav-item .inactive-icon {
    display: inline-block;
}

.app-bottom-nav .nav-item:hover .nav-icon-wrapper {
    color: #0d9488;
}

[data-theme="dark"] .app-bottom-nav .nav-item:hover .nav-icon-wrapper {
    color: #2dd4bf;
}

/* Active State Design */
.app-bottom-nav .nav-item.active .nav-icon-wrapper {
    background-color: #e6fcf5; /* Soft active green pill background */
    color: #0d9488 !important;
}

[data-theme="dark"] .app-bottom-nav .nav-item.active .nav-icon-wrapper {
    background-color: rgba(13, 148, 136, 0.2) !important;
    color: #2dd4bf !important;
}

.app-bottom-nav .nav-item.active .active-icon {
    display: inline-block;
}

.app-bottom-nav .nav-item.active .inactive-icon {
    display: none;
}

.app-bottom-nav .nav-item.active .nav-label {
    color: #0d9488 !important;
    font-weight: 700;
}

[data-theme="dark"] .app-bottom-nav .nav-item.active .nav-label {
    color: #2dd4bf !important;
}

.app-bottom-nav .nav-item:active {
    transform: scale(0.92) !important; /* Real native tactile press response */
}

/* Floating Dock for Desktop/Wide Screens */
@media (min-width: 768px) {
    .app-bottom-nav {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 500px;
        border-radius: 24px;
        bottom: 24px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
        height: 76px;
        padding-bottom: 0;
    }
    
    [data-theme="dark"] .app-bottom-nav {
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    }
}

/* ==============================================
   APP PUBLIC FOOTER & CHAT WIDGET STYLES
=============================================== */
.app-public-footer {
    background-color: #0f2544 !important; /* Deep navy background matching design */
    color: #ffffff;
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.map-placeholder-box {
    background-color: #0b1a30;
    height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.btn-directions {
    background-color: #0d9488 !important; /* Green/Teal button matching design */
    border: none;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.btn-directions:hover {
    background-color: #0f766e !important;
    transform: translateY(-2px);
}

.footer-links a {
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #2dd4bf !important;
}

/* Floating Chat Widget */
.floating-chat-btn {
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 55px;
    height: 55px;
    background-color: #10b981; /* Green */
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    z-index: 1040;
    transition: transform 0.2s, background-color 0.2s;
    text-decoration: none;
}

.floating-chat-btn:hover {
    background-color: #059669;
    transform: scale(1.08);
}

[data-theme="dark"] .floating-chat-btn {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

/* Cart Badge Custom Styling */
.cart-badge {
    font-size: 0.55rem !important;
    padding: 0.25em 0.45em !important;
    border: 2px solid white;
}
[data-theme="dark"] .cart-badge {
    border-color: var(--bg-card);
}

.profile-avatar-btn .user-avatar-circle {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Premium Teal Pill Buttons for Subcategories */
.btn-teal {
    background-color: #0d9488 !important;
    color: white !important;
    border: 1px solid #0d9488 !important;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2);
}
.btn-teal:hover {
    background-color: #0f766e !important;
    border-color: #0f766e !important;
}
.btn-outline-teal {
    background-color: transparent !important;
    color: #0d9488 !important;
    border: 1px solid rgba(13, 148, 136, 0.3) !important;
}
.btn-outline-teal:hover {
    background-color: rgba(13, 148, 136, 0.05) !important;
    border-color: #0d9488 !important;
}

[data-theme="dark"] .btn-teal {
    background-color: #0f766e !important;
    border-color: #0f766e !important;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.1);
}
[data-theme="dark"] .btn-outline-teal {
    color: #2dd4bf !important;
    border-color: rgba(45, 212, 191, 0.3) !important;
}
[data-theme="dark"] .btn-outline-teal:hover {
    background-color: rgba(45, 212, 191, 0.05) !important;
}

/* Category Sidebar Navigation Adjustments */
.category-list .list-group-item {
    border: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b !important;
    padding: 12px 18px;
    background-color: transparent !important;
    transition: all 0.2s ease;
    border-left: 4px solid transparent !important;
}

.category-list .list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
    color: #0f2544 !important;
}

[data-theme="dark"] .category-list .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: #ffffff !important;
}

.category-list .list-group-item.active {
    background-color: #e6fcf5 !important;
    color: #0d9488 !important;
    border-left: 4px solid #0d9488 !important;
    border-radius: 0 !important;
    font-weight: 700;
}

[data-theme="dark"] .category-list .list-group-item.active {
    background-color: rgba(13, 148, 136, 0.15) !important;
    color: #2dd4bf !important;
    border-left-color: #2dd4bf !important;
}

.category-list .list-group-item:first-child.active {
    border-top-left-radius: inherit !important;
    border-top-right-radius: inherit !important;
}
.category-list .list-group-item:last-child.active {
    border-bottom-left-radius: inherit !important;
    border-bottom-right-radius: inherit !important;
}

/* Scrollbar concealing utilities */
#subcategoryPills::-webkit-scrollbar {
    display: none;
}

