* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f8f9fa; min-height: 100vh; color: #333; font-size: 13px; }
.app-container { max-width: 100%; padding: 10px; }
.panel { background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 10px; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.panel h2, .panel h3 { margin-bottom: 10px; color: #1e293b; font-size: 14px; font-weight: 600; }
.form-group { margin-bottom: 8px; }
.form-group label { display: block; margin-bottom: 3px; font-size: 11px; color: #64748b; font-weight: 500; }
.form-group input { width: 100%; padding: 6px 8px; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: #334155; font-size: 12px; }
.form-group input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.1); }
.btn-primary, .btn-action, .btn-small, .btn-click-to-call { width: 100%; padding: 8px; border: none; border-radius: 6px; cursor: pointer; font-size: 12px; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; }
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-click-to-call { background: #10b981; color: #fff; margin-bottom: 10px; padding: 10px; font-size: 13px; }
.btn-click-to-call:hover:not(:disabled) { background: #059669; }
.btn-click-to-call:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-action { height: 44px; font-size: 13px; }
.btn-call { background: #10b981; color: #fff; }
.btn-call:hover { background: #059669; }
.btn-hangup { background: #ef4444; color: #fff; }
.btn-hangup:hover { background: #dc2626; }
.btn-small { width: auto; padding: 4px 8px; font-size: 11px; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.status { text-align: center; margin-top: 8px; padding: 4px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.status.connected { background: #d1fae5; color: #065f46; }
.status.disconnected { background: #fee2e2; color: #991b1b; }
.status.connecting { background: #fef3c7; color: #92400e; }
.hidden { display: none !important; }
.contact-info-panel { background: #f1f5f9; border-radius: 6px; padding: 10px; margin-bottom: 10px; border: 1px solid #e2e8f0; }
.empty-contact { display: flex; align-items: center; gap: 8px; color: #94a3b8; font-size: 12px; }
.contact-card { display: flex; align-items: center; gap: 10px; }
.contact-avatar { width: 36px; height: 36px; border-radius: 50%; background: #3b82f6; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.contact-details { flex: 1; min-width: 0; }
.contact-name { font-weight: 600; color: #1e293b; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-phone, .contact-email { font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-phone i, .contact-email i { margin-right: 4px; font-size: 10px; }
.phone-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
.status-wrapper { display: flex; align-items: center; gap: 6px; }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.status-indicator.connected { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.4); }
#status-text { font-size: 12px; font-weight: 500; color: #475569; }
.display { display: flex; gap: 6px; margin-bottom: 8px; }
.display input { flex: 1; padding: 10px; font-size: 16px; text-align: center; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: #1e293b; font-weight: 600; }
.btn-icon { padding: 0 10px; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; color: #64748b; cursor: pointer; font-size: 12px; }
.btn-icon:hover { background: #e2e8f0; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.key { aspect-ratio: 1.4; border: none; border-radius: 6px; background: #f8fafc; color: #334155; font-size: 16px; cursor: pointer; transition: all 0.15s; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 500; border: 1px solid #e2e8f0; }
.key span { font-size: 8px; color: #94a3b8; margin-top: 1px; font-weight: 400; }
.key:hover { background: #f1f5f9; border-color: #cbd5e1; }
.key:active { background: #e2e8f0; transform: scale(0.97); }
.actions { display: flex; gap: 6px; margin-bottom: 8px; }
.actions .btn-action { flex: 1; }
.call-controls { display: flex; justify-content: space-around; margin-bottom: 8px; }
.btn-control { width: 36px; height: 36px; border-radius: 50%; border: none; background: #f1f5f9; color: #64748b; font-size: 13px; cursor: pointer; transition: all 0.2s; border: 1px solid #e2e8f0; }
.btn-control:hover { background: #e2e8f0; }
.btn-control.active { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.call-list { max-height: 150px; overflow-y: auto; }
.call-item { display: flex; align-items: center; padding: 6px; border-radius: 4px; margin-bottom: 3px; background: #f8fafc; border: 1px solid #f1f5f9; }
.call-item.incoming { border-left: 2px solid #10b981; }
.call-item.outgoing { border-left: 2px solid #3b82f6; }
.call-item.missed { border-left: 2px solid #ef4444; }
.call-item .icon { margin-right: 6px; font-size: 10px; width: 16px; text-align: center; }
.call-item .call-details { flex: 1; min-width: 0; }
.call-item .number { font-size: 12px; font-weight: 500; color: #334155; }
.call-item .contact-name { font-size: 10px; color: #64748b; }
.call-item .time { font-size: 10px; color: #94a3b8; white-space: nowrap; }
.call-item .actions { display: flex; gap: 3px; margin: 0; }
.call-item .actions button { padding: 3px 5px; border: none; border-radius: 3px; cursor: pointer; font-size: 10px; background: #3b82f6; color: #fff; }
.empty { text-align: center; color: #94a3b8; padding: 15px; font-size: 12px; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
