/* CSS - Pizzaria Requinte Multichannel Customer Service Platform */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #0c0d12;
    --bg-card: #141620;
    --bg-card-hover: #1c1e2d;
    --bg-input: #1b1d2a;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary-color: #ff5e36; /* Pizza Orange */
    --primary-hover: #ff7552;
    --secondary-color: #ffb830; /* Gold Yellow */
    --whatsapp-color: #10b981; /* WhatsApp Emerald */
    --whatsapp-dark: #064e3b;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-accent: 0 0 15px rgba(255, 94, 54, 0.3);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Header */
header {
    background: linear-gradient(135deg, #131522 0%, #1e1b29 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    box-shadow: var(--shadow-md);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.logo-section h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-section span {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.simulator-time-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.time-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-picker-wrapper select,
.time-picker-wrapper input {
    background: var(--bg-input);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 6px;
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.time-badge {
    background: rgba(255, 94, 54, 0.15);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.agent-selector {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3px;
}

.agent-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.agent-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 94, 54, 0.25);
}

.status-indicator {
    width: 6px;
    height: 6px;
    background: var(--whatsapp-color);
    border-radius: 50%;
    display: inline-block;
}

.btn-reset {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-reset:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* App Layout */
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 65px);
}

/* Left Side: Agent Workspace */
.agent-workspace {
    flex: 7;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background: var(--bg-main);
    overflow: hidden;
}

/* Navigation Tabs */
.workspace-tabs {
    display: flex;
    padding: 10px 24px 0 24px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
}

.tab-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.tab-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(255, 94, 54, 0.04);
}

/* Content Areas */
.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

/* Chat Tab Layout */
.chat-tab-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Chat Sidebar (Queue) */
.chat-sidebar {
    width: 320px;
    border-right: 1px solid var(--border-color);
    background: rgba(20, 22, 32, 0.6);
    display: flex;
    flex-direction: column;
}

.queue-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.queue-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    text-align: center;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
    position: relative;
}

.queue-tab:hover {
    color: var(--text-main);
}

.queue-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.queue-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary-color);
    color: white;
    font-size: 9px;
    font-weight: 800;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.queue-badge.empty {
    display: none;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.chat-card {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.chat-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.chat-card.active {
    background: rgba(255, 94, 54, 0.06);
    border-left: 3px solid var(--primary-color);
}

.chat-avatar-wrapper {
    position: relative;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.channel-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 10px;
    background: var(--bg-main);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.chat-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.chat-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-last-msg {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.chat-unread-badge {
    background: var(--whatsapp-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.tag-scheduled {
    background: rgba(255, 184, 48, 0.15);
    color: var(--secondary-color);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.empty-state-list {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Chat Main Area */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(12, 13, 18, 0.95);
    position: relative;
    border-right: 1px solid var(--border-color);
}

.chat-window-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.chat-placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.chat-window-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-active-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.active-user-details h3 {
    font-size: 15px;
    font-weight: 700;
}

.active-user-details p {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.btn-action {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-action:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.15);
}

.btn-action.btn-primary {
    background: var(--primary-color);
    border-color: transparent;
}

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

.btn-action.btn-success {
    background: var(--whatsapp-color);
    border: none;
}

.btn-action.btn-success:hover {
    background: #059669;
}

/* Chat Messages */
.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: radial-gradient(circle at top left, #12131b, #0c0d12);
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.message-wrapper.client {
    align-self: flex-start;
}

.message-wrapper.agent,
.message-wrapper.bot {
    align-self: flex-end;
}

.message-wrapper.system {
    align-self: center;
    max-width: 90%;
    margin: 8px 0;
}

.message-meta {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 2px;
    padding: 0 4px;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-word;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.client .message-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-top-left-radius: 2px;
}

.agent .message-bubble {
    background: var(--primary-color);
    color: white;
    border-top-right-radius: 2px;
}

.bot .message-bubble {
    background: var(--whatsapp-dark);
    color: var(--text-main);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-top-right-radius: 2px;
}

.system .message-bubble {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    text-align: center;
}

.message-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
}

.client .message-info {
    color: var(--text-muted);
}

/* Chat Input bar */
.chat-window-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.canned-responses-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.quick-reply-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.quick-reply-pill:hover {
    color: var(--primary-color);
    border-color: rgba(255, 94, 54, 0.3);
    background: rgba(255, 94, 54, 0.05);
}

.chat-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-row textarea {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    resize: none;
    height: 40px;
    outline: none;
    line-height: 1.4;
    transition: var(--transition-smooth);
}

.chat-input-row textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 94, 54, 0.15);
}

.btn-send {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition-smooth);
}

.btn-send:hover {
    background: var(--primary-hover);
    transform: scale(1.03);
}

/* Order Panel (Right Side of Chat Window) */
.order-side-panel {
    width: 280px;
    background: rgba(20, 22, 32, 0.8);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 16px;
    gap: 16px;
}

.panel-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: white;
    padding: 8px 10px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    outline: none;
}

.form-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    align-self: flex-start;
}

.form-row-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.order-items-list {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;
}

.order-item-tag {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.order-total-badge {
    background: rgba(255, 94, 54, 0.1);
    border: 1px solid rgba(255, 94, 54, 0.2);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}

.order-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-track {
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--secondary-color);
    border-radius: 3px;
    width: 0%;
    transition: width 0.4s ease;
}

.order-status-lbl {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
}

/* Config Tab */
.config-tab-container {
    padding: 24px;
    width: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.config-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    max-width: 800px;
}

.config-header {
    margin-bottom: 18px;
}

.config-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

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

.operating-hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

.operating-hours-table th,
.operating-hours-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.operating-hours-table th {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

.operating-hours-table td {
    font-size: 13px;
}

.operating-hours-table select,
.operating-hours-table input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    outline: none;
    font-family: var(--font-sans);
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #374151;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--whatsapp-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Dashboard / Metrics Tab */
.metrics-tab-container {
    padding: 24px;
    width: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.stat-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    opacity: 0.4;
}

.stat-box.whatsapp-1::after { background: var(--whatsapp-color); }
.stat-box.whatsapp-2::after { background: #3b82f6; }
.stat-box.sales::after { background: var(--secondary-color); }

.stat-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

.stat-lbl {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.reports-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
}

.report-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    color: var(--text-main);
}

.metrics-bar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 500;
}

.bar-track {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    width: 0%;
    transition: width 0.6s ease;
}

/* Right Side: Client Simulator (Cell Phone) */
.client-simulator {
    flex: 3;
    background: #07080b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-width: 320px;
}

.phone-mockup {
    width: 100%;
    max-width: 330px;
    height: 600px;
    background: #0f1015;
    border: 8px solid #282a36;
    border-radius: 36px;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.phone-notch {
    width: 120px;
    height: 18px;
    background: #282a36;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
}

.phone-header {
    background: #075e54; /* Classic WA color */
    padding: 22px 14px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.client-status-title {
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.phone-select-row {
    display: flex;
    gap: 6px;
}

.phone-select-row select {
    flex: 1;
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 11px;
    outline: none;
    font-family: var(--font-sans);
}

.phone-select-row select option {
    background: #075e54;
    color: white;
}

.phone-chat-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.phone-wa-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.phone-chat-user h4 {
    font-size: 12.5px;
    font-weight: 700;
}

.phone-chat-user p {
    font-size: 9.5px;
    opacity: 0.8;
}

/* Phone Screen Messages */
.phone-screen {
    flex: 1;
    background-color: #efeae2; /* WhatsApp chat wallpaper background */
    background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 0);
    background-size: 12px 12px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phone-msg {
    max-width: 85%;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    position: relative;
    word-break: break-word;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.phone-msg.out {
    align-self: flex-end;
    background-color: #d9fdd3; /* WA Sent bubble */
    color: #111b21;
    border-top-right-radius: 0;
}

.phone-msg.in {
    align-self: flex-start;
    background-color: #ffffff; /* WA Received bubble */
    color: #111b21;
    border-top-left-radius: 0;
}

.phone-msg-time {
    display: block;
    text-align: right;
    font-size: 8px;
    color: #667781;
    margin-top: 2px;
}

/* Phone Input */
.phone-footer {
    background: #f0f2f5;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid #e1e3e6;
}

.phone-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.btn-shortcut {
    background: white;
    border: 1px solid #d1d3d6;
    color: #3b3b3b;
    padding: 4px 2px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.btn-shortcut:hover {
    background: #e9ebeb;
    border-color: #b1b3b6;
}

.phone-input-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.phone-input-row input {
    flex: 1;
    background: white;
    border: 1px solid #e1e3e6;
    border-radius: 18px;
    padding: 6px 12px;
    font-size: 12px;
    outline: none;
    color: #333;
}

.btn-phone-send {
    background: #00a884;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.btn-phone-send:hover {
    background: #008f72;
}

/* New Client Modal/Trigger */
.new-client-box {
    width: 100%;
    max-width: 330px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.new-client-box h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary-color);
}

.new-client-inputs {
    display: flex;
    gap: 6px;
}

.new-client-inputs input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 11px;
    outline: none;
    flex: 1;
}

.btn-add-client {
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

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

/* Alert system */
.audio-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}
