/**
 * CellHub WebRTC Dialer - Dialer Styles
 * 
 * Styles for the dialer interface, numpad, call status,
 * contacts, history, and settings views.
 */

/* ===================== Dialer Container ===================== */
.dialer-container {
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ===================== Call Status ===================== */
.call-status {
    width: 100%;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.8), rgba(0, 188, 212, 0.2));
    border: 1px solid rgba(0, 188, 212, 0.3);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: pulse-border 2s ease-in-out infinite;
}

.call-status.active-call {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.2), rgba(26, 35, 126, 0.4));
}

.call-status.incoming-call {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.3), rgba(76, 175, 80, 0.2));
    animation: pulse-border 1s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(0, 188, 212, 0.3); }
    50% { border-color: rgba(0, 188, 212, 0.6); }
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-state {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-duration {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
}

.status-actions {
    display: flex;
    gap: 8px;
}

/* ===================== Phone Display ===================== */
.phone-display {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.phone-number {
    width: 100%;
    min-height: 52px;
    background: rgba(10, 15, 35, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 48px 12px 16px;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 2px;
    text-align: center;
    font-family: 'Courier New', monospace;
    line-height: 1.2;
}

.phone-number:empty::before {
    content: attr(placeholder);
    color: var(--text-muted);
    font-weight: 400;
    font-size: 20px;
    letter-spacing: 0;
    font-family: 'Inter', sans-serif;
}

.btn-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-clear:hover {
    color: var(--danger);
    background: rgba(244, 67, 54, 0.1);
}

/* ===================== Numpad ===================== */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 320px;
}

.num-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(30, 40, 75, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 8px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.num-btn:hover {
    background: rgba(0, 188, 212, 0.1);
    border-color: var(--border-hover);
}

.num-btn:active {
    background: rgba(0, 188, 212, 0.2);
    transform: scale(0.95);
}

.num-btn .digit {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.num-btn .letters {
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 4px;
}

/* ===================== Call Button ===================== */
.dialer-actions {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 160px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #00897b, #00bcd4);
    border: none;
    border-radius: 28px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 188, 212, 0.3);
}

.btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 188, 212, 0.4);
}

.btn-call:active {
    transform: translateY(0);
}

.btn-call.calling {
    background: linear-gradient(135deg, #c62828, #f44336);
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.3);
}

.btn-call:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===================== Button Icons ===================== */
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: rgba(30, 40, 75, 0.6);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(0, 188, 212, 0.1);
    border-color: var(--border-hover);
    color: var(--accent-primary);
}

.btn-icon.active {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.4);
    color: var(--danger);
}

.btn-icon.btn-danger {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.4);
    color: var(--danger);
}

.btn-icon.btn-danger:hover {
    background: rgba(244, 67, 54, 0.3);
}

/* ===================== Registration Status ===================== */
.reg-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.reg-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.reg-indicator.online { background: var(--success); }
.reg-indicator.offline { background: var(--text-muted); }
.reg-indicator.registering { background: var(--warning); animation: blink 1s ease-in-out infinite; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===================== Recent Calls ===================== */
.recent-calls {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.section-title {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}

.calls-list {
    max-height: 280px;
    overflow-y: auto;
}

.call-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.call-item:last-child {
    border-bottom: none;
}

.call-item:hover {
    background: rgba(0, 188, 212, 0.05);
}

.call-icon {
    flex-shrink: 0;
}

.call-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.call-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-time {
    font-size: 11px;
    color: var(--text-muted);
}

.call-status-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-answered { background: rgba(76, 175, 80, 0.15); color: var(--success); }
.badge-missed { background: rgba(244, 67, 54, 0.15); color: var(--danger); }
.badge-ringing { background: rgba(0, 188, 212, 0.15); color: var(--accent-primary); }
.badge-completed { background: rgba(76, 175, 80, 0.15); color: var(--success); }
.badge-busy { background: rgba(255, 152, 0, 0.15); color: var(--warning); }
.badge-unknown { background: rgba(136, 146, 176, 0.15); color: var(--text-muted); }

/* ===================== Empty State ===================== */
.empty-state {
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===================== Contacts View ===================== */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.panel-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.search-input {
    flex: 1;
    max-width: 280px;
    padding: 8px 14px;
    background: rgba(10, 15, 35, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.contacts-list {
    display: flex;
    flex-direction: column;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(0, 188, 212, 0.05);
}

.contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.contact-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-phone {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-company {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-call-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 188, 212, 0.1);
    border: 1px solid rgba(0, 188, 212, 0.2);
    color: var(--accent-primary);
    opacity: 0;
    transition: var(--transition);
}

.contact-item:hover .btn-call-sm {
    opacity: 1;
}

.btn-call-sm:hover {
    background: rgba(0, 188, 212, 0.2);
}

/* ===================== Call History ===================== */
.history-list {
    display: flex;
    flex-direction: column;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
    border-bottom: none;
}

.history-direction {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 188, 212, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-time {
    font-size: 11px;
    color: var(--text-muted);
}

.history-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

/* ===================== Settings ===================== */
.settings-content {
    max-width: 600px;
}

.settings-section {
    margin-bottom: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-section h3 {
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    margin: 0;
    background: rgba(0, 188, 212, 0.03);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.setting-item span {
    font-size: 13px;
    color: var(--text-primary);
}

.form-select-setting {
    padding: 6px 12px;
    background: rgba(10, 15, 35, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    min-width: 200px;
}

.form-select-setting:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.status-text {
    font-size: 13px;
    color: var(--text-muted);
}

.status-text.online {
    color: var(--success);
}

/* ===================== Incoming Call Modal ===================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-incoming {
    animation: slide-up 0.3s ease;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.incoming-icon {
    margin-bottom: 16px;
    animation: ring 1.5s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(0deg); }
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.incoming-caller {
    font-size: 16px;
    color: var(--accent-primary);
    margin-bottom: 24px;
}

.incoming-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-accept {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--success);
    border: none;
    border-radius: 28px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-accept:hover {
    background: #43a047;
    transform: translateY(-2px);
}

.btn-reject {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--danger);
    border: none;
    border-radius: 28px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reject:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* ===================== View Panels ===================== */
.view-panel {
    display: none;
}

.view-panel.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -240px;
        z-index: 100;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        width: 100%;
        padding: 16px;
    }

    .phone-number {
        font-size: 22px;
    }

    .num-btn .digit {
        font-size: 20px;
    }

    .numpad {
        gap: 8px;
    }
}

/* ===================== Call Statistics Cards ===================== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-icon {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ===================== Backspace Button ===================== */
.btn-backspace {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-backspace:hover {
    color: var(--warning);
    background: rgba(255, 152, 0, 0.1);
}

/* ===================== Answer Button ===================== */
.btn-answer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 160px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    border: none;
    border-radius: 28px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    animation: pulse-answer 1.5s ease-in-out infinite;
}

.btn-answer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.4);
}

@keyframes pulse-answer {
    0%, 100% { box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(76, 175, 80, 0.6); }
}

/* ===================== Call Notes Modal ===================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-notes {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 400px;
    max-width: 90vw;
}

.modal-notes h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.notes-call-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.modal-notes textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

.modal-notes textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.15);
}

.notes-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.notes-actions .btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.notes-actions .btn-primary {
    background: var(--accent-primary);
    color: #0d1b2a;
}

.notes-actions .btn-primary:hover {
    background: var(--accent-hover);
}

.notes-actions .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* ===================== Refresh Button ===================== */
.refresh-btn {
    float: right;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 0 4px;
}

.refresh-btn:hover {
    color: var(--accent-primary);
    transform: rotate(180deg);
}

/* ===================== History View ===================== */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.search-input {
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    width: 220px;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.15);
}

/* ===================== Settings View ===================== */
.settings-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.settings-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
}

.setting-item label {
    color: var(--text-secondary);
    font-weight: 500;
}

.setting-item span {
    color: var(--text-primary);
}

.form-select-setting {
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    width: 200px;
    outline: none;
}

.btn.btn-primary {
    padding: 8px 16px;
    background: var(--accent-primary);
    color: #0d1b2a;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.status-text {
    font-weight: 500;
}

.status-text.online {
    color: var(--success);
}

/* ===================== Contacts View ===================== */
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(0, 188, 212, 0.08);
}

.contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.contact-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-phone {
    font-size: 11px;
    color: var(--text-muted);
}

.contact-company {
    font-size: 11px;
    color: var(--text-secondary);
}

.btn-call-sm {
    color: var(--success);
}

/* ===================== History Items ===================== */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.history-item:hover {
    border-color: var(--border-hover);
}

.history-direction {
    flex-shrink: 0;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.history-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.history-time {
    font-size: 11px;
    color: var(--text-muted);
}

.history-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-answered, .badge-completed { background: rgba(76, 175, 80, 0.15); color: var(--success); }
.badge-no_answer, .badge-missed { background: rgba(244, 67, 54, 0.15); color: var(--danger); }
.badge-ringing, .badge-dialing { background: rgba(0, 188, 212, 0.15); color: var(--accent-primary); }
.badge-busy { background: rgba(255, 152, 0, 0.15); color: var(--warning); }
.badge-failed { background: rgba(244, 67, 54, 0.15); color: var(--danger); }
.badge-pending { background: rgba(90, 99, 128, 0.2); color: var(--text-muted); }
.badge-transferred { background: rgba(0, 188, 212, 0.15); color: var(--accent-primary); }
.badge-skipped_blacklisted { background: rgba(90, 99, 128, 0.2); color: var(--text-muted); }

/* ===================== View Panel ===================== */
.view-panel {
    display: none;
}

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

/* ===================== Responsive Stats ===================== */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* DTMF Received Display */
.dtmf-received {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #00bcd4;
    background: rgba(0, 188, 212, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    min-width: 20px;
    text-align: center;
    transition: all 0.2s ease;
}
.dtmf-received.flash {
    background: rgba(0, 188, 212, 0.3);
    transform: scale(1.2);
}

/* Incoming call overlay animation */
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}
.incoming-call-overlay .modal-content {
    animation: slideInUp 0.3s ease;
}
.btn-accept {
    background: #4caf50;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 8px;
    transition: background 0.2s;
}
.btn-accept:hover { background: #43a047; }
.btn-reject {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 8px;
    transition: background 0.2s;
}
.btn-reject:hover { background: #e53935; }
