        :root {
            --primary-color: #2c3e50; /* Dark Navy */
            --accent-color: #3498db; /* Blue */
            --success-color: #27ae60; /* Green */
            --danger-color: #c0392b; /* Red */
            --bg-color: #f4f7f6;
            --sidebar-width: 250px;
            --header-height: 70px;
            --text-color: #333;
            --header-bg: white;
            --card-bg: white;
            --text-main: #333;
            --text-muted: #7f8c8d;
            --border-color: #eee;
            --th-bg: #f8f9fa;
            --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        [data-theme="dark"] {
            --primary-color: #34495e;
            --bg-color: #121212;
            --header-bg: #1e1e1e;
            --card-bg: #1e1e1e;
            --text-main: #ecf0f1;
            --text-muted: #bdc3c7;
            --border-color: #333;
            --th-bg: #252525;
            --text-color: #ecf0f1;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: var(--font-family);
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-main);
            display: flex;
            height: 100vh;
            overflow: hidden;
        }

        /* --- Sidebar --- */
        .sidebar {
            width: var(--sidebar-width);
            background-color: var(--primary-color);
            color: white;
            display: flex;
            flex-direction: column;
            padding-top: 20px;
            transition: 0.3s;
            overflow-y: auto;
        }

        /* Sidebar Scrollbar */
        .sidebar::-webkit-scrollbar {
            width: 6px;
        }
        .sidebar::-webkit-scrollbar-track {
            background: transparent;
        }
        .sidebar::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
        }
        .sidebar::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .brand {
            font-size: 1.5rem;
            font-weight: bold;
            text-align: center;
            margin-bottom: 20px;
            letter-spacing: 1px;
        }

        .nav-item {
            padding: 15px 25px;
            cursor: pointer;
            transition: 0.2s;
            display: flex;
            align-items: center;
            color: #bdc3c7;
            text-decoration: none;
        }

        .nav-item i {
            margin-right: 15px;
            width: 20px;
            text-align: center;
        }

        .nav-item:hover, .nav-item.active {
            background-color: rgba(255,255,255,0.1);
            color: white;
            border-left: 4px solid var(--accent-color);
        }

        /* --- Collapsed Sidebar State --- */
        .sidebar.collapsed {
            width: 80px;
        }
        .sidebar.collapsed .brand {
            font-size: 0;
            margin-bottom: 20px;
        }
        .sidebar.collapsed .brand::after {
            content: 'SIH'; /* Initials */
            font-size: 1.2rem;
            font-weight: bold;
            color: white;
        }
        .sidebar.collapsed .nav-item {
            justify-content: center;
            font-size: 0;
            padding: 15px 0;
        }
        .sidebar.collapsed .nav-item i {
            margin-right: 0;
            font-size: 1.2rem;
        }
        .sidebar.collapsed .sidebar-profile h4,
        .sidebar.collapsed .sidebar-profile p,
        .sidebar.collapsed .sidebar-footer span:not(.status-dot) {
            display: none;
        }
        .sidebar.collapsed .sidebar-profile img {
            width: 40px;
            height: 40px;
        }

        /* --- Sidebar Profile --- */
        .sidebar-profile {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 30px;
            text-align: center;
        }

        .sidebar-profile img {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            border: 3px solid var(--accent-color);
            margin-bottom: 10px;
            object-fit: cover;
        }

        .sidebar-profile h4 { margin-bottom: 5px; font-weight: 600; }
        .sidebar-profile p { font-size: 0.85rem; color: #bdc3c7; }

        /* --- Main Content --- */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        /* --- Header --- */
       header {
    height: var(--header-height);
    min-height: var(--header-height);
    background-color: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 22px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

header > div:first-child {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.page-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.user-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-shrink: 0;
    min-width: max-content;
}

.profile {
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    margin-left: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.top-logout-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.top-logout-btn i {
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    header {
        padding: 0 14px;
        gap: 10px;
    }

    .page-title {
        max-width: 180px;
        font-size: 0.95rem;
    }

    .user-controls {
        gap: 10px;
    }

    .top-logout-btn span {
        display: none;
    }

    .top-logout-btn {
        padding: 8px 10px;
    }
}

#interpreter-call-history-view {
    width: 100%;
    height: calc(100vh - var(--header-height));
    padding: 30px;
    overflow-y: auto;
}

#interpreter-call-history-view.hidden {
    display: none !important;
}

#interpreter-call-history-view:not(.hidden) {
    display: block;
}

#interpreter-call-history-view .history-page-card {
    width: 100%;
    max-width: none;
    margin: 0;
}


.history-tab-btn {
    border: none;
    background: var(--bg-color);
    color: var(--text-main);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
}

.history-tab-btn:hover {
    background: #eef4f8;
}

.history-tab-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.history-tab-btn {
    border: none;
    background: var(--bg-color);
    color: var(--text-main);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
}

.history-tab-btn:hover {
    background: #eef4f8;
}

.history-tab-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}


        /* Status Toggle Switch */
        .status-wrapper {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .status-label {
            font-weight: bold;
            font-size: 0.9rem;
        }

        .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 24px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked + .slider {
            background-color: var(--success-color);
        }

        input:checked + .slider:before {
            transform: translateX(26px);
        }

        /* --- Views --- */
        .view-container {
            padding: 30px;
            overflow-y: auto;
            height: calc(100vh - var(--header-height));
        }

        .hidden {
            display: none !important;
        }

        /* Dashboard Cards */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .card {
            background: var(--card-bg);
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            text-align: center;
        }

        .card h3 {
            font-size: 2rem;
            color: var(--accent-color);
            margin-bottom: 5px;
        }

        .card p {
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        /* Appointments Table */
        .table-container {
            background: var(--card-bg);
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            overflow: hidden;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 15px 20px;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
        }

        th {
            background-color: var(--th-bg);
            color: var(--text-muted);
            font-weight: 600;
            font-size: 0.85rem;
            text-transform: uppercase;
        }

        .status-badge {
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: 600;
        }

        .status-scheduled { background-color: #e3f2fd; color: #2196f3; }
        .status-completed { background-color: #e8f5e9; color: #4caf50; }
        .status-new { background-color: #fff3cd; color: #d35400; }
        .status-online { background-color: #e8f5e9; color: #27ae60; }
        .status-on-call { background-color: #e3f2fd; color: #3498db; }
        .status-offline { background-color: #f2f2f2; color: #7f8c8d; }

        .action-btn {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.8rem;
            background-color: var(--accent-color);
            color: white;
        }

        .btn-accept-sm { background-color: var(--success-color); }
        .btn-deny-sm { background-color: var(--danger-color); }
        .action-group { display: flex; gap: 5px; }

  
        .btn-call:hover { transform: scale(1.1); }
        .btn-accept { background-color: var(--success-color); }
        .btn-decline { background-color: var(--danger-color); }

        /* --- Forms --- */
        .form-group { margin-bottom: 20px; }
        .form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-main); }
        .form-group input, .form-group select { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 4px; background: var(--bg-color); color: var(--text-main); }
        .form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent-color); }

        /* --- Chart --- */
        .chart-container { display: flex; justify-content: space-around; align-items: flex-end; height: 200px; padding-top: 20px; border-bottom: 1px solid var(--border-color); }
        .bar-group { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; width: 100%; }
        .bar { width: 40%; background-color: var(--accent-color); border-radius: 4px 4px 0 0; transition: height 0.5s ease; opacity: 0.8; position: relative; }
        .bar:hover { opacity: 1; }
        .bar:hover::after { content: attr(title); position: absolute; top: -25px; left: 50%; transform: translateX(-50%); background: var(--text-main); color: var(--bg-color); padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; white-space: nowrap; }
        .bar-label { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); }

        /* --- Chat --- */
        
        /* Demo Button */
        .demo-trigger {
            margin-top: 20px;
            padding: 10px;
            background: #eee;
            border: 1px dashed #999;
            cursor: pointer;
            width: 100%;
        }

        /* --- Resources --- */
        .resource-list { display: flex; flex-direction: column; gap: 15px; }
        .resource-item { display: flex; align-items: center; padding: 15px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-color); }
        .res-icon { font-size: 2rem; color: var(--danger-color); margin-right: 20px; }
        .res-info { flex: 1; }
        .res-title { font-weight: bold; color: var(--text-main); }
        .res-desc { font-size: 0.85rem; color: var(--text-muted); }

        /* --- Quick Notes --- */
        .note-pad { width: 100%; height: 150px; padding: 15px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-color); color: var(--text-main); resize: vertical; margin-top: 15px; font-family: inherit; }
        .note-pad:focus { outline: none; border-color: var(--accent-color); }

        /* --- Video Test --- */
        .video-preview-container { width: 100%; height: 400px; background-color: #000; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
        #video-preview { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
        .camera-placeholder { color: #7f8c8d; display: flex; flex-direction: column; align-items: center; }

        /* --- To-Do List --- */
        .todo-list { list-style: none; margin-top: 10px; }
        .todo-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
        .todo-item:last-child { border-bottom: none; }
        .todo-text { margin-left: 10px; flex: 1; }
        .todo-text.completed { text-decoration: line-through; color: var(--text-muted); }

        /* --- Break Timer --- */
        .timer-display { font-size: 3rem; font-weight: bold; color: var(--accent-color); margin: 10px 0; font-variant-numeric: tabular-nums; }

        /* --- Sidebar Footer --- */
        .sidebar-footer { margin-top: auto; padding: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; color: #bdc3c7; text-align: center; }
        .system-status { display: flex; align-items: center; justify-content: center; gap: 8px; }
        .status-dot { width: 10px; height: 10px; background-color: var(--success-color); border-radius: 50%; box-shadow: 0 0 5px var(--success-color); animation: pulse-dot 2s infinite; }
        
        @keyframes pulse-dot {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }

        /* --- Modal Close Button --- */
        .close-modal {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-muted);
        }
        .close-modal:hover {
            color: var(--text-main);
        }

/* --- Star Rating --- */
.star-rating {
    font-size: 1.5rem;
    cursor: pointer;
}
.star-rating > i {
    margin-right: 5px;
    color: #bdc3c7;
}
.star-rating > i.fas {
    color: #f39c12;
}

/* --- Video Effects --- */
.effect-blur {
    filter: blur(8px);
}
.effect-blue {
    filter: sepia(1) hue-rotate(190deg) saturate(2);
}
.effect-blur.effect-blue {
    filter: blur(8px) sepia(1) hue-rotate(190deg) saturate(2);
}

/* --- Modal Tabs (Dial Out Feature) --- */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.3s;
    font-size: 1rem;
}

.tab-btn.active {
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

.tab-btn:hover {
    background-color: var(--bg-color);
}

/* --- Dial Pad --- */
.dial-pad-container {
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
}

.dial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.dial-grid button {
    padding: 15px;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    cursor: pointer;
    transition: 0.2s;
}

.dial-grid button:hover {
    background-color: var(--border-color);
    border-color: var(--accent-color);
}

/* --- Transfer Tab --- */
.transfer-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}
.transfer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}
.transfer-item:hover {
    background-color: var(--bg-color);
}
.transfer-info h5 { margin-bottom: 2px; color: var(--text-main); }
.transfer-info p { font-size: 0.8rem; color: var(--text-muted); }

/* --- Consultation Chat --- */
.consultation-chat-window {
    display: flex;
    flex-direction: column;
    height: 250px; /* Or adjust as needed */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}
.consultation-chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- Language Grid (Client Portal) --- */
.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.language-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
}
.language-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
    background: white;
}
.lang-name {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-main);
}
.lang-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.btn-lang-call {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: opacity 0.2s;
}
.btn-lang-call:hover { opacity: 0.9; }
.btn-video { background-color: var(--accent-color); }
.btn-audio { background-color: var(--success-color); }

/* --- Pre-call Checklist --- */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
}

/* --- Password Strength Meter --- */
.password-strength-meter {
    margin-top: 5px;
    margin-bottom: 15px;
}
.strength-bar {
    height: 5px;
    background-color: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
    display: flex;
}
.strength-bar div {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
}
.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    font-weight: 600;
}

.chat-message-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.chat-message-row.mine {
    justify-content: flex-end;
}

.chat-message-row.theirs {
    justify-content: flex-start;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: #fff;
}

.message-sender {
    font-size: 0.74rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--accent-color);
}



/* ===== Professional Wide Incoming Call Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 22, 0.72);
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding: 24px;
}

#call-modal .call-card {
    width: min(980px, 94vw);
    min-height: 420px;
    border-radius: 28px;
    overflow: hidden;
    padding: 0;
    background:
        linear-gradient(135deg, #7b2ff7 0%, #9b3df4 35%, #c23df0 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    position: relative;
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    align-items: stretch;
}

#call-modal .call-left {
    position: relative;
    padding: 34px 30px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#call-modal .call-badge {
    position: absolute;
    top: 22px;
    left: 24px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.22);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    letter-spacing: 0.02em;
}

#call-modal .main-video-card {
    position: relative;
    width: 100%;
    max-width: 560px;
    min-height: 280px;
    margin-top: 28px;
    border-radius: 22px;
    overflow: hidden;
    background: #f2f4f8;
    box-shadow: 0 14px 32px rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.18);
}

#call-modal .main-video-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.22)),
        radial-gradient(circle at top right, rgba(255,255,255,0.28), transparent 35%),
        #e9eef5;
}

#call-modal .main-video-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
}

#call-modal .caller-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#call-modal .caller-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 4px solid rgba(255,255,255,0.9);
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b2ff7;
    font-size: 2rem;
}

#call-modal #incoming-caller-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#call-modal #incoming-caller-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#call-modal .wave-card {
    position: absolute;
    right: 18px;
    top: 26px;
    min-width: 150px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #fff;
    color: #5d6472;
    box-shadow: 0 12px 24px rgba(0,0,0,0.14);
    font-size: 0.8rem;
    font-weight: 600;
}

#call-modal .wave-line {
    margin-top: 6px;
    height: 28px;
    border-radius: 10px;
    background:
        linear-gradient(90deg,
            transparent 0%,
            #ff59c7 8%,
            transparent 16%,
            #8f5bff 24%,
            transparent 32%,
            #ff59c7 40%,
            transparent 48%,
            #8f5bff 56%,
            transparent 64%,
            #ff59c7 72%,
            transparent 80%,
            #8f5bff 88%,
            transparent 100%);
    opacity: 0.9;
}

#call-modal .main-call-controls {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}

#call-modal .mini-call-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.48);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

#call-modal .mini-call-btn.end {
    background: #ef4444;
}

#call-modal .call-right {
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

#call-modal .floating-preview {
    align-self: flex-end;
    width: 200px;
    height: 250px;
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.4);
    position: relative;
}

#call-modal .floating-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.08) 100%);
    z-index: 1;
}

#call-modal .floating-preview-body {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    color: #fff;
}

#call-modal .preview-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

#call-modal .preview-role {
    font-size: 0.76rem;
    opacity: 0.94;
    text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

#call-modal .preview-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

#call-modal .preview-actions .circle-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

#call-modal .preview-actions .accept-btn {
    background: #22c55e;
}

#call-modal .preview-actions .reject-btn {
    background: #ef4444;
}

#call-modal .call-info-panel {
    margin-top: 22px;
    padding: 18px 18px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(10px);
    color: #fff;
}

#call-modal .call-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.15;
    color: #fff;
}

#call-modal #incoming-caller-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}

#call-modal #incoming-call-language {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.88);
    line-height: 1.5;
}

#call-modal .call-status-row {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#call-modal .status-chip {
    background: rgba(255,255,255,0.16);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 860px) {
    #call-modal .call-card {
        grid-template-columns: 1fr;
        width: min(96vw, 650px);
        min-height: auto;
    }

    #call-modal .call-left,
    #call-modal .call-right {
        padding: 22px 18px;
    }

    #call-modal .main-video-card {
        max-width: 100%;
        min-height: 240px;
    }

    #call-modal .floating-preview {
        width: 100%;
        max-width: 220px;
        margin: 0 auto;
        height: 240px;
    }

    #call-modal .call-info-panel {
        margin-top: 16px;
    }
}



#client-video-modal.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.78);
    z-index: 9999;
    padding: 24px;
}

.client-call-modal {
    width: min(96vw, 1280px);
    height: min(90vh, 760px);
    background: #111;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-call-video-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.client-remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.client-local-video {
    position: absolute;
    right: 24px;
    bottom: 95px;
    width: 220px;
    height: 140px;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.9);
    object-fit: cover;
    background: #111;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    z-index: 3;
}

.client-call-topbar {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 4;
}

.client-call-badge,
.client-network-indicator,
.client-call-timer {
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.client-call-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.client-call-timer {
    position: absolute;
    top: 70px;
    left: 20px;
    z-index: 4;
    font-family: monospace;
    font-size: 1rem;
}

.client-pip-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
}

.client-call-controls {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 5;
    background: rgba(0,0,0,0.28);
    padding: 12px 16px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.client-circle-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s, background 0.2s;
}

.client-circle-btn:hover {
    transform: scale(1.06);
    background: rgba(255,255,255,0.25);
}

.client-end-btn {
    background: #d63b30;
}

.client-end-btn:hover {
    background: #bb2d23;
}

.client-dial-pad-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 340px;
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

@media (max-width: 768px) {
    .client-call-modal {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .client-local-video {
        width: 140px;
        height: 95px;
        right: 14px;
        bottom: 92px;
    }

    .client-circle-btn {
        width: 50px;
        height: 50px;
    }
}