/* styles.css - VeriBot WhatsApp Dark Glassmorphic Design System */

:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.75);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --primary: #38bdf8;
    --primary-hover: #0284c7;
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.15);
    --warning: #f59e0b;
    --accent: #a855f7;
    --danger: #ef4444;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.12) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Navbar */
.navbar {
    height: 70px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-title span {
    color: var(--success);
}

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

.header-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-badge.online {
    background: var(--success-bg);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

/* App Container Layout */
.app-container {
    display: flex;
    flex: 1;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    gap: 1.5rem;
}

/* Sidebar Navigation */
.sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.nav-btn i {
    font-size: 1.1rem;
    width: 20px;
}

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

.nav-btn.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar-footer {
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

/* Content Area & Glass Cards */
.content-area {
    flex: 1;
}

.tab-pane {
    display: none;
}

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

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

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 1.8rem;
}

.card-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 0.7rem 1.3rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary { background: var(--primary); color: #0f172a; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: rgba(255,255,255,0.15); }

.btn-success { background: var(--success); color: #0f172a; }
.btn-success:hover { background: #16a34a; }

.btn-warning { background: var(--warning); color: #0f172a; }
.btn-accent { background: var(--accent); color: white; }

/* QR Display */
.qr-display-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: center;
}

.qr-box {
    background: #0f172a;
    border: 2px dashed rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-box img {
    max-width: 100%;
    border-radius: 10px;
    background: white;
    padding: 10px;
}

.qr-instructions h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.qr-instructions ol {
    margin-left: 1.2rem;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 0.92rem;
}

.info-alert {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--primary);
}

/* Forms & Tables */
.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.custom-table th, .custom-table td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.custom-table th {
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-muted);
    font-weight: 600;
}

.custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: #1e293b;
    color: var(--text-main);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.toast.show { display: block; animation: slideUp 0.3s ease; }
.toast.hidden { display: none; }

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

.code-box {
    background: #0f172a;
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    color: #38bdf8;
    font-family: monospace;
    font-size: 0.88rem;
    white-space: pre-wrap;
    border: 1px solid var(--border-color);
}
