/* TechWave AI - Theme Variables */
:root {
    --primary: #7c6aff;
    --primary-light: #a78bf8;
    --bg: #0b0b18;
    --bg-alt: #0f0f2e;
    --card: #13132a;
    --border: #1f1f3d;
    --text: #e0e0f0;
    --muted: #6b7280;
    --input-bg: #0b0b18;
    --brand-gradient: linear-gradient(135deg, #7c6aff, #a78bf8);
}

/* Light Mode Overrides */
[data-techwave-skin="light"] {
    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --card: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --muted: #64748b;
    --input-bg: #ffffff;
}

body { background: var(--bg); color: var(--text); transition: background 0.3s, color 0.3s; font-family: 'Montserrat', sans-serif; }
.tw-card, .stat-card, .agent-card, .admin-stat, .admin-section, .tw-panel { background: var(--card) !important; border-color: var(--border) !important; }
.tw-input, .tw-select, .tw-textarea, .code-block, #chatInput { background: var(--input-bg) !important; border-color: var(--border) !important; color: var(--text) !important; }
.nav-brand { background: var(--brand-gradient);    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
 }

/* Theme Toggle Button Style */
.theme-toggle {
    background: none; border: 1px solid var(--border); border-radius: 8px;
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text); font-size: 18px; margin: 0 10px;
    transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* TechWave AI - Custom App Styles */

/* Social Login Buttons */
.tw-social-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
.tw-social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.tw-social-item:hover {
    background: var(--bg-alt);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(124,106,255,0.2);
}
.tw-social-item svg {
    width: 20px;
    height: 20px;
}
.tw-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #6b7280;
    font-size: 13px;
}
.tw-auth-divider::before, .tw-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}
.tw-auth-divider::before { margin-right: 15px; }
.tw-auth-divider::after { margin-left: 15px; }

.tw-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: 20px 0;
}
.tw-divider::before, .tw-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}
.tw-divider:not(:empty)::before { margin-right: 15px; }
.tw-divider:not(:empty)::after { margin-left: 15px; }

.tw-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.tw-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}
.tw-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* Additional styles on top of TechWave template */
.tw-page-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    margin: 20px;
    color: var(--text);
}

.tw-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
}

/* Better scrollbar for the whole app */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a4a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a5a; }

/* Flash message override */
.tw-flash {
    margin: 16px 28px;
    padding: 13px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive tables */
.tw-table-wrap { overflow-x: auto; }
.tw-table { width: 100%; border-collapse: collapse; }
.tw-table th { text-align:left; padding:12px 16px; color:var(--muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; border-bottom:1px solid var(--border); }
.tw-table td { padding:14px 16px; border-bottom:1px solid var(--border); font-size:14px; color:var(--text); }
.tw-table tr:hover td { background:var(--bg-alt); }

/* Loading state */
.tw-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
