:root {
    --bg-dark: #0f111a;
    --bg-card: rgba(25, 27, 36, 0.7);
    --bg-card-header: rgba(30, 33, 44, 0.9);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #64748b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --success: #10b981;
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
}

.bg-dark-glass {
    background-color: var(--bg-card) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border) !important;
}

.bg-dark-glass-header {
    background-color: var(--bg-card-header) !important;
    border-bottom: var(--glass-border) !important;
}

.card {
    border-radius: 16px;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.form-control, .form-select {
    background-color: rgba(15, 17, 26, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    border-color: var(--primary) !important;
}

.login-container {
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100vw 100vh" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="%230f111a"/><circle cx="50%" cy="50%" r="40%" fill="%236366f1" opacity="0.03" filter="blur(80px)"/></svg>') center/cover no-repeat;
}

.login-card {
    background: rgba(25, 27, 36, 0.8) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
}

/* Chat Styles */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
    animation: fadeIn 0.3s ease;
}

.message.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
    text-align: right;
}

/* Status Indicator */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 8px;
    box-shadow: 0 0 5px currentColor;
}

.status-indicator.online {
    background-color: var(--success);
    color: var(--success);
}

.status-indicator.offline {
    background-color: var(--secondary);
    color: var(--secondary);
}

/* List Items */
.list-group-item {
    transition: all 0.2s ease;
}

.list-group-item:hover, .list-group-item.active-chat {
    background-color: rgba(255, 255, 255, 0.05) !important;
    cursor: pointer;
}

.list-group-item.active-chat {
    border-left: 4px solid var(--primary);
}

.stats-card {
    transition: transform 0.3s ease;
}
.stats-card:hover {
    transform: translateY(-5px);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.custom-table th {
    background-color: rgba(30, 33, 44, 0.9);
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.custom-table td {
    background-color: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
