/* === IPBXIT Client UC — Effet Waou Premium === */

/* --- GLASSMORPHISM CARDS --- */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
}

/* --- ANIMATED GRADIENT BACKGROUND --- */
.gradient-bg {
    background: linear-gradient(-45deg, #0D1117, #1a1a3e, #0f2027, #162447);
    background-size: 400% 400%;
    animation: gradientFlow 30s ease infinite;
}
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- KPI COUNTER ANIMATION --- */
.kpi-value {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-top: 4px;
}
.kpi-card {
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.kpi-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* --- PULSE ANIMATION FOR ACTIVE CALLS --- */
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}
.pulse-active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--call-active);
    transform: translate(-50%, -50%);
    z-index: 1;
}
.pulse-active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--call-active);
    transform: translate(-50%, -50%);
    animation: pulse-ring 1.5s ease-out infinite;
}

/* --- SMOOTH SLIDE ANIMATIONS --- */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeInScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.animate-slide-right { animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.animate-slide-up { animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.animate-fade-scale { animation: fadeInScale 0.2s ease-out; }

/* --- ENHANCED SCREEN POP --- */
.screen-pop-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 24px;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.screen-pop-card {
    background: transparent;
    border: none;
    box-shadow: none;
}
.screen-pop-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.screen-pop-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}
.screen-pop-company {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Screen pop recent calls section */
.screen-pop-recent {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.screen-pop-recent-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}
.screen-pop-recent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}
.screen-pop-recent-item .direction-icon {
    width: 20px;
    text-align: center;
}
.screen-pop-recent-item .direction-in { color: #4CAF50; }
.screen-pop-recent-item .direction-out { color: #2196F3; }
.screen-pop-recent-item .direction-missed { color: #F44336; }

/* --- CALL TIMER COLORS --- */
.call-timer {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    transition: color 0.5s ease;
}
.call-timer.warning { color: var(--warning); }
.call-timer.danger { color: var(--danger); animation: pulse-text 1s ease-in-out infinite; }
@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* --- DRAG TO TRANSFER FEEDBACK --- */
.colleague-drop-target {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.colleague-drop-target.drag-over {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--primary), 0 8px 24px rgba(229, 57, 53, 0.3);
    border-radius: 12px;
}
.colleague-drop-target.drag-over::after {
    content: 'Transferer';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

/* --- RADIAL MENU --- */
.radial-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}
.radial-menu {
    position: fixed;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}
.radial-item {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: var(--shadow-md);
    animation: fadeInScale 0.2s ease-out backwards;
}
.radial-item:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.15);
}
.radial-item:nth-child(1) { top: 0; left: 50%; transform: translate(-50%, 0); animation-delay: 0s; }
.radial-item:nth-child(2) { top: 50%; right: 0; transform: translate(0, -50%); animation-delay: 0.05s; }
.radial-item:nth-child(3) { bottom: 0; left: 50%; transform: translate(-50%, 0); animation-delay: 0.1s; }
.radial-item:nth-child(4) { top: 50%; left: 0; transform: translate(0, -50%); animation-delay: 0.15s; }

/* --- STATUS BADGES PREMIUM --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.status-badge.vip { background: linear-gradient(135deg, #FFD700, #FFA000); color: #000; }
.status-badge.prospect { background: rgba(33, 150, 243, 0.15); color: #2196F3; }
.status-badge.client { background: rgba(76, 175, 80, 0.15); color: #4CAF50; }

/* --- KEYBOARD SHORTCUTS OVERLAY --- */
.shortcuts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInScale 0.2s ease-out;
}
.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 600px;
    padding: 24px;
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.shortcut-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}
.shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.shortcut-desc {
    font-size: 0.8rem;
    color: var(--text-primary);
}
