/* ==========================================================================
   ApexPortal PHP & MySQL - Core Style Sheet
   Designed for cPanel Shared Hosting & Clean Responsive Layouts
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #0f172a;
    --accent: #10b981;
    --accent-hover: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-muted: #334155;
    --gray-100: #f8fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --white: #ffffff;
    
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

body {
    font-family: var(--font-main);
    background-color: #f1f5f9;
    color: var(--dark-muted);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

a, a:hover, a:focus, a:visited, a:active {
    text-decoration: none !important;
}

a {
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 1.25rem;
    box-sizing: border-box;
}

/* Top Announcement Bar */
.top-bar {
    background: var(--dark);
    color: var(--gray-300);
    font-size: 0.85rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.top-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-info .divider {
    color: var(--gray-600);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-cpanel {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* Header & Nav */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: var(--white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.logo-icon.small {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Desktop Nav Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);

}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

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

/* Mobile Nav Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle .icon-close {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--dark);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

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

/* Main Content Wrapper */
.main-content {
    flex: 1;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(180deg, var(--white) 0%, #f1f5f9 100%);
    padding: 4rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #dbeafe;
    color: var(--primary-hover);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-highlight {
    color: var(--primary);
    background: linear-gradient(120deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.2) 100%);
    padding: 0 0.2rem;
    border-radius: 4px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Database Connection Card */
.db-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.db-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.db-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.connected {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-badge.disconnected {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.db-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.db-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    gap: 0.5rem;
}

.db-label {
    color: var(--gray-600);
    font-weight: 500;
}

.db-val {
    font-weight: 700;
    color: var(--dark);
    font-family: monospace;
    word-break: break-all;
}

/* Feature Cards Grid */
.features-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
}

.section-title p {
    color: var(--gray-600);
    font-size: 1rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* Form Demo Section */
.demo-section {
    padding: 4rem 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.demo-box {
    background: var(--gray-100);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.demo-box h3 {
    margin-bottom: 1.25rem;
    color: var(--dark);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--dark);
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Alert Boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: var(--gray-400);
    padding: 4rem 0 2rem 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand .brand-name {
    color: var(--white);
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.server-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--gray-300);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.footer-heading {
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-links a:hover {
    color: var(--white);
}

.tech-specs-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--gray-400);
}

.spec-val {
    color: var(--white);
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    color: var(--gray-600);
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .demo-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2.1rem !important;
        line-height: 1.25;
    }

    .hero-desc {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .db-card {
        padding: 1.25rem;
    }

    .mobile-toggle {
        display: block;
    }

    .site-header {
        position: relative;
    }

    .nav-menu {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg);
        display: none;
        gap: 1rem;
        z-index: 1001;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .nav-actions {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--gray-200);
    }

    .nav-actions .btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Admin Responsive Dashboard Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.admin-main,
.member-main {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: visible;
}

.admin-sidebar-wrapper {
    min-width: 0;
    width: 100%;
}

.admin-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.admin-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.admin-nav-item a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.admin-nav-item a.active {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 700;
}

.admin-nav-item a i.link-icon {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.badge-coming-soon {
    font-size: 0.68rem;
    font-weight: 700;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--gray-600);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.stat-value {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.25;
    margin-top: 0.15rem;
    white-space: nowrap;
    word-break: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value code {
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.1rem 0.35rem;
    background: #f1f5f9;
    border-radius: 4px;
    color: #2563eb;
}

/* Member Responsive Dashboard Layout */
.member-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.member-sidebar-wrapper {
    min-width: 0;
    width: 100%;
}

.member-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.member-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-nav-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.member-nav-item a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.member-nav-item a.active {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 700;
}

.member-nav-item a i.link-icon {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

/* Universal Table Wrapper for Clean Horizontal Scrolling without Page Breaking */
.table-responsive,
div[style*="overflow-x: auto"],
div[style*="overflow-x:auto"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    overscroll-behavior-x: contain !important;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--gray-200);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.table-responsive::-webkit-scrollbar,
div[style*="overflow-x: auto"]::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-responsive::-webkit-scrollbar-track,
div[style*="overflow-x: auto"]::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.admin-layout, .member-layout, .main-content {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Common Directory Tables & Data Grids */
.req-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    font-size: 0.82rem;
    min-width: 600px;
}

.req-table th {
    background: #f8fafc;
    color: var(--dark);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.55rem 0.65rem;
    border-bottom: 2px solid var(--gray-200);
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
}

.req-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.82rem;
    color: var(--dark-muted);
    vertical-align: middle;
    line-height: 1.35;
}

.req-table tr:hover td {
    background: #f8fafc;
}

.req-table tr:last-child td {
    border-bottom: none;
}

/* Compact Table Action Utilities */
.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.table-cell-title {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.84rem;
    display: block;
    line-height: 1.25;
}

.table-cell-sub {
    font-size: 0.72rem;
    color: var(--gray-600);
    line-height: 1.2;
    margin-top: 0.15rem;
}

.badge-pass {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.badge-fail {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.badge-status {
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.badge-status.pass {
    background: #dcfce7;
    color: #15803d;
}

.badge-status.fail {
    background: #fee2e2;
    color: #b91c1c;
}

/* Mobile Dashboard Quick Navigation Bar (Horizontal Scrollable Pill Bar) */
.dashboard-mobile-nav {
    display: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 0.4rem;
    padding: 0.4rem 0.2rem 0.75rem 0.2rem;
    margin-bottom: 1rem;
    scrollbar-width: none;
}

.dashboard-mobile-nav::-webkit-scrollbar {
    display: none;
}

.mobile-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--dark-muted);
    text-decoration: none !important;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.mobile-nav-pill:active, .mobile-nav-pill:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.mobile-nav-pill.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.mobile-nav-pill.active i {
    color: var(--white) !important;
}

/* Mobile Friendly Product Cards Grid */
.products-grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

/* Product Purchase Modal / Drawer for Mobile & Desktop */
.product-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9995;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.product-modal-content {
    background: #ffffff;
    border-radius: 18px;
    max-width: 720px;
    width: 100%;
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    border: 1px solid #cbd5e1;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    margin: auto;
    min-height: 0;
}

.product-modal-body {
    overflow-y: auto;
    padding: 1.5rem;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

@media (max-width: 768px) {
    .product-modal-backdrop {
        padding: 0.5rem 0.5rem 5rem 0.5rem;
        align-items: flex-end;
    }
    .product-modal-content {
        max-height: calc(100dvh - 5.5rem);
        border-radius: 16px;
        margin: 0 auto;
        width: 100%;
    }
    .product-modal-body {
        padding: 1rem 0.85rem 1.25rem 0.85rem;
    }
}

.desktop-only-table {
    display: block;
    width: 100%;
}
.mobile-only-cards {
    display: none;
}

/* Mobile Data Cards (Alternative to Wide Tables on Phone) */
.mobile-data-card {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mobile-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
    padding: 0.2rem 0;
    border-bottom: 1px dashed #f1f5f9;
}
.mobile-data-row:last-child {
    border-bottom: none;
}
.mobile-data-label {
    color: var(--gray-600);
    font-size: 0.78rem;
    font-weight: 600;
}
.mobile-data-val {
    font-weight: 700;
    color: var(--dark);
    text-align: right;
}

@media (max-width: 992px) {
    .admin-layout, .member-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 1rem !important;
    }

    .admin-sidebar-toggle, .member-sidebar-toggle {
        display: inline-flex !important;
    }

    .admin-sidebar-wrapper, .member-sidebar-wrapper {
        display: none !important;
        width: 100% !important;
    }

    .admin-sidebar-wrapper.mobile-open, .member-sidebar-wrapper.mobile-open {
        display: block !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
        animation: fadeIn 0.2s ease-in !important;
    }

    .dashboard-mobile-nav {
        display: flex !important;
    }

    .stat-card {
        padding: 0.9rem;
        gap: 0.65rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .desktop-only-table {
        display: none !important;
    }
    .mobile-only-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.85rem !important;
        width: 100% !important;
    }
    .container {
        padding: 0 0.75rem;
    }
    .header-inner {
        height: 60px;
    }
    .mobile-toggle {
        display: block;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--gray-200);
        z-index: 9999;
        max-height: 80vh;
        overflow-y: auto;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }
    .nav-item, .nav-link {
        width: 100%;
    }
    
    /* 2-Column Responsive Stat Grid on Mobile */
    .stat-grid-responsive {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
    }

    .stat-card {
        padding: 0.75rem 0.85rem;
        gap: 0.5rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .stat-value {
        font-size: 1.15rem;
    }

    .req-table th, .req-table td {
        padding: 0.45rem 0.55rem;
        font-size: 0.76rem;
    }

    /* 2-Column Product Grid on Mobile */
    .products-grid-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .products-grid-responsive .product-img-box img {
        height: 140px !important;
    }

    .products-grid-responsive .product-title {
        font-size: 0.9rem !important;
    }

    .products-grid-responsive .product-price {
        font-size: 1.05rem !important;
    }
}

@media (max-width: 480px) {
    .btn {
        font-size: 0.82rem;
    }
    .top-bar-content {
        justify-content: center;
        text-align: center;
    }
    .top-info {
        font-size: 0.75rem;
    }
    .brand-name {
        font-size: 1.05rem !important;
    }
    .brand-tagline {
        font-size: 0.68rem !important;
    }
    .logo-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.05rem !important;
    }
}

/* Mobile Sticky Bottom Bar & Floating Voice Trigger System */
@keyframes voicePulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.5), 0 8px 20px -3px rgba(124, 58, 237, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(124, 58, 237, 0), 0 8px 20px -3px rgba(124, 58, 237, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0), 0 8px 20px -3px rgba(124, 58, 237, 0.4);
    }
}

.mobile-bottom-bar {
    display: none;
}

.floating-voice-btn-wrapper {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    top: auto !important;
    left: auto !important;
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 99998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.floating-voice-btn-wrapper button {
    pointer-events: auto !important;
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 58px;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06);
        z-index: 9990;
        justify-content: space-around;
        align-items: center;
        padding: 0.25rem 0.2rem;
    }

    .main-content {
        padding-bottom: 76px !important;
    }

    .floating-voice-btn-wrapper {
        position: fixed !important;
        bottom: 68px !important;
        right: 16px !important;
        top: auto !important;
        left: auto !important;
        width: 52px !important;
        height: 52px !important;
        max-width: 52px !important;
        max-height: 52px !important;
        margin: 0 !important;
        padding: 0 !important;
        pointer-events: none !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .floating-voice-btn-wrapper button {
        pointer-events: auto !important;
        width: 52px !important;
        height: 52px !important;
    }

    .dashboard-mobile-nav {
        display: flex !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        gap: 0.4rem;
        padding: 0.35rem 0.2rem 0.65rem 0.2rem;
        margin-bottom: 1rem;
        scrollbar-width: none;
    }
    .dashboard-mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .dashboard-mobile-nav-item {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.45rem 0.85rem;
        background: #f8fafc;
        border: 1px solid #cbd5e1;
        border-radius: 9999px;
        font-size: 0.8rem;
        font-weight: 700;
        color: #334155;
        text-decoration: none;
        flex-shrink: 0;
        transition: all 0.15s ease;
    }
    .dashboard-mobile-nav-item:hover, .dashboard-mobile-nav-item.active {
        background: #2563eb;
        color: #ffffff;
        border-color: #2563eb;
    }

    body {
        padding-bottom: 85px !important;
    }
}

