@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.15);
    --secondary: #475569;
    --secondary-glow: rgba(71, 85, 105, 0.15);
    --text-main: #f8fafc;
    --text-muted: #64748b;
    --border-color: #334155;
    --glass-bg: #1e293b;
    
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #ca8a04;
    --info: #0284c7;

    --border-radius: 6px;
    --border-radius-sm: 4px;
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: none; /* Remoção de gradientes neon flutuantes */
}

/* Flat Professional Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}
.card:hover {
    border-color: #475569;
    transform: none;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

/* Navbar */
.navbar {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* Layout Administrativo */
.admin-container {
    display: flex;
    flex: 1;
    height: calc(100vh - 70px);
}
.sidebar {
    width: 260px;
    background: var(--glass-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 1rem 1.5rem;
    text-align: left;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}
.sidebar-btn.active {
    background: rgba(37, 99, 235, 0.12);
    color: #3b82f6;
    border-left: 3px solid var(--primary);
}
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}
.tab-content.active {
    display: block;
}

/* Botões Modernos e Planos */
.btn {
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
}
.btn-primary {
    background: var(--primary);
    box-shadow: none;
}
.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: none;
}
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.btn-warning { background: var(--warning); color: #000; }
.btn-success:hover, .btn-danger:hover, .btn-warning:hover { filter: brightness(0.9); }

/* Inputs e Formulários */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}
input, select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-main);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}
input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
}
select option {
    background: var(--bg-secondary);
    color: var(--text-main);
}

/* Tabelas Neumórficas */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 1rem;
}
th, td {
    padding: 1rem;
    text-align: left;
}
th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}
tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}
tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.01);
}
tbody td:first-child { border-top-left-radius: var(--border-radius-sm); border-bottom-left-radius: var(--border-radius-sm); }
tbody td:last-child { border-top-right-radius: var(--border-radius-sm); border-bottom-right-radius: var(--border-radius-sm); }

/* Badges e Status */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-offline { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); border: 1px solid var(--text-muted); }
.badge-online { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid var(--success); }
.badge-call { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid var(--danger); box-shadow: 0 0 10px rgba(239,68,68,0.3); animation: pulseRed 2s infinite; }
.badge-wait { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid var(--warning); }
.badge-pause { background: rgba(59, 130, 246, 0.1); color: var(--info); border: 1px solid var(--info); }

/* Dashboard Cards (Grid) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    text-align: center;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.stat-title {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-shadow: 0 2px 10px rgba(255,255,255,0.1);
}

/* Screen Pop Animation */
#screenPop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    background: linear-gradient(135deg, rgba(13,20,35,0.97), rgba(20,25,45,0.97));
    border: 1px solid var(--primary);
    box-shadow: 0 10px 40px var(--primary-glow);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: none;
    z-index: 1000;
    cursor: pointer;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}
#screenPop.active {
    display: block;
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
#screenPop.active.dismissing {
    animation: slideDown 0.4s ease-in forwards;
}
/* Barra de progresso que indica quanto tempo falta para sumir */
#screenPop.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    animation: screenPopProgress 10s linear forwards;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}
#screenPop.active.dismissing::after {
    animation: none;
    opacity: 0;
}
@keyframes screenPopProgress {
    from { width: 100%; }
    to { width: 0%; }
}
@keyframes slideDown {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(30px); opacity: 0; }
}
#screenPop h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(0,210,255,0.2);
    padding-bottom: 0.5rem;
}
#screenPop p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
#screenPop strong { color: #fff; }

/* Modal genérico */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}
.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-radius: var(--border-radius);
    width: 400px;
    max-width: 90%;
    padding: 2rem;
    animation: slideUp 0.4s ease;
}

/* Tela de Login */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: radial-gradient(circle at center, var(--bg-secondary), var(--bg-color));
}
.login-box {
    width: 400px;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}
.login-box::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, var(--primary), transparent 30%);
    animation: rotate 4s linear infinite;
    z-index: -1;
    opacity: 0.15;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    min-width: 250px;
    animation: slideInRight 0.3s ease forwards;
    font-weight: 500;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }

/* Animações */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes rotate { 100% { transform: rotate(360deg); } }

/* Client Card — Active Call States */
.client-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 210, 255, 0.12);
    animation: fadeIn 0.4s ease;
    transition: var(--transition);
}
.client-card.ringing {
    border-color: var(--info);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
    animation: fadeIn 0.4s ease, cardPulse 2s infinite;
}
.client-card.ura {
    border-color: var(--warning);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.2);
}
.client-card.active {
    border-color: var(--success);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.25);
}
.client-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.08), rgba(122, 34, 255, 0.08));
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.client-card.ringing .client-card-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(0, 210, 255, 0.08));
}
.client-card.ura .client-card-header {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(234, 88, 12, 0.06));
}
.client-card.active .client-card-header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.06));
}
.client-card-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}
.client-card.ringing .client-card-status { color: var(--info); }
.client-card.ura .client-card-status { color: var(--warning); }
.client-card.active .client-card-status { color: var(--success); }
.client-card-timer {
    font-family: 'Inter', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
}
.client-card.ringing .client-card-timer { color: var(--info); }
.client-card.ura .client-card-timer { color: var(--warning); }
.client-card.active .client-card-timer { color: var(--success); }
.client-card-body {
    padding: 1.5rem;
}
.client-card-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    text-align: center;
    letter-spacing: -0.3px;
}
.client-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.client-info-item {
    background: rgba(0,0,0,0.25);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}
.client-info-item:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.35);
}
.client-info-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.35rem;
    font-weight: 600;
}
.client-info-value {
    display: block;
    font-size: 1rem;
    color: #fff;
    font-weight: 500;
    font-family: 'Inter', monospace;
    letter-spacing: 0.3px;
}
.client-card-actions {
    padding: 0.75rem 1.5rem 1rem;
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.1);
}

@keyframes cardPulse {
    0% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.2); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.35); }
    100% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.2); }
}

/* =========================================
   NEXUS PRO - SPA Layout (Agent Receptivo)
========================================= */
.nexus-app { display: flex; height: 100vh; width: 100vw; overflow: hidden; }
.nexus-sidebar {
    width: 250px; background: var(--bg-secondary); border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; transition: var(--transition); z-index: 100;
}
.nexus-sidebar.collapsed { width: 70px; }
.nexus-sidebar.collapsed .nav-text, .nexus-sidebar.collapsed .logo-text { display: none; }
.nexus-sidebar-header {
    height: 70px; display: flex; align-items: center; padding: 0 20px;
    border-bottom: 1px solid var(--border-color); gap: 12px;
}
.nexus-sidebar-header .logo-icon {
    width: 36px; height: 36px; background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: white;
}
.nexus-sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.nexus-sidebar-nav .nav-item {
    display: flex; align-items: center; padding: 12px 20px; color: var(--text-muted);
    cursor: pointer; transition: var(--transition); text-decoration: none; gap: 15px; font-size: 0.95rem;
}
.nexus-sidebar-nav .nav-item:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.nexus-sidebar-nav .nav-item.active {
    color: var(--primary); background: rgba(0, 210, 255, 0.1);
    border-right: 3px solid var(--primary);
}
.nexus-sidebar-footer { padding: 15px; border-top: 1px solid var(--border-color); }
.nexus-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.nexus-topbar {
    height: 60px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between; padding: 0 2rem;
}
.nexus-topbar .topbar-right { display: flex; align-items: center; gap: 15px; }
.nexus-topbar .status-dot {
    width: 10px; height: 10px; border-radius: 50%; transition: var(--transition);
}
.nexus-topbar .status-dot.online { background: var(--success); box-shadow: 0 0 10px var(--success); }
.nexus-topbar .status-dot.paused { background: var(--warning); box-shadow: 0 0 10px var(--warning); }
.nexus-topbar .user-profile { display: flex; align-items: center; gap: 10px; }
.nexus-topbar .avatar {
    width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: white;
}
.nexus-viewport { flex: 1; padding: 2rem; overflow-y: auto; position: relative; }
.view-enter { animation: fadeIn 0.4s ease forwards; }

/* Botões extras */
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* Dashboard Cards */
.dashboard-wrapper { max-width: 900px; margin: 3rem auto 0; padding: 0 1rem; animation: fadeIn 0.5s ease; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.dash-card {
    background: var(--glass-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm);
    padding: 1.5rem; display: flex; align-items: center; gap: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: var(--transition);
}
.dash-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); }
.dash-icon { font-size: 2.2rem; }
.dash-info { text-align: left; }
.dash-info h4 { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; margin-bottom: 0.2rem; }
.dash-info span { font-size: 1.7rem; font-weight: 700; color: var(--text-main); }

/* History Table */
.dash-history {
    background: var(--glass-bg); border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm); padding: 1.5rem; box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.dash-history h3 { margin-bottom: 1.2rem; text-align: left; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.history-table { width: 100%; border-collapse: collapse; text-align: left; }
.history-table th, .history-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border-color); }
.history-table th { color: var(--text-muted); font-weight: 500; text-transform: uppercase; font-size: 0.8rem; }
.history-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.history-table td { color: var(--text-main); }

/* CRM Data Cards */
.crm-container { display: flex; flex-direction: column; gap: 0.8rem; }
.crm-section { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 6px; padding: 0.8rem; }
.crm-header { font-weight: 600; font-size: 0.9rem; color: var(--primary); margin-bottom: 0.6rem; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 8px; }
.crm-grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; }
.crm-data-card { background: rgba(0,0,0,0.2); padding: 0.5rem 0.7rem; border-radius: 4px; display: flex; flex-direction: column; gap: 2px; }
.crm-data-label { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
.crm-data-value { font-size: 0.9rem; color: var(--text-main); font-weight: 500; word-break: break-all; }

/* Atendimento Layout */
.atendimento-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; margin-top: 1rem; }
.atendimento-layout.hide-script { grid-template-columns: 1fr; }
.atendimento-layout.hide-script .script-box { display: none; }
.script-box {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm); padding: 1rem; overflow-y: auto; max-height: 70vh;
}

/* Wrap-up / Tabulação Modal */
.wrapup-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 10000; justify-content: center; align-items: center; }
.wrapup-overlay.active { display: flex; }
.wrapup-modal { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 2rem; max-width: 550px; width: 90%; }
.wrapup-header { text-align: center; margin-bottom: 1.5rem; }
.wrapup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-tabulacao {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 1.5rem; border: 2px solid var(--border-color); border-radius: var(--border-radius-sm);
    cursor: pointer; background: transparent; color: var(--text-main); font-size: 1rem;
    transition: var(--transition);
}
.btn-tabulacao i { font-size: 1.8rem; }
.btn-tabulacao:hover { transform: scale(1.03); }
.btn-tab-venda:hover { border-color: var(--success); background: rgba(16,185,129,0.15); }
.btn-tab-retorno:hover { border-color: var(--warning); background: rgba(245,158,11,0.15); }
.btn-tab-muda:hover { border-color: var(--text-muted); background: rgba(148,163,184,0.1); }
.btn-tab-lixo:hover { border-color: var(--danger); background: rgba(239,68,68,0.15); }
.wrapup-retorno-box { display: none; margin-top: 1rem; padding: 1rem; background: rgba(0,0,0,0.3); border-radius: var(--border-radius-sm); }
.wrapup-retorno-box.active { display: block; }

/* Softphone Widget */
.sp-widget-wrapper { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.softphone-container {
    width: 280px; background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: var(--transition);
}
.softphone-container.collapsed { width: 0; height: 0; opacity: 0; pointer-events: none; overflow: hidden; border: none; }
.sp-header { padding: 1rem; text-align: center; border-bottom: 1px solid var(--border-color); }
.sp-status { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.75rem; margin-bottom: 8px; color: var(--text-muted); }
.sp-status.registered { color: var(--success); }
.sp-status.in-call { color: var(--danger); }
.sp-number-display { font-size: 1.5rem; font-weight: 700; color: var(--text-main); min-height: 35px; letter-spacing: 2px; }
.sp-call-state { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.sp-numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0.5rem; }
.sp-btn-num {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 10px; border-radius: var(--border-radius-sm); cursor: pointer; background: rgba(255,255,255,0.05);
    transition: var(--transition);
}
.sp-btn-num:hover { background: rgba(255,255,255,0.1); }
.sp-num { font-size: 1.3rem; font-weight: 600; }
.sp-letters { font-size: 0.6rem; color: var(--text-muted); }
.sp-controls { display: flex; justify-content: center; gap: 12px; padding: 0.8rem; }
.sp-btn-action {
    width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: var(--transition);
}
.sp-btn-call { background: var(--success); color: white; }
.sp-btn-hangup { background: var(--danger); color: white; }
.sp-btn-mute { background: rgba(255,255,255,0.1); color: var(--text-muted); }
.sp-btn-mute.active { background: var(--warning); color: #111; }
.sp-floating-btn {
    width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white; font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(0,210,255,0.3); transition: var(--transition);
}
.sp-floating-btn:hover { transform: scale(1.1); }

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Glassmorphic input focus */
input, select, textarea {
    outline: none;
    transition: var(--transition);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px var(--primary-glow) !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .admin-container { flex-direction: column; height: auto; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 1rem; }
    .sidebar-btn { padding: 0.5rem 1rem; }
    .main-content { padding: 1rem; }
    .client-info-grid { grid-template-columns: 1fr; }
}
