/* ============================================ */
/* QEX SOLVER - LEGENDARY ROYAL EDITION      */
/* ROYAL COLORS · QEX-CAP API KEYS            */
/* GOLD & PURPLE · COUPON SYSTEM              */
/* ============================================ */

:root {
    --primary: #0066cc;
    --primary-dark: #004a99;
    --primary-light: #3385d6;
    --secondary: #0052a3;
    --accent: #66b3ff;
    --gold: #1a1a1a;
    --gold-light: #333333;
    --gold-dark: #000000;
    --royal-purple: #003d7a;
    --bg: #ffffff;
    --bg-alt: #f5f5f5;
    --text: #1a1a1a;
    --text-light: #4d4d4d;
    --border: #cccccc;
    --card-bg: #ffffff;
    --success: #00a86b;
    --error: #ff4d4d;
    --warning: #ffaa33;
    --shadow-sm: 0 8px 20px rgba(0,102,204,0.1);
    --shadow-md: 0 12px 30px rgba(0,102,204,0.15);
    --shadow-lg: 0 20px 40px rgba(0,102,204,0.2);
    --shadow-gold: 0 10px 25px rgba(26,26,26,0.15);
    --gradient-purple: linear-gradient(135deg, #0066cc, #004a99);
    --gradient-gold: linear-gradient(135deg, #1a1a1a, #333333);
    --gradient-royal: linear-gradient(145deg, #f5f5f5, #ffffff);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-ar: 'Cairo', 'Tajawal', sans-serif;
    
    /* Chat specific colors */
    --chat-user-bg: linear-gradient(135deg, #0066cc, #3385d6);
    --chat-admin-bg: #f0f0f0;
    --chat-text: #1a1a1a;
    --chat-timestamp: rgba(0,0,0,0.5);
    --chat-widget-bg: rgba(255,255,255,0.95);
    --chat-widget-border: rgba(0,102,204,0.2);
    --chat-header-bg: linear-gradient(135deg, #0066cc, #3385d6);
    --chat-shadow: 0 20px 40px rgba(112,48,192,0.2);
}

[data-theme="dark"] {
    --primary: #3385d6;
    --primary-dark: #0052a3;
    --primary-light: #66b3ff;
    --bg: #0a0a0a;
    --bg-alt: #1a1a1a;
    --text: #ffffff;
    --text-light: #cccccc;
    --border: #333333;
    --card-bg: #1a1a1a;
    --gradient-royal: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    --chat-user-bg: linear-gradient(135deg, #0066cc, #3385d6);
    --chat-admin-bg: #1a1a1a;
    --chat-text: #ffffff;
    --chat-timestamp: rgba(255,255,255,0.5);
    --chat-widget-bg: rgba(26,26,26,0.95);
    --chat-widget-border: rgba(0,102,204,0.2);
    --chat-header-bg: linear-gradient(135deg, #0066cc, #3385d6);
    --chat-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-alt);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(transparent, rgba(112,48,192,0.03));
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "👑";
    position: fixed;
    bottom: 20px;
    right: 30px;
    font-size: 48px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

body[dir="rtl"] {
    font-family: var(--font-ar);
    text-align: right;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

/* Main content container after navbar */
nav.navbar + .container {
    padding-top: 0;
}

.glass-card {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .glass-card {
    background: rgba(42,26,58,0.7);
    border-color: rgba(255,255,255,0.1);
}

/* ======== LUXURY NAVBAR ======== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5rem;
    height: 72px;
    background: rgba(0, 18, 51, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(102, 179, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 0;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 8px 32px rgba(0,0,0,0.35);
}

[data-theme="dark"] .navbar {
    background: rgba(0, 10, 30, 0.98);
    border-bottom: 1px solid rgba(102, 179, 255, 0.1);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 32px rgba(0,0,0,0.5);
}

/* Thin accent line at top of navbar */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0066cc, #66b3ff, #0066cc, transparent);
    opacity: 0.8;
}

.logo {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.logo-icon-wrap {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #0066cc, #3385d6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,102,204,0.4);
}

.logo i {
    color: white;
    font-size: 1.1rem;
}

.logo-text {
    font-weight: 800;
    color: white;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.logo-badge {
    font-size: 0.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0066cc, #66b3ff);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: 2px;
    align-self: flex-start;
    margin-top: 4px;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    letter-spacing: 0.2px;
}

.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

.nav-link.active-link {
    color: white;
    background: rgba(0,102,204,0.25);
}

.nav-link::after {
    content: none;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: space-between;
    margin: 0 2rem;
}

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

/* Auth buttons in navbar */
.navbar .btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.9);
    padding: 0.45rem 1.1rem;
    font-size: 0.88rem;
    border-radius: 8px;
}

.navbar .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
    color: white;
    transform: none;
    box-shadow: none;
}

.navbar .btn-primary {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    padding: 0.45rem 1.2rem;
    font-size: 0.88rem;
    border-radius: 8px;
    border: 1px solid rgba(102,179,255,0.2);
    box-shadow: 0 2px 8px rgba(0,102,204,0.3);
}

.navbar .btn-primary:hover {
    background: linear-gradient(135deg, #0077ee, #0066cc);
    box-shadow: 0 4px 16px rgba(0,102,204,0.4);
    transform: translateY(-1px);
}

/* ======== LUXURY LANGUAGE SWITCHER ======== */
.lang-switcher {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 7px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lang-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.lang-btn.active {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    box-shadow: 0 2px 8px rgba(0,102,204,0.35);
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-code {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ======== THEME TOGGLE ======== */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.12);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    border-radius: 40px;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.95rem;
    border: 1px solid var(--border);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc, #004a99);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #004a99, #0066cc);
    box-shadow: 0 10px 25px rgba(0,102,204,0.3);
}

.btn-gold {
    background: linear-gradient(135deg, #1a1a1a, #333333);
    color: white;
    border: none;
    font-weight: 700;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #333333, #1a1a1a);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    color: white;
}

.btn-outline {
    background: rgba(255,255,255,0.2);
    border: 1px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: #0066cc;
    border-color: white;
}

.btn-glass {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--text);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-purple);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-gold {
    border: 2px solid var(--gold);
    background: linear-gradient(145deg, var(--card-bg), rgba(255,215,0,0.05));
}

.card-gold::before {
    background: var(--gradient-gold);
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
    margin-top: 0.25rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(112,48,192,0.1);
}

.form-input-gold {
    border: 2px solid var(--gold);
}

.form-input-gold:focus {
    box-shadow: 0 0 0 3px rgba(255,215,0,0.2);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s;
}

.pricing-card.popular {
    border: 2px solid var(--gold);
    background: linear-gradient(145deg, var(--card-bg), rgba(255,215,0,0.05));
}

[data-theme="dark"] .pricing-card.popular {
    background: linear-gradient(145deg, #2a1a3a, #1a1a2a);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-gold);
    color: black;
    padding: 0.35rem 1.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-gold);
}

.pricing-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.pricing-price {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.pricing-price small {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
}

.pricing-egp {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--bg-alt);
}

.sidebar {
    width: 280px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 2rem;
    position: fixed;
    height: 100vh;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
}

.main {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    max-width: 500px;
    width: 90%;
    background: var(--card-bg);
    border-radius: 32px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--gold);
}

.city-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-purple);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}



.copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

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

.copy-btn i {
    font-size: 0.8rem;
}

/* ========== COUPON SECTION ========== */
.coupon-section {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(145deg, var(--card-bg), rgba(255,215,0,0.03));
    border: 2px solid var(--gold);
    border-radius: 24px;
    box-shadow: var(--shadow-gold);
    position: relative;
    overflow: hidden;
}

.coupon-section::before {
    content: "🎫";
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 120px;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.coupon-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255,215,0,0.3);
}

.coupon-title i {
    font-size: 2rem;
}

.coupon-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.coupon-input-group input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--gold);
    border-radius: 50px;
    background: var(--bg);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.coupon-input-group input:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.2);
}

.coupon-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 16px;
    font-weight: 500;
}

.coupon-message.success {
    background: rgba(0,168,107,0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.coupon-message.error {
    background: rgba(255,77,77,0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

/* ========== PROFESSIONAL CHAT WIDGET ========== */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: var(--chat-widget-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--chat-widget-border);
    border-radius: 24px;
    box-shadow: var(--chat-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget.minimized {
    height: 60px;
    width: 60px;
    border-radius: 30px;
    cursor: pointer;
    background: var(--chat-header-bg);
    box-shadow: var(--shadow-lg);
}

.chat-widget.minimized .chat-header {
    padding: 0;
    justify-content: center;
    height: 60px;
}

.chat-widget.minimized .chat-header h3 {
    display: none;
}

.chat-widget.minimized .chat-header i {
    font-size: 1.8rem;
    color: white;
}

.chat-header {
    background: var(--chat-header-bg);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.chat-header i {
    font-size: 1.2rem;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    word-break: break-word;
    position: relative;
    animation: fadeIn 0.2s ease-out;
}

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

.message.user {
    align-self: flex-end;
    background: var(--chat-user-bg);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.admin {
    align-self: flex-start;
    background: var(--chat-admin-bg);
    color: var(--chat-text);
    border-bottom-left-radius: 4px;
}

.message img {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.message img:hover {
    transform: scale(1.02);
}

.message .timestamp {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    text-align: right;
    color: var(--chat-timestamp);
}

.message.user .timestamp {
    color: rgba(255,255,255,0.7);
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg);
}

.chat-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-input-area input[type="text"] {
    flex: 1;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 40px;
    background: var(--bg-alt);
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.chat-input-area input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(112,48,192,0.1);
}

.chat-action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.chat-send-btn {
    padding: 0.85rem 1.5rem;
    background: var(--gradient-purple);
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(112,48,192,0.3);
}

/* Emoji Picker */
.emoji-picker {
    display: none;
    position: absolute;
    bottom: 100px;
    right: 20px;
    z-index: 1001;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    width: 300px;
    height: 350px;
    overflow: hidden;
}

.emoji-picker.show {
    display: block;
}

/* ========== ADMIN CHAT DASHBOARD ========== */
.chat-dashboard {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 200px);
    background: var(--bg);
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.chat-conversation-list {
    border-right: 1px solid var(--border);
    background: var(--bg-alt);
    overflow-y: auto;
    padding: 1rem;
}

.chat-conversation-item {
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.chat-conversation-item:hover {
    background: var(--bg);
    border-color: var(--border);
}

.chat-conversation-item.active {
    background: var(--bg);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.chat-conversation-item .user-name {
    font-weight: 600;
    color: var(--text);
}

.chat-conversation-item .user-email {
    font-size: 0.8rem;
    color: var(--text-light);
}

.chat-conversation-item .timestamp {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.chat-messages-area {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--bg);
}

.chat-reply-area {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-reply-area input {
    flex: 1;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 40px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
}

.chat-reply-area input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(112,48,192,0.1);
}

/* ========== ADMIN COUPON MANAGEMENT ========== */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.coupon-card {
    background: linear-gradient(145deg, var(--card-bg), rgba(255,215,0,0.05));
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.coupon-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.coupon-card::before {
    content: "🎟️";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 60px;
    opacity: 0.1;
    transform: rotate(15deg);
}

.coupon-code {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255,215,0,0.3);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.coupon-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.coupon-stats {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ========== API DOCUMENTATION PAGE ========== */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.docs-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.3s;
}

.docs-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.docs-card h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.5rem;
}

.docs-card pre {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow-x: auto;
    margin: 1rem 0;
}

.docs-card code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary);
}

@media (max-width: 1024px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .main {
        margin-left: 0;
    }
    .chat-dashboard {
        grid-template-columns: 1fr;
        height: auto;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
        height: auto;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    .nav-container {
        width: 100%;
        margin: 0;
        flex-direction: column;
        gap: 0.5rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    .nav-actions {
        justify-content: center;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .chat-widget {
        width: 320px;
        height: 480px;
        right: 10px;
        bottom: 10px;
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse-gold {
    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); }
}

.pulse-gold {
    animation: pulse-gold 2s infinite;
}

.text-gradient {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gold {
    color: var(--gold);
}

.bg-gold {
    background: var(--gold);
}

.border-gold {
    border-color: var(--gold);
}

.w-full { width: 100%; }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.p-4 { padding: 2rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.error-message {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}
.error-message.show {
    display: block;
}
