:root {
    /* iOS Phone palette */
    --ios-bg: #f2f2f7;
    --ios-bg-grouped: #f2f2f7;
    --ios-surface: #ffffff;
    --ios-surface-2: #e5e5ea;
    --ios-separator: rgba(60, 60, 67, 0.12);
    --ios-label: #000000;
    --ios-label-secondary: rgba(60, 60, 67, 0.6);
    --ios-label-tertiary: rgba(60, 60, 67, 0.3);
    --ios-blue: #007aff;
    --ios-green: #34c759;
    --ios-red: #ff3b30;
    --ios-orange: #ff9500;
    --ios-purple: #af52de;
    --ios-tabbar-bg: rgba(248, 248, 248, 0.94);

    /* Legacy aliases (still used by some sub-views) */
    --primary: #007aff;
    --primary-dark: #0062cc;
    --primary-light: #4a9eff;
    --secondary: #5ac8fa;
    --gradient: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
    --gradient-secondary: linear-gradient(135deg, #34c759 0%, #30b04f 100%);
    --success: #34c759;
    --warning: #ff9500;
    --danger: #ff3b30;
    --text-primary: #000000;
    --text-secondary: rgba(60, 60, 67, 0.6);
    --text-light: rgba(60, 60, 67, 0.3);
    --bg-light: #f2f2f7;
    --bg-white: #ffffff;
    --border: rgba(60, 60, 67, 0.12);
    --shadow-sm: 0 0.5px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--ios-label);
    background: var(--ios-bg);
    letter-spacing: -0.01em;
}

@supports (padding-top: env(safe-area-inset-top)) {
    .safe-area-top { padding-top: env(safe-area-inset-top); }
    .safe-area-bottom { padding-bottom: env(safe-area-inset-bottom); }
}

.btn-primary {
    background: var(--gradient);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: white;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover { background: var(--bg-light); }

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}
.input-field:focus { border-color: var(--primary); outline: none; }

select.input-field { appearance: none; cursor: pointer; }

.notification {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 1100;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    animation: toastSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
}
.notification.success { background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(5, 150, 105, 0.8)); color: white; }
.notification.error { background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), rgba(220, 38, 38, 0.8)); color: white; }
.notification.info { background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(79, 70, 229, 0.8)); color: white; }
.notification.slide-out { animation: toastSlideOut 0.3s ease-in forwards; }

@keyframes toastSlideIn {
    0% { transform: translateX(100%) scale(0.9); opacity: 0; }
    60% { transform: translateX(-10px) scale(1.02); opacity: 0.8; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes toastSlideOut {
    0% { transform: translateX(0) scale(1); opacity: 1; }
    100% { transform: translateX(100%) scale(0.9); opacity: 0; }
}

.nav-item { transition: all 0.3s ease; }
.nav-item:hover { transform: translateY(-2px); }
.nav-item.active { color: var(--primary); background-color: rgba(99, 102, 241, 0.1); }

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.4s ease-out forwards; }
.stagger-item { opacity: 0; animation: fadeInUp 0.4s ease-out forwards; }
.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }

#loading-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#loading-screen .logo {
    margin-bottom: 1.5rem;
    animation: splashFloat 2s ease-in-out infinite;
}
#loading-screen .logo img {
    width: 180px;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}
#loading-screen .loading-spinner {
    width: 3rem; height: 3rem;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes splashFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.line-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}
.line-card:hover { border-color: var(--primary-light); background: rgba(99, 102, 241, 0.03); }
.line-card.active { border-color: var(--primary); background: rgba(99, 102, 241, 0.06); }

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    text-align: center;
}
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text-primary); }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; font-weight: 500; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #ede9fe; color: #5b21b6; }
.badge-gray { background: #f1f5f9; color: #475569; }

.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1.25rem;
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease-out;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.type-forward { background: #dbeafe; color: #1e40af; }
.type-ivr { background: #fce7f3; color: #9d174d; }
.type-voice_ai { background: #ede9fe; color: #5b21b6; }
.type-voicemail { background: #d1fae5; color: #065f46; }

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
}
.toggle.active { background: var(--primary); }
.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.active::after { transform: translateX(20px); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    text-align: center;
}

.tab-bar {
    display: flex;
    background: #f1f5f9;
    border-radius: 0.75rem;
    padding: 0.25rem;
    gap: 0.25rem;
}
.tab-item {
    flex: 1;
    padding: 0.5rem 0.75rem;
    text-align: center;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}
.tab-item.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* ==================== iOS TOP BAR (large title) ==================== */
.top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(248, 248, 248, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--ios-separator);
}
.top-bar-inner {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    min-height: 44px;
}
.top-bar-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--ios-label);
    margin: 0;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}
.top-bar-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--ios-blue);
    color: white;
    font-weight: 600;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.top-bar-offset { padding-top: 60px; }
@supports (padding-top: env(safe-area-inset-top)) {
    .top-bar-offset { padding-top: calc(60px + env(safe-area-inset-top)); }
}

/* ==================== LINE SELECTOR (iOS pill) ==================== */
.line-selector-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: rgba(0, 122, 255, 0.12);
    border: none;
    border-radius: 999px;
    padding: 0.5rem 0.85rem 0.5rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ios-blue);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.line-selector-btn:active { background: rgba(0, 122, 255, 0.2); }
.line-selector-icon {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--ios-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.type-badge-sm {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    flex-shrink: 0;
}

.line-selector-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 0.375rem;
    background: white;
    border-radius: 0.875rem;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border);
    padding: 0.375rem;
    z-index: 1001;
    max-height: 320px;
    overflow-y: auto;
    animation: selectorSlideDown 0.2s ease-out;
}
@keyframes selectorSlideDown {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.line-selector-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: none;
    background: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    font-family: inherit;
}
.line-selector-item:hover { background: var(--bg-light); }
.line-selector-item.active {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
}
.line-selector-item.active .line-selector-item-icon {
    background: var(--primary) !important;
}

.line-selector-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.line-selector-item-icon.all {
    background: var(--gradient);
}
.line-selector-item-icon.inactive {
    background: #d1d5db;
}

.line-selector-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0.625rem;
}

/* ==================== VOICE ====================  */
.type-browser { background: #fef3c7; color: #92400e; }

.voice-dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.3s;
}
.voice-offline { background: #9ca3af; }
.voice-connecting { background: #fbbf24; animation: voicePulse 1.5s ease-in-out infinite; }
.voice-ready { background: #34d399; }
.voice-ringing { background: #60a5fa; animation: voicePulse 0.6s ease-in-out infinite; }
.voice-incall { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.3); }
.voice-error { background: #f87171; }

.voice-dot-ping {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #60a5fa;
    animation: voiceRingPing 1s ease-out infinite;
}

@keyframes voicePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}
@keyframes voiceRingPing {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.voice-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}
.voice-overlay-content {
    text-align: center;
    position: relative;
}
.voice-overlay-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    animation: overlayPulse 2s ease-in-out infinite;
}
@keyframes overlayPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.1; }
}

.voice-caller-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
    animation: callerBounce 1.2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}
@keyframes callerBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.voice-call-actions {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
}
.voice-btn-reject {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
}
.voice-btn-reject:hover { transform: scale(1.1); }
.voice-btn-accept {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    animation: acceptGlow 1.5s ease-in-out infinite;
}
.voice-btn-accept:hover { transform: scale(1.1); }
@keyframes acceptGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 4px 32px rgba(16, 185, 129, 0.8); }
}

.voice-active-bar {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 49;
    background: linear-gradient(135deg, #059669, #10b981);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
@supports (padding-top: env(safe-area-inset-top)) {
    .voice-active-bar { top: calc(56px + env(safe-area-inset-top)); }
}
.voice-active-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    animation: voicePulse 1s ease-in-out infinite;
}
.voice-bar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.voice-bar-btn:hover { background: rgba(255, 255, 255, 0.3); }
.voice-bar-btn-muted {
    background: rgba(239, 68, 68, 0.8) !important;
}
.voice-bar-btn-hangup {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.voice-bar-btn-hangup:hover { background: #dc2626; }

/* ==================== iOS TAB BAR ==================== */
.bottom-nav-v3 {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--ios-tabbar-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--ios-separator);
    z-index: 50;
}
.bottom-nav-v3-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 90px 1fr 1fr;
    align-items: end;
    padding: 0.25rem 0.25rem 0;
    min-height: 50px;
}
.nav-item-v3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.35rem 0.25rem 0.4rem;
    border: none;
    background: transparent;
    color: var(--ios-label-secondary);
    cursor: pointer;
    transition: color 0.15s;
    font-family: inherit;
}
.nav-item-v3:active { opacity: 0.6; }
.nav-item-v3.active { color: var(--ios-blue); }
.nav-item-v3 svg { width: 26px; height: 26px; stroke-width: 1.8; }
.nav-item-v3-label {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.nav-call-btn {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--ios-green);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 auto -4px;
    box-shadow: 0 4px 16px rgba(52, 199, 89, 0.4);
    transition: transform 0.15s, background 0.2s;
}
.nav-call-btn:active { transform: scale(0.92); }
.nav-call-btn svg { width: 30px; height: 30px; stroke-width: 2; }
.nav-call-btn.active { background: var(--ios-red); box-shadow: 0 4px 16px rgba(255, 59, 48, 0.45); }

/* ==================== iPhone DIALER ==================== */
.dialer-view {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ios-bg);
    padding-bottom: 70px;
}
.dialer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem 0.25rem;
}
.dialer-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--ios-surface-2);
    color: var(--ios-label);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.dialer-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.1rem;
}
.dialer-line-label { font-size: 0.7rem; color: var(--ios-label-secondary); font-weight: 500; }
.dialer-line-num { font-size: 0.85rem; font-weight: 600; color: var(--ios-blue); }

.dialer-screen {
    flex: 0 0 auto;
    padding: 1.5rem 1rem 0.5rem;
    text-align: center;
    min-height: 100px;
}
.dialer-number {
    font-size: 2.6rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--ios-label);
    word-break: break-all;
    line-height: 1.15;
}
.dialer-placeholder { color: var(--ios-label-tertiary); font-weight: 300; font-size: 1.5rem; }
.dialer-hint { color: var(--ios-label-secondary); font-size: 0.85rem; margin-top: 0.25rem; }

.dialer-keypad {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem 1.1rem;
    padding: 1rem 2rem;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
}
.dialer-key {
    aspect-ratio: 1;
    max-height: 78px;
    border-radius: 50%;
    background: rgba(142, 142, 147, 0.18);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: background 0.08s, transform 0.08s;
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.dialer-key:active { background: rgba(142, 142, 147, 0.45); transform: scale(0.96); }
.dialer-key-digit {
    font-size: 2.1rem;
    font-weight: 300;
    color: var(--ios-label);
    line-height: 1;
}
.dialer-key-letters {
    font-size: 0.6rem;
    color: var(--ios-label);
    font-weight: 600;
    letter-spacing: 0.22em;
    margin-top: 2px;
}

.dialer-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0.5rem 2rem 1rem;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
    gap: 1rem;
}
.dialer-call-btn {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: none;
    background: var(--ios-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    justify-self: center;
    transition: transform 0.1s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.dialer-call-btn:active { transform: scale(0.93); background: #28a745; }
.dialer-call-btn:disabled { background: rgba(142, 142, 147, 0.3); cursor: not-allowed; }
.dialer-call-btn svg { width: 32px; height: 32px; }
.dialer-backspace {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--ios-label);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    justify-self: end;
}
.dialer-backspace:disabled { color: var(--ios-label-tertiary); cursor: not-allowed; }
.dialer-status {
    text-align: center;
    font-size: 0.75rem;
    color: var(--ios-label-secondary);
    padding: 0.25rem;
}

/* ==================== MA LIGNE ==================== */
.myline-hero {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    padding: 1.5rem;
    color: white;
}
.myline-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    z-index: 0;
}
.myline-hero-content { position: relative; z-index: 1; }
.myline-hero-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
    font-weight: 600;
}
.myline-hero-number {
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 0.25rem;
    font-family: ui-monospace, monospace;
}
.myline-hero-desc {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.35rem;
}
.myline-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.myline-stat-val { font-size: 1.1rem; font-weight: 800; }
.myline-stat-lbl { font-size: 0.65rem; opacity: 0.8; margin-top: 0.15rem; }

.myline-action-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.myline-action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.myline-action-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.myline-action-label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }

/* ==================== WHATSAPP ==================== */
.wa-conv-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.wa-conv-item:hover { background: #f0fdf4; }
.wa-conv-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wa-unread {
    background: #25D366;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    flex-shrink: 0;
}
.wa-thread {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 64px;
    background: #ECE5DD;
}
.wa-thread-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.wa-thread-bg {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}
.wa-msg-row { display: flex; margin-bottom: 0.5rem; }
.wa-msg-row.out { justify-content: flex-end; }
.wa-msg-bubble {
    max-width: 75%;
    padding: 0.5rem 0.7rem 0.3rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.wa-msg-row.in .wa-msg-bubble { background: white; border-top-left-radius: 0; }
.wa-msg-row.out .wa-msg-bubble { background: #DCF8C6; border-top-right-radius: 0; }
.wa-msg-time { font-size: 0.62rem; color: #667781; text-align: right; margin-top: 0.15rem; }
.wa-compose {
    padding: 0.5rem 0.75rem;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-shrink: 0;
}
.wa-compose textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    font: inherit;
    font-size: 0.9rem;
    min-height: 40px;
    max-height: 100px;
    resize: none;
}
.wa-send-btn {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.55rem 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

/* ==================== BILLING ==================== */
.billing-balance {
    background: var(--gradient);
    border-radius: 1.25rem;
    padding: 1.5rem;
    color: white;
    text-align: center;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}
.billing-balance-label { font-size: 0.75rem; text-transform: uppercase; opacity: 0.85; font-weight: 600; letter-spacing: 0.08em; }
.billing-balance-val { font-size: 2.5rem; font-weight: 800; margin-top: 0.35rem; }
.billing-balance-hint { font-size: 0.8rem; opacity: 0.85; margin-top: 0.4rem; }

.billing-recharge-btn {
    padding: 0.85rem 0.5rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
    font-family: inherit;
}
.billing-recharge-btn:hover { border-color: var(--primary); background: rgba(99, 102, 241, 0.05); }
.billing-recharge-btn:disabled { opacity: 0.5; cursor: not-allowed; }
