:root {
    --bg-dark: #070b13;
    --card-bg: rgba(13, 20, 38, 0.45);
    --card-border: rgba(255, 255, 255, 0.07);
    --card-border-focus: rgba(59, 130, 246, 0.5);
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --primary-hover: #2563eb;
    
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.3);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --system-msg: rgba(30, 41, 59, 0.6);
    --user-msg: linear-gradient(135deg, #1e3a8a, #3b82f6);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}


/* BACKGROUND BLOB EFFECTS */
.background-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08), transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08), transparent 40%);
    z-index: -2;
    overflow: hidden;
}


.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.3;
    animation: blob-pulse 12s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 450px;
    height: 450px;
    background: var(--accent);
    bottom: -150px;
    right: -150px;
    animation-delay: 2s;
}

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

/* LOGIN OVERLAY AND CARD */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 8, 16, 0.85);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    animation: scaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.logo-circle svg {
    color: white;
    width: 32px;
    height: 32px;
}

.login-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.02em;
}

.input-group input, .input-group textarea, .input-group select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.input-group input:focus, .input-group textarea:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    background: rgba(0, 0, 0, 0.45);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.auth-toggle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.auth-toggle a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-toggle a:hover {
    color: #60a5fa;
}

/* APP MAIN CONTAINER */
.app-container {
    width: 95vw;
    max-width: 1250px;
    height: 90vh;
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

/* SIDEBAR STYLING */
.app-sidebar {
    width: 260px;
    background: rgba(7, 11, 20, 0.7);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.brand-icon svg {
    width: 20px;
    height: 20px;
}

.brand-text h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 14px 18px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.nav-item svg {
    opacity: 0.7;
    transition: transform 0.2s;
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.nav-item:hover svg {
    transform: translateX(2px);
}

.nav-item.active {
    color: white;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.1);
}

.nav-item.active svg {
    color: var(--primary);
    opacity: 1;
}

.sidebar-user {
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    color: var(--danger);
}

/* VIEWPORT & HEADER */
.view-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.view-viewport > .app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--card-border);
    background: rgba(7, 11, 20, 0.4);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.header-left h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.status-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
}

/* TABS WRAPPER */
.tabs-content-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.tab-pane {
    display: none;
    height: 100%;
    width: 100%;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

/* TAB 1: CHAT WRAPPER */
.chat-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.message {
    max-width: 80%;
    padding: 16px 20px;
    border-radius: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    animation: message-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes message-slide {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.system-message {
    align-self: flex-start;
    background: var(--system-msg);
    border: 1px solid var(--card-border);
    border-bottom-left-radius: 4px;
}

.user-message {
    align-self: flex-end;
    background: var(--user-msg);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.message h3, .message h4 {
    font-family: var(--font-heading);
    margin-bottom: 8px;
    font-weight: 600;
}

.message p {
    margin-bottom: 10px;
}

.message p:last-child {
    margin-bottom: 0;
}

.message ul, .message ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.message li {
    margin-bottom: 4px;
}

.message code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.message img {
    max-width: 100%;
    max-height: 350px;
    border-radius: 12px;
    margin-top: 10px;
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: transform 0.2s;
}

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

.chat-input-area {
    padding: 20px 30px;
    background: rgba(7, 11, 20, 0.4);
    border-top: 1px solid var(--card-border);
}

.chat-input-form {
    display: flex;
    gap: 12px;
}

.attach-btn, .send-btn {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.attach-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
}

.attach-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.3);
}

.send-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
}

.send-btn:active {
    transform: translateY(0);
}

#user-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 15px 22px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s;
}

#user-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* TYPING INDICATOR */
.typing-indicator {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 14px 20px;
    background: var(--system-msg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-items: center;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* PREVIEW CONTAINER */
.attachment-preview-container {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.attachment-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-icon {
    width: 32px;
    height: 32px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    font-size: 1.1rem;
}

.preview-filename {
    font-size: 0.85rem;
    color: #e2e8f0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-attachment-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
}

.remove-attachment-btn:hover {
    color: var(--danger);
}

/* TAB 2: SUPPORT WRAPPER */
.support-wrapper {
    height: 100%;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    padding: 30px;
    overflow-y: auto;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.glass-card.full-height {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    border-radius: 10px;
    padding: 10px 16px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.standard-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.4;
}

.tickets-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 6px;
}

.tickets-list::-webkit-scrollbar {
    width: 4px;
}

.tickets-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.ticket-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 16px;
    transition: all 0.2s;
}

.ticket-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ticket-protocol {
    font-family: monospace;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
}

.ticket-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-pendente {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-respondido {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-em_analise {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.ticket-body {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 12px;
}

.ticket-response {
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--primary);
    padding: 10px 14px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.ticket-response strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* TAB 3: DASHBOARD WRAPPER */
.dashboard-wrapper {
    padding: 30px;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.faq-icon { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); }
.faq-icon svg { color: var(--success); }
.gemini-icon { background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(139, 92, 246, 0.3); }
.gemini-icon svg { color: var(--accent); }
.support-icon { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); }
.support-icon svg { color: var(--warning); }
.economy-icon { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); }
.economy-icon svg { color: var(--primary); }

.stat-info h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dashboard-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.diagnostic-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

.diag-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.diag-item:last-child {
    border-bottom: none;
}

.diag-label {
    color: var(--text-muted);
}

.diag-val {
    font-weight: 600;
}

.diag-ok { color: var(--success); }
.diag-warn { color: var(--warning); }

.chart-mock {
    margin: 20px 0;
}

.chart-bar-container {
    margin-bottom: 14px;
}

.chart-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.bar {
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.bar-free {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.bar-paid {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

.economy-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* TAB 4: MASTER PANEL WRAPPER */
.admin-wrapper {
    padding: 30px;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    height: 100%;
    overflow-y: auto;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 16px;
}

.admin-main {
    height: 100%;
}

.unanswered-queue {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 15px;
    overflow-y: auto;
    max-height: 500px;
}

.unanswered-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.unanswered-content {
    flex: 1;
}

.unanswered-question {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.unanswered-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* MODAL STYLING */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 8, 16, 0.8);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
}

.close-modal-btn:hover {
    color: var(--text-main);
}

.ticket-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.ticket-user-message {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.modal-footer-btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* MOBILE NAV BAR (HIDDEN BY DEFAULT) */
.mobile-nav {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(7, 11, 20, 0.9);
    border-top: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    justify-content: space-around;
    padding: 10px 0;
    z-index: 100;
}

.mobile-nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-family: var(--font-heading);
    cursor: pointer;
    flex: 1;
}

.mobile-nav-item svg {
    opacity: 0.8;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active svg {
    color: var(--primary);
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    .app-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .app-sidebar {
        display: none; /* Hide desktop sidebar */
    }
    
    .sidebar-toggle {
        display: block; /* Show hamburger button */
    }
    
    .mobile-nav {
        display: flex; /* Show mobile bottom nav */
    }
    
    .view-viewport {
        padding-bottom: 60px; /* Space for bottom nav */
    }
    
    .view-viewport > .app-header {
        padding: 12px 16px;
    }
    
    .chat-messages {
        padding: 16px;
        gap: 16px;
    }
    
    .chat-input-area {
        padding: 12px 16px;
    }
    
    .support-wrapper {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
        overflow-y: auto;
    }
    
    .support-list-container {
        max-height: 400px;
    }
    
    .admin-wrapper {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
        overflow-y: auto;
    }
    
    .admin-sidebar {
        max-height: none;
    }
    
    .dashboard-details {
        grid-template-columns: 1fr;
    }
}


/* WHATSAPP CONNECTION BADGES & STYLING */
.whatsapp-status-wrapper {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-loading {
    background-color: #3b82f6;
    color: white;
}

.badge-connected {
    background-color: var(--success);
    color: white;
}

.badge-disconnected {
    background-color: var(--danger);
    color: white;
}

.badge-qr {
    background-color: var(--warning);
    color: black;
}

.qr-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: #dc2626;
}

