/* Dashboard Variables */
:root {
    --gold-text: #FFD700;
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    --dark-bg: #0a0a0a;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: 1px solid rgba(255, 211, 105, 0.15);
    --sidebar-width: 280px;
    --card-bg: rgba(255, 255, 255, 0.03);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.open {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.status-badge.in-progress {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.status-badge.resolved {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.status-badge.closed {
    background: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.2);
}

.status-badge.pending {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge.shipped {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.status-badge.delivered {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.status-badge.cancelled {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.status-select-gold {
    background: rgba(255, 215, 0, 0.1) !important;
    color: #FFD700 !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.status-select-gold option {
    background: #111 !important;
    color: white !important;
}

.status-select-gold:hover {
    background: rgba(255, 215, 0, 0.2) !important;
    border-color: #FFD700 !important;
}

.dashboard-hamburger {
    display: none;
    /* Hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    width: 35px !important;
    min-width: 35px !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    z-index: 10000;
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
    flex-shrink: 0 !important;
}

.dashboard-hamburger span {
    display: block !important;
    width: 30px !important;
    height: 3px !important;
    min-height: 3px !important;
    max-height: 3px !important;
    /* Thicker lines for better visibility */
    background: #FFD369 !important;
    /* Brighter gold yellow */
    border-radius: 10px !important;
    box-shadow: 0 0 12px rgba(255, 211, 105, 0.45) !important;
    /* Stronger glow */
    transition: all 0.3s ease;
    flex-shrink: 0 !important;
}

.dashboard-hamburger.active {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.dashboard-hamburger.active span {
    position: absolute !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
}

.dashboard-hamburger.active span:nth-child(1) {
    transform: rotate(0deg) !important;
}

.dashboard-hamburger.active span:nth-child(2) {
    transform: rotate(60deg) !important;
    opacity: 1 !important;
}

.dashboard-hamburger.active span:nth-child(3) {
    transform: rotate(-60deg) !important;
}

html,
body.dashboard-body {
    background: #030509 !important;
    background-color: #030509 !important;
    color: white;
    font-family: 'Outfit', sans-serif;
    margin: 0;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
    max-width: 100vw !important;
    position: relative;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.05) 0%, transparent 40%) !important;
}

body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 10, 10, 0.95);
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    backdrop-filter: blur(20px);
    
    /* Hide scrollbars but keep scrolling active */
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Edge/IE */
}

.sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
    width: 0;
    height: 0;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 211, 105, 0.2);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 211, 105, 0.5);
}

.sidebar-header {
    padding: 20px 0 40px;
    text-align: center;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--gold-text);
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-header img {
    height: 40px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 30px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: left;
    text-decoration: none;
    position: relative;
    font-family: 'Outfit', sans-serif;
}

.nav-item:hover {
    background: rgba(255, 211, 105, 0.05);
    color: white;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(255, 211, 105, 0.15) 0%, transparent 100%);
    color: var(--gold-text);
    border-left: 3px solid var(--gold-text);
    box-shadow: 0 4px 15px rgba(255, 211, 105, 0.05);
}

.nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Action Icons for Tables */
.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.btn-icon:active {
    transform: scale(0.95);
}

.nav-item .badge {
    background: var(--gold-text);
    color: black;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    margin-left: auto;
}

.nav-item.logout {
    color: #ff6b6b;
}

.nav-item.logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px 60px;
    background: #0a0a0a;
    
    /* Hide scrollbars but keep scrolling active */
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Edge/IE */
}

.main-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
    width: 0;
    height: 0;
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
    background: transparent;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.content-header h1 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
}

.content-header p {
    color: rgba(255, 255, 255, 0.5);
    margin: 5px 0 0;
}

.gradient-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gold-text {
    color: var(--gold-text);
}

/* --- STAT CARDS --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    color: white;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.stat-card:hover::before {
    transform: translateX(100%);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-box.gold {
    background: rgba(255, 211, 105, 0.1);
    color: var(--gold-text);
}

.icon-box.blue {
    background: rgba(78, 205, 196, 0.1);
    color: #4ecdc4;
}

.icon-box.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-weight: 400;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-text);
}

/* --- ITEMS GRID (Cart & Library) --- */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.dashboard-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 211, 105, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-image-container {
    height: 200px;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.card-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--gold-text);
    color: var(--gold-text);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
}

.card-details {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1rem;
    margin: 0 0 5px;
    line-height: 1.4;
}

.card-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-price {
    color: var(--gold-text);
    font-size: 1.2rem;
    font-weight: 700;
}

.card-qty {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-dashboard {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gold-gradient);
    color: black;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 211, 105, 0.3);
    color: var(--gold-text);
}

.btn-secondary:hover {
    border-color: var(--gold-text);
    background: rgba(255, 211, 105, 0.05);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.2);
}

/* --- ORDERS LIST --- */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: background 0.3s;
}

.order-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.order-img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.order-info {
    flex: 1;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.order-id {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.order-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.order-title {
    font-size: 1.1rem;
    margin: 5px 0;
}

.order-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-paid {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* --- SETTINGS NEW STYLES --- */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.admin-security-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 993px) {
    .admin-security-grid {
        grid-template-columns: 1fr 1.5fr;
    }
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.activity-log-header {
    display: grid;
    grid-template-columns: 1fr;
    opacity: 0.5;
    font-size: 0.8rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 700;
}

@media (min-width: 769px) {
    .activity-log-header {
        grid-template-columns: 1.2fr 1fr 1.5fr;
    }
}

.settings-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.settings-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 211, 105, 0.3);
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-form-grid {
    margin-top: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--gold-text);
    background: rgba(0, 0, 0, 0.6);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    /* Prevent icons from blocking input clicks */
}

.input-wrapper input {
    padding-left: 45px !important;
}

.full-width {
    width: 100%;
}

.dashed-border {
    border-style: dashed;
    margin-top: 15px;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.security-item h4 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.security-item p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.security-options .btn {
    padding: 8px 20px;
}

.settings-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.fade-text {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    text-align: center;
    margin-bottom: 15px;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }

    .sidebar-header span {
        display: none;
    }

    .nav-item span {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 15px;
    }

    .nav-item i {
        margin: 0;
        font-size: 1.4rem;
    }

    .main-content {
        margin-left: 80px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 60px;
        /* Fixed height for header */
        position: sticky;
        top: 0;
        display: block;
        /* Standard block container */
        padding: 0 15px !important;
        margin: 0 !important;
        z-index: 1000;
        background: rgba(10, 10, 10, 0.98) !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 211, 105, 0.15) !important;
        border-radius: 0 !important;
        transform: none !important;
        overflow: visible;
        /* CRITICAL: backdrop-filter creates a new containing block for position:fixed
           children in Chrome/Safari, trapping the sidebar-nav inside the 60px header.
           Remove it on mobile to fix hamburger menu. */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        /* Don't clip hamburger or nav */
    }

    .sidebar::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar for Chrome/Safari */
    }

    .sidebar-header {
        padding: 0;
        margin: 0;
        height: 60px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        position: relative;
        background: #0a0a0a !important;
        /* Force solid dark background */
    }

    .sidebar-header .logo img {
        height: 32px;
    }

    .sidebar-header .logo span {
        display: none;
    }

    .dashboard-hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        margin-left: auto;
        margin-right: 15px;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative;
        z-index: 10001;
    }

    .user-profile-sm {
        display: none !important;
        /* Force hide to override dashboard-v2.css */
    }

    .sidebar-nav {
        position: fixed;
        top: 68px;
        left: -100%;
        bottom: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        padding: 20px 20px 30px;
        transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .sidebar-nav.active,
    .sidebar.active .sidebar-nav {
        left: 0;
    }

    .nav-item {
        padding: 15px 20px;
        gap: 15px;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-width: unset;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-item span {
        display: block;
        font-size: 1rem;
        font-weight: 500;
        text-transform: none;
        letter-spacing: normal;
    }

    .nav-item i {
        font-size: 1.2rem;
        width: 24px;
        text-align: center;
    }

    .nav-item.active {
        border-left: 3px solid var(--gold-text);
        border-bottom: none;
        background: linear-gradient(90deg, rgba(255, 211, 105, 0.15) 0%, transparent 100%);
    }

    .nav-item .badge {
        position: static;
        margin-left: auto;
        border: none;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 15px;
        background: #030509 !important;
        color: white !important;
    }

    .main-content * {
        color: white;
    }

    .main-content h1,
    .main-content h2,
    .main-content h3,
    .main-content h4,
    .main-content p,
    .main-content span:not(.gold-text):not(.status-badge) {
        color: white !important;
    }

    .main-content .glass-panel {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 211, 105, 0.15) !important;
    }

    .main-content .btn-gold * {
        color: #030509 !important;
    }

    .main-content .btn-gold {
        background: var(--gold-gradient) !important;
        color: #030509 !important;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 25px;
        padding-top: 25px;
    }

    .content-header h1 {
        font-size: 1.8rem;
    }

    .date-display {
        font-size: 0.85rem;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .admin-actions-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .admin-form-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .order-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-img {
        width: 100px;
        height: 130px;
    }

    .settings-tabs {
        flex-wrap: nowrap;
        margin-bottom: 20px;
        align-items: center;
    }

    /* Move 'Mark all as read' button to bottom if it's the notification tab */
    #notifications .settings-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }

    #mark-all-read-btn {
        margin-left: 0 !important;
        width: 100% !important;
        margin-top: 5px;
        order: 10;
        justify-content: center;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        /* Allow 2 columns on most phones */
        gap: 12px;
    }

    .dashboard-card {
        max-width: 100%;
        margin-bottom: 12px;
        /* Tighter spacing */
        border-radius: 12px;
        margin-left: auto;
        margin-right: auto;
    }

    .card-image-container {
        height: 120px !important;
        /* Reduced further to match narrower width */
        /* Smaller cover for mobile */
    }

    .card-image {
        height: 100% !important;
        width: 100% !important;
        object-fit: contain !important;
        /* Contain is better for book covers to avoid cropping titles */
        background: #000;
    }

    .card-details {
        padding: 12px 15px !important;
    }

    .card-actions {
        gap: 8px !important;
    }

    .btn-dashboard {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
    }

    /* Cart Layout Mobile */
    .cart-layout-grid {
        grid-template-columns: 1fr !important;
    }

    .cart-summary-panel {
        position: relative !important;
        top: 0 !important;
    }

    /* ==========================================================
       CRITICAL: COMPREHENSIVE MOBILE OVERFLOW LOCKDOWN
       Prevents ANY horizontal scrolling / blank right-side space
       ========================================================== */

    /* 1. ROOT LEVEL — lock the entire page to viewport */
    html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        overscroll-behavior-x: none !important;
    }

    body,
    body.dashboard-body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        overscroll-behavior-x: none !important;
        position: relative !important;
    }

    /* 2. MAIN LAYOUT CONTAINERS */
    .dashboard-container {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .main-content {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px 15px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* 3. ALL CONTENT SECTIONS */
    .content-section {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 4. CARDS, PANELS, FORMS — prevent any from growing beyond viewport */
    .content-section .glass-panel,
    .content-section .settings-card,
    .content-section .stat-card,
    .content-section .dashboard-card,
    .content-section .order-card,
    .content-section .settings-grid,
    .content-section .stats-grid,
    .content-section .items-grid,
    .content-section .form-group,
    .content-section .coupon-banner,
    .checkout-summary-panel,
    .cart-summary-panel,
    .premium-summary-card {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* 5. TABLES — let them scroll horizontally INSIDE their container only */
    .content-section table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .content-section .table-responsive {
        overflow-x: auto !important;
        max-width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    /* 6. INPUTS, BUTTONS, IMAGES — never exceed container */
    .content-section input,
    .content-section textarea,
    .content-section select,
    .content-section button,
    .content-section .btn,
    .content-section .btn-gold,
    .content-section .btn-outline {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .content-section img,
    .content-section video,
    .content-section canvas,
    .content-section svg {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 7. CONTENT HEADERS — prevent long titles from pushing width */
    .content-header {
        max-width: 100% !important;
        overflow: hidden !important;
        word-break: break-word !important;
    }

    .content-header h1 {
        font-size: 1.5rem !important;
        word-break: break-word !important;
    }

    /* 8. SIDEBAR — ensure closed sidebar doesn't push page width */
    .sidebar {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .sidebar-nav {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    /* 9. ADMIN CONTROLS — search bar, filters */
    .admin-controls {
        flex-wrap: wrap !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .admin-controls .search-box {
        min-width: 0 !important;
        width: 100% !important;
    }

    .filter-wrapper {
        align-items: flex-start !important;
        width: 100% !important;
    }

    .filter-wrapper select {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* 10. GLOBAL SAFETY NET — absolutely nothing exceeds viewport */
    .dashboard-container *,
    .main-content * {
        max-width: 100vw !important;
        box-sizing: border-box;
    }

    /* 11. PROFILE.HTML SPECIFIC OVERRIDES (Overriding inline styles) */
    #profile-form-v2 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    #profile-form-v2 button {
        width: 100% !important;
        grid-column: span 1 !important;
    }

    /* Reduce padding for all cards on mobile */
    .glass-panel,
    .settings-card,
    .dashboard-card,
    .order-card {
        padding: 15px !important;
    }

    /* Cart Layout in Profile */
    .cart-layout-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Address Modal in Profile */
    #address-modal .resume-modal {
        padding: 20px !important;
        width: 95% !important;
    }

    #address-modal .resume-modal div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Order Details Modal in Profile */
    #order-detail-modal .reader-canvas-container {
        padding-top: 70px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    #order-detail-modal .reader-canvas-container>div {
        max-width: 100% !important;
        padding: 0 !important;
    }

    #order-detail-modal div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Stat Cards alignment in Profile */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .stat-card {
        padding: 12px !important;
    }

    /* Support Section in Profile */
    #support .settings-grid {
        grid-template-columns: 1fr !important;
    }

    /* Library Sub-tabs horizontal scroll fix */
    .library-sub-tabs {
        display: flex !important;
        overflow-x: auto !important;
        padding: 0 5px 10px !important;
        -webkit-overflow-scrolling: touch;
        gap: 8px !important;
        justify-content: flex-start !important;
        margin-bottom: 20px !important;
    }

    /* Fix for "CONTINUE READING" section */
    .dashboard-grid-1 {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Ensure Footer stays contained */
    footer {
        padding: 40px 0 !important;
    }

    footer .container {
        max-width: 100% !important;
        padding: 0 15px !important;
        overflow: hidden !important;
    }

    .footer-content {
        flex-direction: column !important;
        gap: 30px !important;
        text-align: center !important;
    }

    .footer-info,
    .footer-links {
        width: 100% !important;
    }
}

/* --- MODAL SYSTEM V2 --- */
.resume-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000000;
    padding: 20px;
    box-sizing: border-box;
}

.resume-modal-overlay.active {
    display: flex !important;
}

.resume-modal.glass-panel {
    background: #0a0a0b;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.1);
    position: relative;
}

#address-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    color: var(--gold-text);
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: 2px;
}

#address-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-form-row.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.address-type-group {
    display: flex;
    gap: 25px;
    margin: 5px 0;
}

.address-type-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 5px 0;
}

.checkbox-group label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.modal-actions .btn {
    flex: 1;
    padding: 15px !important;
    font-weight: 700;
    font-size: 1rem;
}

/* Mobile Adjustments for Modal */
@media (max-width: 600px) {
    .resume-modal.glass-panel {
        padding: 25px 20px;
        border-radius: 12px;
    }

    #address-modal-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .modal-form-row,
    .modal-form-row.three-col {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modal-actions {
        flex-direction: column;
    }
}

.resume-modal {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid var(--gold-text);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    animation: slideUp 0.4s 0.1s forwards;
}

.resume-modal h3 {
    color: var(--gold-text);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.resume-modal p {
    color: #e0e0e0;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
}

.resume-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-resume {
    background: var(--gold-gradient);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-restart {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-resume:hover {
    transform: scale(1.05);
}

.btn-restart:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

/* --- PROFESSIONAL DASHBOARD EXPANSION STYLES --- */

/* Feature Cards (Dashboard Overview) */
.dashboard-feature-card {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
}

.dashboard-feature-card:hover {
    border-color: var(--gold-text);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.dashboard-feature-card .feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-feature-card .feature-header i {
    font-size: 1.3rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.dashboard-feature-card h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.dashboard-feature-card .feature-content {
    flex: 1;
}

.blue-text {
    color: #4ecdc4;
}

.green-text {
    color: #10b981;
}

.red-text {
    color: #ff6b6b;
}

/* Address Cards */
.address-card {
    position: relative;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px !important;
    background: transparent !important;
    border: 1px solid #111 !important;
    transition: all 0.3s ease;
}

.address-card.default {
    border-color: var(--gold-text) !important;
    background: rgba(255, 211, 105, 0.05) !important;
}

.address-card h5 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--gold-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.default-badge {
    font-size: 0.65rem;
    background: var(--gold-text);
    color: black;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.address-text {
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.7;
    margin-bottom: 12px;
}

.address-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.address-actions button {
    padding: 5px 12px;
    font-size: 0.8rem;
}

/* Notifications */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
}

.notification-item.unread {
    border-left: 4px solid var(--gold-text);
    background: rgba(255, 211, 105, 0.03);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.notification-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-icon.order {
    background: rgba(78, 205, 196, 0.1);
    color: #4ecdc4;
}

.notification-icon.digital {
    background: rgba(255, 211, 105, 0.1);
    color: var(--gold-text);
}

.notification-icon.shipment {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.notification-body {
    flex: 1;
}

.notification-body h5 {
    margin: 0 0 4px;
    font-size: 0.95rem;
}

.notification-body p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.6;
    line-height: 1.4;
}

/* Professional Welcome Message Styling */
.notification-item.welcome-note {
    background: linear-gradient(90deg, rgba(255, 211, 105, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 211, 105, 0.2);
    cursor: default;
}

.notification-item.welcome-note h5 {
    color: var(--gold-text);
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

.notification-icon.system {
    background: rgba(255, 211, 105, 0.15);
    color: var(--gold-text);
    box-shadow: 0 0 15px rgba(255, 211, 105, 0.1);
}

.welcome-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--gold-text);
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255, 211, 105, 0.3));
    animation: goldShine 3s infinite alternate;
}

@keyframes goldShine {
    from { opacity: 0.5; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.1); }
}

.notification-time {
    font-size: 0.75rem;
    opacity: 0.4;
    margin-top: 5px;
    display: block;
}

/* Order Timeline (Vertical for Sidebar-like view) */
.order-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 20px;
}

.order-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-step {
    position: relative;
    padding-bottom: 25px;
    padding-left: 20px;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
    border: 2px solid var(--dark-bg);
    z-index: 1;
}

.timeline-step.completed::before {
    background: var(--gold-text);
    box-shadow: 0 0 8px var(--gold-text);
}

.timeline-step.active::before {
    background: var(--gold-text);
    animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.timeline-step h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.timeline-step p {
    margin: 3px 0 0;
    font-size: 0.75rem;
    opacity: 0.5;
}

/* Dashboard Cards inside Dashboard Tab */
.feature-content h3 {
    margin: 5px 0;
    font-size: 1.2rem;
    color: #fff;
}

.feature-content .status-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.red-badge {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.green-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.gold-badge {
    background: rgba(255, 211, 105, 0.2);
    color: var(--gold-text);
}

/* Utilities */
.btn.small {
    padding: 8px 15px;
    font-size: 0.85rem;
    width: auto;
    white-space: nowrap;
    /* Prevent text wrapping inside small buttons */
}

.badge.red {
    background: #ff4757 !important;
}

.hidden {
    display: none !important;
}

/* ADMIN CONTROL CENTER STYLES */
.toggle-switch {
    width: 44px;
    height: 22px;
    background: #333;
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

.toggle-switch.active {
    background: var(--gold-text);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.toggle-switch.active::after {
    left: 24px;
}

.glass-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    color: white !important;
    outline: none !important;
    width: 100%;
    font-family: inherit;
}

.glass-input:focus {
    border-color: var(--gold-text) !important;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#admin-settings .settings-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Quick Actions Text Correction */
.quick-actions-grid .stat-card,
.quick-actions-grid .stat-card span {
    color: #ffffff !important;
}

/* Admin Responsive Grids (Refactored from Inline) */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Mobile Responsiveness for Admin Panel */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }

    .content-header h1 {
        font-size: 1.4rem;
    }

    .content-header p {
        font-size: 0.8rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-info h3 {
        font-size: 0.75rem;
    }

    .card-title {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        margin-bottom: 4px !important;
    }

    .card-subtitle {
        font-size: 0.7rem !important;
    }

    .card-price {
        font-size: 0.95rem !important;
    }

    .order-title {
        font-size: 0.95rem;
    }

    .order-date,
    .order-id {
        font-size: 0.7rem;
    }

    .admin-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-actions-grid {
        grid-template-columns: 1fr;
    }

    .settings-card {
        padding: 15px !important;
    }

    .settings-header h3 {
        font-size: 1.1rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
        font-size: 0.8rem;
    }

    .btn.small {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {

    .main-content .total span,
    .main-content .total b,
    .main-content .gold-text,
    .main-content h1 .gold-text {
        color: #FFD700 !important;
    }

    .cart-item-card {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 20px 15px !important;
        gap: 15px !important;
    }

    .cart-cover-img {
        width: 100px !important;
        height: 140px !important;
        margin-bottom: 5px;
    }

    .cart-item-info-col {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .cart-item-title-row {
        justify-content: center !important;
    }

    .cart-item-title {
        font-size: 0.95rem !important;
        white-space: normal !important;
        text-align: center;
        line-height: 1.3 !important;
    }

    .cart-price-col {
        align-items: center !important;
        margin-top: 5px !important;
    }

    .cart-qty-ctrl {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        margin: 10px auto !important;
        width: fit-content !important;
    }

    .cart-remove-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 77, 77, 0.7) !important;
    }
}

/* --- FOOTER REMOVAL & LAYOUT FIX --- */
.dashboard-body footer,
.dashboard-body #main-footer,
.dashboard-body .footer-content,
.dashboard-body .footer-bottom {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* --- PARTNER SUPPORT LAYOUT RESPONSIVE --- */
.partner-support-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 25px;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.partner-msg-panel {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

#admin-chat-box.partner-msg-panel {
    padding: 0;
}

/* --- MODERN CHAT APP UI --- */
.chat-app-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #0d1117;
    position: relative;
}

.chat-app-header {
    background: #161b22;
    padding: 12px 20px;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-direction: row !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 5;
}

.chat-user-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-direction: row !important;
    text-align: left !important;
}

.chat-back-btn {
    background: transparent;
    border: none;
    color: var(--gold-text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: none;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 1.2rem;
}

.chat-text-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #fff !important;
}

.chat-text-info p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5) !important;
}

.chat-header-actions {
    display: flex !important;
    gap: 15px !important;
    flex-direction: row !important;
}

.chat-action-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

.chat-action-btn:hover {
    color: var(--gold-text);
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
}

/* Chat Bubbles (WhatsApp Style) */
.chat-messages-container {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 15px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: #0b141a !important; /* WhatsApp Dark Mode Background */
    align-items: stretch !important;
    text-align: left !important;
}

.chat-bubble {
    max-width: 85%;
    padding: 8px 12px 6px;
    border-radius: 8px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 2px;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
    width: fit-content !important;
    display: block !important;
}

.bubble-admin {
    align-self: flex-end !important;
    background: #005c4b !important;
    color: #e9edef !important;
    border-top-right-radius: 0 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Bubble Tail for Admin */
.bubble-admin::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    border: 4px solid transparent;
    border-left: 8px solid #005c4b;
    border-top: 4px solid #005c4b;
}

.bubble-partner {
    align-self: flex-start !important;
    background: #202c33 !important;
    color: #e9edef !important;
    border-top-left-radius: 0 !important;
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* Bubble Tail for Partner */
.bubble-partner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    border: 4px solid transparent;
    border-right: 8px solid #202c33;
    border-top: 4px solid #202c33;
}

.bubble-content {
    word-break: break-word;
}

.bubble-meta {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 4px !important;
    margin-top: 2px !important;
    font-size: 0.65rem !important;
    opacity: 0.6 !important;
    width: 100% !important;
}

.bubble-time {
    color: rgba(255, 255, 255, 0.6) !important;
}

.bubble-status {
    color: #53bdeb !important;
    font-size: 0.75rem !important;
}

/* Chat Footer */
.chat-app-footer {
    background: #161b22;
    padding: 10px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-direction: row !important;
}

.chat-input-row input {
    flex: 1;
    background: #2a3942;
    border: none !important;
    padding: 12px 18px !important;
    border-radius: 25px !important;
    color: #fff !important;
    outline: none;
    font-size: 0.95rem;
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: none;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.msg-summary-card.selected {
    background: rgba(255, 211, 105, 0.1);
    border-color: var(--gold-text) !important;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .partner-support-layout {
        grid-template-columns: 1fr;
        height: calc(100vh - 200px);
        min-height: 500px;
    }

    .partner-support-layout > div:first-child {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .partner-support-layout #admin-chat-box {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--dark-bg);
        z-index: 10;
        display: none !important;
    }

    .partner-support-layout.chat-active #admin-chat-box {
        display: flex !important;
    }

    .partner-support-layout.chat-active > div:first-child {
        display: none;
    }

    .mobile-only {
        display: inline-block !important;
    }
    .chat-back-btn.mobile-only {
        display: block !important;
    }
    .desktop-only {
        display: none !important;
    }
}

/* Ensure no overlap on scrolling */
.dashboard-body .main-content {
    min-height: 100vh;
    padding-bottom: 50px; /* Safe space at bottom */
}