* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --sidebar: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #2563eb;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* AUTH PAGES */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-box {
    background: var(--card);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
}

.auth-logo p {
    color: var(--text-light);
    font-size: 14px;
}

/* FORMS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    background: #f8fafc;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

/* BUTTONS */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* ALERTS */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fffbeb;
    color: var(--warning);
    border: 1px solid #fde68a;
}

/* DASHBOARD LAYOUT */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--sidebar);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid #334155;
    margin-bottom: 20px;
}

.sidebar-logo h2 {
    color: white;
    font-size: 20px;
}

.sidebar-logo p {
    color: var(--sidebar-text);
    font-size: 12px;
    margin-top: 4px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(37,99,235,0.2);
    color: white;
    border-left: 3px solid var(--sidebar-active);
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
}

/* CARDS */
.card {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

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

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

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

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

.table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.table tr:hover td {
    background: #f8fafc;
}

/* STATUS BADGES */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: var(--success);
}

.badge-danger {
    background: #fef2f2;
    color: var(--danger);
}

.badge-warning {
    background: #fffbeb;
    color: var(--warning);
}

/* STATS CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

/* CALL PANEL */
.call-panel {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    color: white;
}

.caller-info {
    margin: 20px 0;
}

.caller-id {
    font-size: 36px;
    font-weight: 700;
    color: #60a5fa;
}

.caller-status {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 8px;
}

.call-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.call-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.call-btn:hover {
    transform: scale(1.08);
}

.call-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
}

.btn-answer {
    background: #16a34a;
    color: white;
}

.btn-decline {
    background: #dc2626;
    color: white;
}

.btn-mute {
    background: #d97706;
    color: white;
}

.btn-transfer {
    background: #2563eb;
    color: white;
}

.btn-hangup {
    background: #dc2626;
    color: white;
}

/* TRANSFER PANEL */
.transfer-panel {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}

.transfer-panel.active {
    display: block;
}

/* TOP BAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.topbar h1 {
    font-size: 24px;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* QR CODE PAGE */
.qr-container {
    text-align: center;
    padding: 20px;
}

.qr-container img {
    border: 8px solid white;
    border-radius: 8px;
    margin: 20px 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .main-content {
        margin-left: 0;
    }
    .call-controls {
        gap: 12px;
    }
}
