/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.dashboard {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #3498db;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 2rem;
}

.nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav ul li a:hover,
.nav ul li a.active {
    color: #3498db;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 10px;
    padding: 3rem;
    color: white;
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.welcome-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Button Styles */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.primary-btn {
    background-color: #2ecc71;
    color: white;
}

.primary-btn:hover {
    background-color: #27ae60;
}

.secondary-btn {
    background-color: #e74c3c;
    color: white;
}

.secondary-btn:hover {
    background-color: #c0392b;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-card h3 {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
}

/* Room Status Section */
.room-status {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #333;
    margin: 0;
}

.status-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.summary-item {
    background-color: #f9f9f9;
    padding: 0.8rem 1.2rem;
    border-radius: 5px;
    display: flex;
    gap: 0.5rem;
}

.summary-item span:first-child {
    font-weight: 500;
    color: #555;
}

.summary-item span:last-child {
    font-weight: 700;
    color: #3498db;
}

/* Recent Calls Section */
.recent-calls {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.recent-calls h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f9f9f9;
    font-weight: 500;
    color: #555;
}

table tr:hover {
    background-color: #f5f7fa;
}

/* Expandable rows */
.expandable-row {
    cursor: pointer;
    position: relative;
}

.expandable-row:after {
    content: '\25BC';
    font-size: 0.8rem;
    color: #999;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.expandable-row:hover:after {
    color: #3498db;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

/* Room details modal */
.room-info {
    margin-bottom: 2rem;
}

.room-status-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.room-status-info p {
    margin: 0;
}

.participants-table {
    margin-top: 1.5rem;
    width: 100%;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: #2ecc71;
    color: white;
}

.status-badge.completed {
    background-color: #3498db;
    color: white;
}

.status-badge.cancelled {
    background-color: #e74c3c;
    color: white;
}

.status-badge.connected {
    background-color: #2ecc71;
    color: white;
}

.text-center {
    text-align: center;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background-color: #27ae60;
    color: white;
}

.badge-secondary {
    background-color: #95a5a6;
    color: white;
}

.text-muted {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Small Button */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Toast Notification Styles */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(400px);
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    border-bottom: 1px solid #eee;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-title {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: #333;
}

.toast-body {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #555;
}

.toast-success .toast-header {
    background-color: #d4edda;
    color: #155724;
    border-bottom-color: #c3e6cb;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error .toast-header {
    background-color: #f8d7da;
    color: #721c24;
    border-bottom-color: #f5c6cb;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-warning .toast-header {
    background-color: #fff3cd;
    color: #856404;
    border-bottom-color: #ffeaa7;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-info .toast-header {
    background-color: #d1ecf1;
    color: #0c5460;
    border-bottom-color: #bee5eb;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

/* Room Details Modal Specific Styles */
.room-details-modal {
    max-height: 90vh;
    overflow-y: auto;
}

.room-details-modal .participants-table {
    margin-top: 1rem;
}

.room-details-modal .participants-table th {
    background-color: #f5f7fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.room-details-modal .participants-table td {
    vertical-align: middle;
}

.room-details-modal .rename-participant-btn {
    white-space: nowrap;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 1rem;
    }

    .nav ul {
        margin-top: 1rem;
    }

    .nav ul li {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .welcome-section {
        padding: 2rem;
    }

    .welcome-section h2 {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}