/* ==========================================
   Call Center Admin Panel - Styles
   ========================================== */

:root {
    --sidebar-width: 250px;
    --header-height: 60px;
    --primary-color: #4a90d9;
    --sidebar-bg: #1a1f2e;
    --sidebar-text: #a0aec0;
    --sidebar-active: #4a90d9;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f7fb;
    margin: 0;
    padding: 0;
}

/* ==========================================
   Login Page
   ========================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 4rem;
    color: var(--primary-color);
}

.login-header h2 {
    margin: 0.5rem 0 0.25rem;
    color: #1a1f2e;
}

.login-header p {
    color: #6c757d;
    margin: 0;
}

/* ==========================================
   Sidebar
   ========================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.sidebar-header span {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

.sidebar .nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar .nav-link.active {
    background: rgba(74, 144, 217, 0.1);
    color: var(--sidebar-active);
    border-left-color: var(--sidebar-active);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 24px;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info i {
    font-size: 1.25rem;
}

/* ==========================================
   Main Content
   ========================================== */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.content-header {
    height: var(--header-height);
    background: white;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.content-header h1 {
    font-size: 1.5rem;
    margin: 0;
    flex: 1;
}

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

.page-content {
    padding: 1.5rem;
}

/* ==========================================
   Stats Cards
   ========================================== */

.stat-card {
    border-radius: 0.75rem;
    padding: 1.25rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.5rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* ==========================================
   Cards
   ========================================== */

.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================
   Live Calls
   ========================================== */

.live-calls-list, .recent-calls-list {
    max-height: 300px;
    overflow-y: auto;
}

.call-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.call-item .call-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.call-item .call-icon.inbound {
    background: #28a745;
}

.call-item .call-icon.outbound {
    background: #17a2b8;
}

.call-item .call-info {
    flex: 1;
}

.call-item .call-number {
    font-weight: 600;
}

.call-item .call-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.call-item .call-duration {
    font-family: monospace;
    font-size: 0.9rem;
    color: #495057;
}

/* ==========================================
   Tables
   ========================================== */

.table th {
    font-weight: 600;
    font-size: 0.875rem;
    color: #6c757d;
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
}

/* ==========================================
   Queue Cards
   ========================================== */

.queue-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.queue-card .queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.queue-card .queue-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.queue-card .queue-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.queue-card .queue-stat {
    text-align: center;
}

.queue-card .queue-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.queue-card .queue-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
}

.queue-card .queue-members {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.queue-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.queue-member .member-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.queue-member .member-status.available {
    background: #28a745;
}

.queue-member .member-status.busy {
    background: #dc3545;
}

.queue-member .member-status.paused {
    background: #ffc107;
}

/* ==========================================
   Trunk Cards
   ========================================== */

.trunk-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.trunk-card .trunk-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.trunk-card .trunk-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.trunk-card .trunk-provider {
    font-size: 0.875rem;
    color: #6c757d;
}

.trunk-card .trunk-details {
    font-size: 0.875rem;
    color: #495057;
}

/* ==========================================
   Page Panels
   ========================================== */

.page-panel {
    display: none;
}

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

/* ==========================================
   Toast Notifications
   ========================================== */

.toast {
    background: white;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    #toggle-sidebar {
        display: block !important;
    }
}

@media (min-width: 992px) {
    #toggle-sidebar {
        display: none !important;
    }
}

/* ==========================================
   Utilities
   ========================================== */

.admin-only {
    display: none;
}

.is-admin .admin-only {
    display: block;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}
