* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow: hidden;
    background: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

/* Touch-friendly base styles */
button,
a,
.clickable {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

input,
textarea,
select {
    font-size: 16px !important;
    /* Prevents iOS zoom on focus */
}

.navbar-custom {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    height: 70px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-brand-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
}

.navbar-brand-custom img {
    height: 35px;
}

.navbar-brand-custom span {
    font-weight: 700;
    font-size: 18px;
    color: #ff6b35;
}

.call-status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
}

.call-status-box .phone-icon {
    font-size: 20px;
}

.call-status-info {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.call-status-info .status-text {
    color: rgba(255, 255, 255, 0.8);
}

.call-status-info .timer {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.navbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.user-info-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.user-details {
    color: white;
}

.user-details .name {
    font-weight: 600;
    font-size: 14px;
}

.user-details .email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.chat-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: white;
}

.chat-status-badge .dot {
    width: 8px;
    height: 8px;
    background: #ff5722;
    border-radius: 50%;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-btn.pause {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-btn.transfer {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-btn.close {
    background: #e53935;
    color: white;
}

.nav-btn:hover {
    transform: scale(1.05);
}

/* Main Layout Container */
.main-container {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 70px);
    width: 100%;
    overflow: hidden;
}

/* Sidebar */
.sidebar-custom {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    background: #1a2634;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    flex-shrink: 0;
    overflow-y: auto;
}

.sidebar-top-item {
    width: 60px;
    padding: 12px 8px;
    background: #2d3e50;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.sidebar-top-item .icon {
    font-size: 20px;
    color: #4fc3f7;
    margin-bottom: 4px;
}

.sidebar-top-item .text {
    font-size: 10px;
    color: white;
    line-height: 1.2;
}

.sidebar-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 0 10px;
}

.sidebar-item {
    width: 100%;
    padding: 12px 8px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: #8e9aa8;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    transition: all 0.3s;
    position: relative;
}

.sidebar-item:hover {
    background: #2a3744;
    color: white;
}

.sidebar-item.active {
    background: #3d5a80;
    color: white;
}

.sidebar-item i {
    font-size: 22px;
}

.sidebar-badge {
    position: absolute;
    top: 6px;
    right: 10px;
    min-width: 18px;
    height: 18px;
    background: #ff5722;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #2a3744;
    margin-top: auto;
}

.user-avatar-sidebar {
    position: relative;
}

.user-avatar-sidebar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #4caf50;
    object-fit: cover;
}

.user-avatar-sidebar .badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #4caf50;
    border-radius: 50%;
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.sidebar-item.settings {
    margin-top: 10px;
}

/* Task Panel - Action Menu */
.task-panel {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}



.task-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.task-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.task-card:hover {
    border-color: #4a90e2;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.task-card.active {
    border-left: 3px solid #4caf50;
    background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 100%);
}

.task-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #e8f5e9;
    color: #4caf50;
}

.task-icon.inactive {
    background: #f5f5f5;
    color: #9e9e9e;
}

.task-info {
    flex: 1;
}

.task-name {
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 1px;
    font-size: 13px;
}

.task-name.inactive {
    color: #9e9e9e;
}

.task-phone {
    font-size: 11px;
    color: #757575;
}

.task-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 4px;
    background: #4caf50;
    color: white;
}

.task-badge-number {
    background: #f0f0f0;
    color: #666;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
}

.chat-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-top: 1px solid #e0e0e0;
    margin-top: 0px;
    background: #f8fafc;
}

.chat-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-badge {
    background: #ff5722;
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-switch.active {
    background: #4caf50;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    left: 22px;
}

.chat-list-item {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    margin: 2px 0;
}

.chat-list-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.chat-list-item.active {
    background: linear-gradient(90deg, #fff7ed 0%, #ffffff 100%);
    border-left-color: #ff9800;
}

.channel-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    position: relative;
}

.channel-icon.chat {
    background: #ffebee;
    color: #e91e63;
}

.channel-icon.whatsapp {
    background: #e8f5e9;
    color: #25d366;
}

.channel-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #ff5722;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
}

.chat-list-info {
    flex: 1;
}

.chat-list-name {
    font-weight: 600;
    color: #1a2634;
    font-size: 12px;
    margin-bottom: 1px;
}

.chat-list-phone {
    font-size: 11px;
    color: #757575;
}

.chat-list-status {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
    background: #ff9800;
    color: white;
    margin-top: 3px;
}

.rehbere-ekle {
    font-size: 11px;
    color: #1976d2;
    cursor: pointer;
}

.status-bar {
    padding: 10px 14px;

    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    margin-top: auto;
    color: rgb(34, 33, 33);
}

.status-bar i {
    color: #4caf50 !important;
}

.status-bar span {
    color: rgba(11, 249, 103, 0.9);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
}

.status-bar i {
    color: #4caf50;
    margin-right: 4px;
}

/* Chat Area - Main Content */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    min-width: 0;
    overflow: hidden;
}

/* Content Area Wrapper */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
}

/* Dashboard Welcome */
.dashboard-welcome {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    border-radius: 16px;
    padding: 32px;
    color: white;
    margin-bottom: 24px;
}

.dashboard-welcome h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-welcome p {
    font-size: 14px;
    opacity: 0.85;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.stat-card .stat-icon.calls {
    background: #e8f5e9;
    color: #4caf50;
}

.stat-card .stat-icon.chats {
    background: #fff3e0;
    color: #ff9800;
}

.stat-card .stat-icon.waiting {
    background: #e3f2fd;
    color: #2196f3;
}

.stat-card .stat-icon.completed {
    background: #f3e5f5;
    color: #9c27b0;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a2634;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #64748b;
}

/* Quick Actions Section */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.action-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a2634;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-card h3 i {
    color: #ff5722;
}

.chat-tabs {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
    display: flex;
    gap: 0;
}

.chat-tab {
    padding: 14px 16px;
    font-size: 13px;
    color: #757575;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    white-space: nowrap;
}

.chat-tab:hover {
    color: #1a2634;
}

.chat-tab.active {
    color: #ff5722;
    border-bottom-color: #ff5722;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fa;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 65%;
}

.message.customer {
    align-self: flex-start;
}

.message.agent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.message-initials {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e3f2fd;
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

.message.customer .message-content {
    border-radius: 16px 16px 16px 4px;
}

.message.agent .message-content {
    background: white;
    border-radius: 16px 16px 4px 16px;
}

.message-text {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 4px;
}

.message-time {
    font-size: 10px;
    color: #9e9e9e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-tag {
    display: inline-block;
    background: #ff5722;
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 6px;
}

.chat-input-area {
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 16px 20px;
}

.quick-replies {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.quick-reply-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: #757575;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.quick-reply-btn.active {
    color: #ff5722;
    border-bottom-color: #ff5722;
    font-weight: 600;
}

.quick-reply-btn:hover {
    color: #ff5722;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #757575;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
}

.input-action-btn:hover {
    background: #e0e0e0;
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
}

.chat-input {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-size: 13px;
}

.chat-input:focus {
    outline: none;
}

.chat-input::placeholder {
    color: #9e9e9e;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.send-btn {
    padding: 10px 24px;
    background: #ff5722;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.send-btn:hover {
    background: #e64a19;
}

/* Right Panel */
.right-panel {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    background: white;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.right-panel-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.right-panel-tab {
    flex: 1;
    padding: 14px 10px;
    font-size: 12px;
    color: #757575;
    cursor: pointer;
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.right-panel-tab.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
    font-weight: 600;
}

.right-panel-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 12px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #9e9e9e;
    width: 35%;
}

.info-value {
    color: #1a2634;
    font-weight: 500;
}

.info-value.blue {
    color: #1976d2;
}

.bot-widget {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.3);
}

.bot-widget::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid #4fc3f7;
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.bot-avatar-icon {
    font-size: 36px;
}

.performance-section {
    text-align: center;
    margin-bottom: 20px;
}

.performance-title {
    font-size: 13px;
    color: #757575;
    margin-bottom: 4px;
}

.history-section {
    margin-top: 20px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    background: #f0f7ff;
}

.history-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.history-info {
    flex: 1;
}

.history-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a2634;
}

.history-time {
    font-size: 10px;
    color: #9e9e9e;
}

/* Floating Channels */
.floating-channels {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 20px;
    z-index: 100;
    pointer-events: none;
}

.floating-channel {
    pointer-events: auto;
    position: relative;
}

.channel-float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.channel-float-btn:hover {
    transform: scale(1.1);
}

.channel-float-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    color: white;
    position: absolute;
    top: -150px;
    left: -100px;
}

.channel-float-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #1ebe57 100%);
    color: white;
    position: absolute;
    top: 50px;
    left: -200px;
}

.channel-float-btn.messenger {
    background: linear-gradient(135deg, #00b2ff 0%, #0084ff 100%);
    color: white;
    position: absolute;
    top: 150px;
    left: -100px;
}

.channel-float-btn.webchat {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    position: absolute;
    top: 200px;
    left: 50px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* vCallphone Toggle Button - Sağ Alt Köşe */
.vcallphone-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.4);
    z-index: 1100;
    transition: all 0.3s ease;
    font-size: 13px;
}

.vcallphone-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.5);
}

.vcallphone-toggle i {
    font-size: 14px;
}

.vcallphone-toggle.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.vcallphone-toggle .status-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    margin-left: 4px;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
}

/* Webphone panel (hidden by default, slides up when open) */
.webphone-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 320px;
    max-width: calc(100% - 40px);
    height: auto;
    max-height: calc(100vh - 100px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: translateY(120%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: none;
}

.webphone-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.webphone-panel.minimized {
    height: 52px;
    width: 260px;
}

.webphone-panel.minimized .wp-body,
.webphone-panel.minimized .wp-tabs,
.webphone-panel.minimized .wp-footer,
.webphone-panel.minimized .wp-call-controls,
.webphone-panel.minimized .wp-quick-bar {
    display: none !important;
}

/* Header - Compact */
.wp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
}

.wp-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-logo {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.wp-header-info {
    display: flex;
    flex-direction: column;
}

.wp-title {
    font-weight: 700;
    font-size: 13px;
}

.wp-subtitle {
    font-size: 10px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wp-conn-indicator {
    display: flex;
    align-items: center;
    gap: 3px;
}

.wp-conn-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.wp-conn-dot.connected {
    background: #4caf50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
}

.wp-conn-dot.disconnected {
    background: #e53935;
}

.wp-separator {
    opacity: 0.5;
}

.wp-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wp-header-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
}

.wp-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.wp-close {
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(229, 57, 53, 0.2);
    color: #ff6b6b;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.wp-close:hover {
    background: rgba(229, 57, 53, 0.4);
}

/* Quick Status Bar - NEW */
.wp-quick-bar {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 8px;
    gap: 4px;
}

.wp-qbtn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 8px;
    color: #64748b;
    transition: all 0.15s;
    border: 1px solid #e2e8f0;
}

.wp-qbtn i {
    font-size: 12px;
}

.wp-qbtn span {
    font-weight: 500;
}

.wp-qbtn:hover {
    background: #e2e8f0;
    color: #1976d2;
}

.wp-qbtn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.wp-qbtn.active.dnd {
    background: #e53935;
    border-color: #e53935;
}

/* Tabs - Compact */
.wp-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 4px;
}

.wp-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 9px;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.wp-tab i {
    font-size: 13px;
}

.wp-tab:hover {
    color: #1976d2;
}

.wp-tab.active {
    color: #1976d2;
}

.wp-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #1976d2;
    border-radius: 2px 2px 0 0;
}

.wp-tab-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 16px);
    min-width: 14px;
    height: 14px;
    background: #e53935;
    color: white;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Body */
.wp-body {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
    max-height: 380px;
}

.wp-tab-content {
    display: none;
    padding: 10px;
}

.wp-tab-content.active {
    display: block;
}

/* Active Call Banner - Compact */
.wp-active-call {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-bottom: 1px solid #a5d6a7;
}

.wp-call-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}

.wp-call-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4caf50;
}

.wp-call-status-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid #4caf50;
    border-radius: 50%;
    animation: ring-pulse 1.5s infinite;
}

@keyframes ring-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.wp-call-info {
    flex: 1;
}

.wp-call-name {
    font-weight: 700;
    font-size: 12px;
    color: #1a2634;
}

.wp-call-number {
    font-size: 10px;
    color: #64748b;
}

.wp-call-timer {
    font-size: 14px;
    font-weight: 700;
    color: #4caf50;
    font-family: 'Consolas', monospace;
}

.wp-call-quality {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 10px;
    font-size: 10px;
    color: #2e7d32;
    font-weight: 600;
}

/* Dial Display - Compact */
.wp-dial-display {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 3px;
    border: 1px solid #e2e8f0;
}

.wp-dial-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #1a2634;
    letter-spacing: 1px;
    text-align: center;
}

.wp-dial-input::placeholder {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    color: #94a3b8;
}

.wp-dial-input:focus {
    outline: none;
}

.wp-dial-clear {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.wp-dial-clear:hover {
    background: #e2e8f0;
    color: #64748b;
}

/* Keypad - Compact */
.wp-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.wp-keypad .kp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    border: none;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.12s;
    border: 1px solid #e2e8f0;
}

.wp-keypad .kp:hover {
    background: #e2e8f0;
}

.wp-keypad .kp:active {
    background: #cbd5e1;
    transform: scale(0.96);
}

.kp-num {
    font-size: 18px;
    font-weight: 600;
    color: #1a2634;
    line-height: 1;
}

.kp-sub {
    font-size: 8px;
    color: #94a3b8;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

/* Action Buttons - Compact */
.wp-action-buttons {
    display: flex;
    gap: 8px;
}

.wp-btn-call {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.25);
}

.wp-btn-call:hover {
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.35);
}

.wp-btn-hangup {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(229, 57, 53, 0.25);
}

.wp-btn-hangup:hover {
    box-shadow: 0 4px 14px rgba(229, 57, 53, 0.35);
}

/* Contacts Tab - Compact */
.wp-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

.wp-search-box i {
    color: #94a3b8;
    font-size: 12px;
}

.wp-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 12px;
    color: #1a2634;
}

.wp-search-box input:focus {
    outline: none;
}

.wp-contact-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wp-contact-group-title {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.wp-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.wp-contact-item:hover {
    background: #f8fafc;
}

.wp-contact-avatar {
    position: relative;
    width: 32px;
    height: 32px;
}

.wp-contact-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.wp-contact-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.wp-contact-avatar.online::after {
    background: #4caf50;
}

.wp-contact-avatar.busy::after {
    background: #e53935;
}

.wp-contact-avatar.away::after {
    background: #ff9800;
}

.wp-contact-avatar.offline::after {
    background: #9e9e9e;
}

.wp-contact-info {
    flex: 1;
}

.wp-contact-name {
    font-weight: 600;
    font-size: 11px;
    color: #1a2634;
}

.wp-contact-ext {
    font-size: 10px;
    color: #64748b;
}

.wp-contact-call {
    width: 28px;
    height: 28px;
    border: none;
    background: #e8f5e9;
    color: #4caf50;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
    opacity: 0;
}

.wp-contact-item:hover .wp-contact-call {
    opacity: 1;
}

.wp-contact-call:hover {
    background: #4caf50;
    color: white;
}

/* History Tab - Compact */
.wp-history-filters {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.wp-filter-btn {
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 14px;
    font-size: 10px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.wp-filter-btn:hover {
    border-color: #1976d2;
    color: #1976d2;
}

.wp-filter-btn.active {
    background: #1976d2;
    border-color: #1976d2;
    color: white;
}

.wp-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wp-history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s;
}

.wp-history-item:hover {
    background: #f1f5f9;
}

.wp-history-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.wp-history-item.incoming .wp-history-icon {
    background: #e3f2fd;
    color: #1976d2;
}

.wp-history-item.outgoing .wp-history-icon {
    background: #e8f5e9;
    color: #4caf50;
}

.wp-history-item.missed .wp-history-icon {
    background: #ffebee;
    color: #e53935;
}

.wp-history-info {
    flex: 1;
}

.wp-history-name {
    font-weight: 600;
    font-size: 11px;
    color: #1a2634;
}

.wp-history-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: #64748b;
}

.wp-history-time {
    font-size: 9px;
    color: #94a3b8;
}

.wp-history-callback {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
    opacity: 0;
}

.wp-history-item:hover .wp-history-callback {
    opacity: 1;
}

.wp-history-callback:hover {
    background: #e2e8f0;
    color: #1976d2;
}

/* Voicemail Tab - Compact */
.wp-voicemail-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wp-voicemail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s;
}

.wp-voicemail-item.unread {
    background: #fff8e1;
    border-left: 2px solid #ff9800;
}

.wp-voicemail-item:hover {
    background: #f1f5f9;
}

.wp-voicemail-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.wp-voicemail-info {
    flex: 1;
}

.wp-voicemail-name {
    font-weight: 600;
    font-size: 11px;
    color: #1a2634;
}

.wp-voicemail-duration {
    font-size: 9px;
    color: #64748b;
}

.wp-voicemail-time {
    font-size: 9px;
    color: #94a3b8;
}

.wp-voicemail-play {
    width: 28px;
    height: 28px;
    border: none;
    background: #1976d2;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
}

.wp-voicemail-play:hover {
    background: #1565c0;
}

/* Call Controls - Compact */
.wp-call-controls {
    display: flex;
    justify-content: space-around;
    gap: 4px;
    padding: 8px 10px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.wp-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 9px;
    color: #64748b;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.wp-ctrl-btn i {
    font-size: 16px;
}

.wp-ctrl-btn:hover {
    background: #e2e8f0;
    color: #1976d2;
}

.wp-ctrl-btn.active {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #90caf9;
}

.wp-ctrl-btn#btn-record.active {
    background: #ffebee;
    color: #e53935;
    border-color: #ef9a9a;
}

.wp-ctrl-btn#btn-record.active i {
    animation: record-pulse 1s infinite;
}

@keyframes record-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Footer - Compact */
.wp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
}

.wp-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-footer-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.wp-footer-btn:hover {
    background: #e2e8f0;
    color: #1976d2;
}

.wp-volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 2px;
    outline: none;
}

.wp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #1976d2;
    border-radius: 50%;
    cursor: pointer;
}

.wp-footer-center {
    display: flex;
    align-items: center;
}

.wp-quality-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #4caf50;
}

.wp-quality-indicator i {
    font-size: 12px;
}

.wp-footer-right {
    display: flex;
    align-items: center;
}

.wp-version {
    font-size: 10px;
    color: #94a3b8;
}

/* =====================================================
   MOBILE & TOUCH RESPONSIVE STYLES
   ===================================================== */

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .navbar-custom {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .main-container {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* Touch-friendly button sizes (minimum 44x44px for accessibility) */
.touch-target {
    min-width: 44px;
    min-height: 44px;
}

/* ===== TABLET STYLES (768px - 1024px) ===== */
@media (max-width: 1024px) {
    .navbar-custom {
        padding: 0 15px;
        height: 60px;
    }

    .navbar-center {
        display: none;
    }

    .user-info-box {
        display: none;
    }

    .sidebar-custom {
        width: 60px;
        min-width: 60px;
    }

    .sidebar-item span {
        display: none;
    }

    .sidebar-item {
        justify-content: center;
        padding: 12px;
    }

    .task-panel {
        width: 200px;
    }

    .main-content {
        flex: 1;
    }

    .right-panel {
        width: 280px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 24px;
    }
}

/* ===== MOBILE LANDSCAPE (max-width: 900px) ===== */
@media (max-width: 900px) {
    .right-panel {
        display: none;
    }

    .task-panel {
        width: 180px;
    }
}

/* ===== MOBILE STYLES (max-width: 768px) ===== */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .navbar-custom {
        height: 56px;
        padding: 0 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    .navbar-brand-custom span {
        font-size: 16px;
    }

    .navbar-brand-custom img {
        height: 28px;
    }

    .call-status-box {
        padding: 6px 10px;
        font-size: 11px;
    }

    .call-status-info .timer {
        font-size: 14px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
    }

    .main-container {
        flex-direction: column;
        height: calc(100vh - 56px);
        margin-top: 56px;
    }

    /* Mobile Sidebar - Bottom Navigation */
    .sidebar-custom {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-width: 100%;
        height: 60px;
        flex-direction: row;
        justify-content: space-around;
        padding: 8px 0;
        z-index: 999;
        border-radius: 0;
        border-top: 1px solid #e2e8f0;
    }

    .sidebar-item {
        flex-direction: column;
        gap: 2px;
        padding: 6px 12px;
        border-radius: 8px;
        min-width: 60px;
    }

    .sidebar-item i {
        font-size: 18px;
    }

    .sidebar-item span {
        font-size: 9px;
        display: block;
    }

    .sidebar-item.has-badge::after {
        top: 2px;
        right: 8px;
    }

    /* Task Panel - Slide from left */
    .task-panel {
        position: fixed;
        left: -280px;
        top: 56px;
        width: 280px;
        height: calc(100vh - 116px);
        z-index: 998;
        transition: left 0.3s ease;
        border-radius: 0;
    }

    .task-panel.open {
        left: 0;
    }

    /* Main Content Full Width */
    .main-content {
        width: 100%;
        padding: 12px;
        padding-bottom: 70px;
        height: calc(100vh - 116px);
    }

    /* Right Panel - Hidden on mobile */
    .right-panel {
        display: none;
    }

    /* Stats Grid */
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
    }

    /* Cards */
    .card-section {
        padding: 12px;
        margin-bottom: 12px;
    }

    .card-header {
        margin-bottom: 12px;
    }

    .card-title {
        font-size: 14px;
    }

    /* Tables - Scrollable */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Chat items */
    .chat-list-item {
        padding: 10px;
    }

    .chat-avatar {
        width: 40px;
        height: 40px;
    }

    /* Buttons */
    .btn,
    button {
        min-height: 44px;
        padding: 10px 16px;
    }

    .chat-tab {
        padding: 10px 12px;
        font-size: 12px;
        min-height: 44px;
    }
}

/* ===== SMALL MOBILE (max-width: 480px) ===== */
@media (max-width: 480px) {
    .navbar-custom {
        padding: 0 8px;
    }

    .navbar-brand-custom span {
        display: none;
    }

    .call-status-box {
        padding: 4px 8px;
    }

    .call-status-info .status-text {
        display: none;
    }

    .navbar-right {
        gap: 6px;
    }

    .nav-btn {
        width: 36px;
        height: 36px;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 10px;
    }

    .stat-value {
        font-size: 18px;
    }

    .main-content {
        padding: 8px;
        padding-bottom: 70px;
    }

    /* Sidebar bottom nav compact */
    .sidebar-custom {
        height: 56px;
        padding: 6px 0;
    }

    .sidebar-item {
        padding: 4px 8px;
        min-width: 50px;
    }

    .sidebar-item i {
        font-size: 16px;
    }

    .sidebar-item span {
        font-size: 8px;
    }
}

/* ===== WEBPHONE MOBILE STYLES ===== */
@media (max-width: 768px) {
    .vcallphone-toggle {
        right: 12px;
        bottom: 70px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .vcallphone-toggle span {
        display: none;
    }

    .vcallphone-toggle i {
        font-size: 18px;
    }

    .webphone-panel {
        width: calc(100% - 16px);
        right: 8px;
        bottom: 70px;
        max-height: calc(100vh - 140px);
        border-radius: 16px;
    }

    .webphone-panel.open {
        bottom: 70px;
    }

    .wp-header {
        padding: 12px;
    }

    .wp-quick-bar {
        padding: 8px 10px;
    }

    .wp-qbtn {
        padding: 8px 6px;
        font-size: 9px;
    }

    .wp-qbtn i {
        font-size: 14px;
    }

    .wp-tabs {
        padding: 0 8px;
    }

    .wp-tab {
        padding: 10px 6px;
        min-height: 48px;
    }

    .wp-tab i {
        font-size: 16px;
    }

    .wp-body {
        padding: 12px;
        max-height: calc(100vh - 380px);
    }

    /* Keypad - Larger touch targets */
    .wp-keypad {
        gap: 10px;
    }

    .wp-keypad button.kp {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }

    .wp-keypad button.kp span {
        font-size: 8px;
    }

    /* Action buttons */
    .wp-actions {
        gap: 10px;
    }

    .wp-action-btn {
        width: 56px;
        height: 56px;
    }

    .wp-action-btn i {
        font-size: 22px;
    }

    /* Call controls */
    .wp-call-controls {
        padding: 10px 12px;
        gap: 6px;
    }

    .wp-ctrl-btn {
        width: 44px;
        height: 44px;
    }

    /* Contacts */
    .wp-contact-item {
        padding: 10px;
        min-height: 56px;
    }

    .wp-contact-call {
        width: 40px;
        height: 40px;
    }

    /* History */
    .wp-history-item {
        padding: 10px;
        min-height: 56px;
    }

    .wp-history-callback {
        width: 36px;
        height: 36px;
        opacity: 1;
    }

    /* Footer */
    .wp-footer {
        padding: 10px 12px;
    }

    .wp-volume-slider {
        width: 100px;
        height: 6px;
    }

    .wp-volume-slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .webphone-panel {
        width: calc(100% - 8px);
        right: 4px;
        bottom: 64px;
    }

    .wp-keypad button.kp {
        width: 54px;
        height: 54px;
        font-size: 20px;
    }

    .wp-action-btn {
        width: 52px;
        height: 52px;
    }
}

/* ===== TOUCH INTERACTION STYLES ===== */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects on touch devices */
    .sidebar-item:hover,
    .chat-list-item:hover,
    .stat-card:hover,
    .nav-btn:hover,
    .wp-tab:hover,
    .wp-qbtn:hover,
    .wp-keypad button.kp:hover,
    .wp-contact-item:hover,
    .wp-history-item:hover {
        transform: none;
    }

    /* Active states for touch */
    .sidebar-item:active,
    .chat-list-item:active,
    .nav-btn:active,
    .wp-tab:active,
    .wp-qbtn:active,
    .wp-keypad button.kp:active,
    .wp-action-btn:active,
    .wp-ctrl-btn:active,
    .wp-contact-call:active,
    .wp-history-callback:active,
    button:active {
        opacity: 0.7;
        transform: scale(0.96);
    }

    /* Larger touch targets */
    .wp-history-callback,
    .wp-contact-call {
        opacity: 1;
    }

    /* Scrolling improvements */
    .wp-body,
    .chat-messages,
    .main-content,
    .task-panel,
    .table-container {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar-custom {
        height: 48px;
    }

    .main-container {
        height: calc(100vh - 48px);
        margin-top: 48px;
    }

    .sidebar-custom {
        height: 48px;
    }

    .webphone-panel {
        max-height: calc(100vh - 60px);
        bottom: 56px;
    }

    .wp-body {
        max-height: 200px;
    }

    .wp-keypad button.kp {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* ===== DARK MODE SUPPORT (optional, respects system preference) ===== */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    body {
        background: #1a1a2e;
        color: #eee;
    }
    
    .main-content,
    .task-panel,
    .sidebar,
    .right-panel {
        background: #16213e;
    }
    
    .card-section,
    .stat-card {
        background: #1a1a2e;
    }
    */
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .sidebar-item,
    .chat-list-item,
    .stat-card,
    .wp-tab,
    .wp-qbtn,
    button {
        border: 2px solid currentColor;
    }
}

.status-bar {
    cursor: pointer;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Tab Content Styles */
.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: #f1f5f9;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.activity-icon.incoming {
    background: #e3f2fd;
    color: #1976d2;
}

.activity-icon.completed {
    background: #e8f5e9;
    color: #4caf50;
}

.activity-icon.missed {
    background: #ffebee;
    color: #e53935;
}

.activity-info {
    flex: 1;
}

.activity-text {
    font-size: 13px;
    color: #1a2634;
    font-weight: 500;
}

.activity-time {
    font-size: 11px;
    color: #9e9e9e;
    margin-top: 2px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 14px 16px;
    font-size: 13px;
    color: #1a2634;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.customer-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e3f2fd;
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.customer-name {
    font-weight: 600;
    color: #1a2634;
}

.customer-phone {
    font-size: 11px;
    color: #9e9e9e;
}

.channel-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.channel-tag.chat {
    background: #fff3e0;
    color: #ff9800;
}

.channel-tag.whatsapp {
    background: #e8f5e9;
    color: #25d366;
}

.status-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-tag.completed {
    background: #e8f5e9;
    color: #4caf50;
}

.status-tag.transferred {
    background: #e3f2fd;
    color: #1976d2;
}

.status-tag.pending {
    background: #fff3e0;
    color: #ff9800;
}

.table-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.table-action-btn:hover {
    background: #f1f5f9;
    color: #1976d2;
}

/* Progress List */
.progress-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #1a2634;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Badges Grid */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.badge-icon.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.badge-icon.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #9e9e9e 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.4);
}

.badge-icon.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.4);
}

.badge-item span {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* =====================================================
   MOBILE MENU & OVERLAY
   ===================================================== */

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}

/* Touch Active State */
.touch-active {
    opacity: 0.7 !important;
    transform: scale(0.96) !important;
}

/* PWA Install Banner (optional) */
.pwa-install-banner {
    position: fixed;
    bottom: 70px;
    left: 12px;
    right: 12px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 1100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(150%);
    transition: transform 0.3s ease;
}

.pwa-install-banner.show {
    transform: translateY(0);
}

.pwa-install-banner-text {
    flex: 1;
    font-size: 13px;
}

.pwa-install-btn {
    padding: 8px 16px;
    background: white;
    color: #1e3a5f;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

.pwa-install-close {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

/* Swipe Indicator */
.swipe-indicator {
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 8px auto;
}

/* Pull to Refresh Indicator */
.pull-refresh-indicator {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: white;
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.pull-refresh-indicator.visible {
    transform: translateX(-50%) translateY(10px);
}

.pull-refresh-indicator i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}