:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fdba74;
    --secondary: #1f2937;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --bg-primary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.5; }

/* Sidebar */
.tb-sidebar {
    width: 260px; min-height: 100vh; background: #ffffff;
    border-right: 1px solid var(--border-color); display: flex;
    flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0;
    z-index: 30; overflow-y: auto;
}
.tb-sidebar-logo {
    padding: 20px 20px 16px; display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--border-color);
}
.tb-sidebar-logo-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px;
}
.tb-sidebar-logo-text { font-size: 16px; font-weight: 800; color: var(--secondary); }
.tb-sidebar-logo-text span { color: var(--primary); }

.tb-sidebar-search {
    display: flex; align-items: center; gap: 8px; margin: 0 12px 8px;
    padding: 8px 12px; border-radius: 10px; cursor: pointer;
    background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.15s;
}
.tb-sidebar-search:hover { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); }

.tb-sidebar-nav { flex: 1; padding: 12px; }
.tb-sidebar-section { margin-bottom: 16px; }
.tb-sidebar-section-title {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-muted); padding: 0 12px;
    margin-bottom: 4px;
}
.tb-nav-item {
    padding: 9px 12px; margin: 2px 0; border-radius: var(--radius-lg);
    cursor: pointer; transition: all 0.15s; display: flex;
    align-items: center; font-weight: 500; color: #64748B; font-size: 13px;
    text-decoration: none; gap: 10px;
}
.tb-nav-item:hover { background: rgba(249, 115, 22, 0.08); color: var(--primary); }
.tb-nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}
.tb-nav-icon { width: 20px; text-align: center; font-size: 14px; flex-shrink: 0; }
.tb-nav-badge {
    margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px;
    background: var(--danger); color: white; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; padding: 0 6px;
}
.tb-nav-item.active .tb-nav-badge { background: rgba(255,255,255,0.3); }

.tb-sidebar-footer {
    padding: 16px; border-top: 1px solid var(--border-color);
}
.tb-sidebar-user {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    border-radius: var(--radius-lg); cursor: pointer; transition: background 0.15s;
}
.tb-sidebar-user:hover { background: #f3f4f6; }
.tb-sidebar-user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: white; flex-shrink: 0;
}
.tb-sidebar-user-info { flex: 1; min-width: 0; }
.tb-sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sidebar-user-role { font-size: 11px; color: var(--text-muted); }

/* Main content area */
.tb-main { margin-left: 260px; min-height: 100vh; width: calc(100% - 260px); }
.tb-content { padding: 24px; width: 100%; }

/* Page header */
.tb-page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.tb-page-title { font-size: 22px; font-weight: 800; color: var(--secondary); }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; padding: 0.6rem 1.25rem; border-radius: var(--radius-lg);
    font-weight: 600; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    transition: all 0.2s; border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.5rem; font-size: 13px;
    font-family: inherit;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35); }
.btn-secondary {
    background: #F3F4F6; color: var(--secondary); padding: 0.6rem 1.25rem;
    border-radius: var(--radius-lg); transition: all 0.2s; border: none;
    cursor: pointer; font-weight: 500; display: inline-flex;
    align-items: center; gap: 0.5rem; font-size: 13px; font-family: inherit;
}
.btn-secondary:hover { background: #E5E7EB; }
.btn-danger {
    background: var(--danger); color: white; padding: 0.6rem 1.25rem;
    border-radius: var(--radius-lg); transition: all 0.2s; border: none;
    cursor: pointer; font-weight: 500; font-size: 13px; font-family: inherit;
}
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 12px; }
.btn-icon {
    width: 36px; height: 36px; border-radius: var(--radius-lg); border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; font-size: 14px; background: #f3f4f6; color: #6b7280;
}
.btn-icon:hover { background: #e5e7eb; color: #374151; }

/* Cards */
.card {
    background: var(--bg-card); border-radius: var(--radius-xl);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}
.card-header {
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); font-weight: 600;
}
.card-body { padding: 1.5rem; }

/* Status badges */
.status-badge {
    padding: 0.2rem 0.65rem; border-radius: 9999px; font-size: 11px;
    font-weight: 600; display: inline-flex; align-items: center; gap: 0.25rem;
}
.status-pending { background: #fef3c7; color: #d97706; }
.status-searching { background: #ede9fe; color: #7c3aed; }
.status-accepted, .status-driver_arriving { background: #dbeafe; color: #1d4ed8; }
.status-in_progress { background: #d1fae5; color: #059669; }
.status-completed { background: #f3f4f6; color: #374151; }
.status-cancelled { background: #fee2e2; color: #dc2626; }
.status-active, .status-approved { background: #d1fae5; color: #059669; }
.status-inactive, .status-disabled { background: #f3f4f6; color: #6b7280; }
.status-available { background: #d1fae5; color: #059669; }
.status-busy { background: #fef3c7; color: #d97706; }
.status-offline { background: #f3f4f6; color: #6b7280; }

/* Inputs */
.input-field {
    width: 100%; padding: 0.6rem 0.875rem; border: 2px solid var(--border-color);
    border-radius: var(--radius-lg); font-size: 13px; transition: all 0.2s;
    background: white; font-family: inherit;
}
.input-field:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
    padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-color);
}
.data-table th { font-weight: 600; color: var(--text-secondary); background: #f9fafb; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.data-table tbody tr { cursor: pointer; transition: background 0.1s; }
.data-table tbody tr:hover { background: #f9fafb; }

/* Stat cards */
.stat-card {
    background: white; border-radius: var(--radius-xl); padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}
.stat-card-value { font-size: 28px; font-weight: 800; color: var(--secondary); }
.stat-card-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-card-icon {
    width: 48px; height: 48px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 20px;
}

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 50; backdrop-filter: blur(4px); animation: fadeIn 0.2s;
}
.modal-content {
    background: white; border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25); width: 90%;
    max-width: 600px; max-height: 90vh; display: flex;
    flex-direction: column; animation: scaleIn 0.2s;
}
.modal-header {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: 1rem 1.5rem; border-top: 1px solid var(--border-color);
    display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* Tabs */
.tb-tabs {
    display: flex; border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px; gap: 0; flex-wrap: wrap;
}
.tb-tab {
    padding: 10px 16px; font-size: 13px; font-weight: 600;
    color: var(--text-muted); border-bottom: 2px solid transparent;
    margin-bottom: -2px; cursor: pointer; transition: all 0.15s;
    white-space: nowrap; display: flex; align-items: center; gap: 6px;
    background: none; border-top: none; border-left: none; border-right: none;
    font-family: inherit;
}
.tb-tab:hover { color: var(--primary); }
.tb-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Filter pills */
.tb-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-filter {
    padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
    background: #f3f4f6; color: var(--text-secondary); cursor: pointer;
    transition: all 0.15s; border: none; font-family: inherit;
}
.tb-filter:hover { background: #e5e7eb; }
.tb-filter.active { background: var(--primary); color: white; }

/* Detail view */
.tb-detail-header {
    display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.tb-detail-back {
    width: 40px; height: 40px; border-radius: 12px; background: #f3f4f6;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-secondary); font-size: 16px;
    transition: all 0.15s; border: none;
}
.tb-detail-back:hover { background: #e5e7eb; color: var(--secondary); }
.tb-detail-avatar {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 18px;
}
.tb-detail-title { font-size: 20px; font-weight: 700; color: var(--secondary); }
.tb-detail-sub { font-size: 13px; color: var(--text-muted); }
.tb-detail-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Ride cards (expanded view) */
.ride-card {
    background: white; border-radius: var(--radius-xl); padding: 16px 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    cursor: pointer; transition: all 0.15s; border-left: 4px solid transparent;
}
.ride-card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); transform: translateY(-1px); }
.ride-card.s-pending { border-left-color: #f59e0b; }
.ride-card.s-searching { border-left-color: #8b5cf6; }
.ride-card.s-accepted, .ride-card.s-driver_arriving { border-left-color: #3b82f6; }
.ride-card.s-in_progress { border-left-color: #10b981; }
.ride-card.s-completed { border-left-color: #6b7280; }
.ride-card.s-cancelled { border-left-color: #ef4444; }

/* Empty state */
.empty-state { padding: 60px 20px; text-align: center; }
.empty-state-icon { font-size: 48px; color: #d1d5db; margin-bottom: 16px; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--secondary); margin-bottom: 4px; }
.empty-state-desc { font-size: 13px; color: var(--text-muted); }

/* Toast */
.tb-toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    padding: 12px 20px; border-radius: var(--radius-lg);
    color: white; font-weight: 600; font-size: 13px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2); animation: slideUp 0.3s;
}
.tb-toast.success { background: var(--success); }
.tb-toast.error { background: var(--danger); }
.tb-toast.info { background: var(--info); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.loading-spinner {
    width: 2.5rem; height: 2.5rem; border: 3px solid var(--border-color);
    border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Split button + dropdown */
.btn-split { display: inline-flex; position: relative; }
.btn-split-main {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; padding: 0.6rem 1.25rem; border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    font-weight: 600; border: none; cursor: pointer; display: inline-flex;
    align-items: center; gap: 0.5rem; font-size: 13px; font-family: inherit;
    transition: all 0.15s;
}
.btn-split-main:hover { filter: brightness(1.05); }
.btn-split-toggle {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; padding: 0.6rem 0.75rem; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    border: none; cursor: pointer; border-left: 1px solid rgba(255,255,255,0.3);
    font-family: inherit; transition: all 0.15s;
}
.btn-split-toggle:hover { filter: brightness(1.05); }
.btn-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 4px; min-width: 200px;
    background: white; border-radius: var(--radius-lg); border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); z-index: 40; overflow: hidden;
    animation: scaleIn 0.15s;
}
.btn-dropdown-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    font-size: 13px; color: var(--text-primary); cursor: pointer;
    transition: background 0.1s; width: 100%; border: none; background: none;
    font-family: inherit; text-align: left;
}
.btn-dropdown-item:hover { background: #f3f4f6; }
.btn-dropdown-item.danger { color: var(--danger); }
.btn-dropdown-item.danger:hover { background: #fef2f2; }
.btn-dropdown-sep { height: 1px; background: var(--border-color); margin: 4px 0; }

/* Leaflet map overrides */
.leaflet-container { border-radius: var(--radius-xl); }

/* ============================================================ */
/* COMMAND PALETTE (CMD+K)                                       */
/* ============================================================ */
.cp-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px); z-index: 99999;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 15vh; animation: fadeIn 0.1s;
}
.cp-modal {
    width: 560px; max-width: 95vw; background: white; border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25); overflow: hidden;
    animation: scaleIn 0.15s;
}
.cp-search-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid #e5e7eb;
}
.cp-search-icon { color: #9ca3af; font-size: 16px; }
.cp-input {
    flex: 1; border: none; outline: none; font-size: 15px;
    font-family: inherit; color: #1f2937; background: transparent;
}
.cp-input::placeholder { color: #9ca3af; }
.cp-shortcuts { display: flex; gap: 4px; }
.cp-shortcuts kbd, .cp-footer kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px;
    background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 5px;
    font-size: 11px; font-family: inherit; color: #6b7280;
}
.cp-results {
    max-height: 400px; overflow-y: auto; padding: 8px;
}
.cp-group-label {
    font-size: 11px; font-weight: 700; color: #9ca3af;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 8px 12px 4px;
}
.cp-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px; cursor: pointer;
    transition: background 0.1s;
}
.cp-item:hover, .cp-active { background: #f3f4f6; }
.cp-item-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.cp-item-text { flex: 1; min-width: 0; }
.cp-item-label { font-size: 13px; font-weight: 600; color: #374151; flex: 1; }
.cp-item-sub { font-size: 11px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-item-type { font-size: 10px; color: #9ca3af; background: #f3f4f6; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.cp-item-arrow { font-size: 10px; color: #d1d5db; margin-left: 4px; }
.cp-footer {
    display: flex; gap: 16px; padding: 10px 20px;
    border-top: 1px solid #f3f4f6; background: #fafafa;
    font-size: 11px; color: #9ca3af;
}
.cp-footer span { display: flex; align-items: center; gap: 4px; }
.cp-loading, .cp-empty, .cp-hint { text-align: center; padding: 24px; color: #9ca3af; font-size: 13px; }
.cp-hint-row { margin-bottom: 16px; }
.cp-recent-label { font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; text-align: left; padding: 0 12px 8px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================ */
/* FLOATING WIDGETS                                              */
/* ============================================================ */
.fw-stack { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px; z-index: 9999; }
.fw-container { position: relative; }

.fw-bubble {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; border: none; cursor: pointer; font-size: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    transition: all 0.2s; position: relative;
}
.fw-bubble:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.fw-bubble-chat { background: linear-gradient(135deg, #10b981, #059669); }
.fw-bubble-tickets { background: linear-gradient(135deg, #f59e0b, #d97706); }
.fw-bubble-vocal { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.fw-bubble-vocal.fw-ringing { background: linear-gradient(135deg, #ef4444, #dc2626); animation: fw-ring 0.5s ease infinite; }
.fw-bubble-vocal.fw-connected { background: linear-gradient(135deg, #10b981, #059669); }

@keyframes fw-ring { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.fw-badge {
    position: absolute; top: -4px; right: -4px;
    background: #ef4444; color: white; font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; border: 2px solid white;
}
.fw-badge-ring { animation: fw-ring 0.5s ease infinite; }

.fw-panel {
    position: absolute; bottom: 60px; right: 0; width: 360px;
    background: white; border-radius: 16px; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); border: 1px solid #e5e7eb;
    display: flex; flex-direction: column; max-height: 500px;
    animation: scaleIn 0.15s;
}
.fw-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
}
.fw-panel-tabs { display: flex; gap: 0; }
.fw-ptab {
    padding: 6px 10px; font-size: 11px; font-weight: 600;
    background: none; border: none; cursor: pointer; color: #6b7280;
    border-radius: 6px; transition: all 0.15s; font-family: inherit;
}
.fw-ptab.active { background: var(--primary); color: white; }
.fw-ptab:not(.active):hover { background: #f3f4f6; }
.fw-close {
    width: 28px; height: 28px; border-radius: 8px; background: none;
    border: none; cursor: pointer; color: #9ca3af; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.fw-close:hover { background: #f3f4f6; color: #374151; }

.fw-panel-body { flex: 1; overflow-y: auto; padding: 12px; max-height: 380px; }
.fw-empty { text-center; padding: 24px; color: #9ca3af; font-size: 13px; text-align: center; }

.fw-user-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-radius: 10px; margin-bottom: 4px; transition: background 0.1s;
}
.fw-user-item.clickable { cursor: pointer; }
.fw-user-item.clickable:hover { background: #f3f4f6; }
.fw-user-avatar {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.fw-user-info { flex: 1; min-width: 0; }
.fw-user-name { font-size: 13px; font-weight: 600; color: #374151; display: flex; align-items: center; gap: 6px; }
.fw-user-meta { font-size: 11px; color: #9ca3af; }
.fw-you { font-size: 9px; background: #ecfdf5; color: #059669; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.fw-role { font-size: 9px; padding: 1px 6px; border-radius: 8px; font-weight: 600; margin-left: 4px; }
.fw-role-admin { background: #fef2f2; color: #ef4444; }
.fw-role-manager { background: #eff6ff; color: #3b82f6; }
.fw-chat-action { color: var(--primary); cursor: pointer; font-size: 14px; }

.fw-chat-body { display: flex; flex-direction: column; padding: 0; }
.fw-chat-header-sub { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #f3f4f6; }
.fw-back-btn { background: none; border: none; cursor: pointer; color: #6b7280; font-size: 14px; padding: 4px; }
.fw-back-btn:hover { color: #374151; }
.fw-messages { flex: 1; overflow-y: auto; padding: 12px; max-height: 310px; display: flex; flex-direction: column; gap: 6px; }
.fw-msg { display: flex; flex-direction: column; max-width: 85%; }
.fw-msg-me { align-self: flex-end; }
.fw-msg-other { align-self: flex-start; }
.fw-msg-bubble { padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; word-break: break-word; }
.fw-msg-me .fw-msg-bubble { background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.fw-msg-other .fw-msg-bubble { background: #f3f4f6; color: #374151; border-bottom-left-radius: 4px; }
.fw-msg-time { font-size: 10px; color: #9ca3af; margin-top: 2px; }
.fw-msg-me .fw-msg-time { text-align: right; }

.fw-chat-input {
    display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #f3f4f6;
    background: #fafafa;
}
.fw-input {
    flex: 1; padding: 8px 12px; border: 1px solid #e5e7eb;
    border-radius: 10px; font-size: 13px; outline: none;
    font-family: inherit; transition: border 0.15s;
}
.fw-input:focus { border-color: var(--primary); }
.fw-send-btn {
    width: 36px; height: 36px; border-radius: 10px; border: none;
    background: var(--primary); color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all 0.15s;
}
.fw-send-btn:hover { filter: brightness(1.1); }

.fw-ticket-item {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    border-radius: 10px; cursor: pointer; transition: background 0.1s;
    margin-bottom: 4px;
}
.fw-ticket-item:hover { background: #f3f4f6; }
.fw-ticket-icon {
    width: 34px; height: 34px; border-radius: 10px; background: #fef3c7;
    display: flex; align-items: center; justify-content: center;
    color: #d97706; font-size: 14px; flex-shrink: 0;
}
.fw-ticket-info { flex: 1; min-width: 0; }
.fw-ticket-subject { font-size: 13px; font-weight: 600; color: #374151; }
.fw-ticket-meta { font-size: 11px; color: #9ca3af; }

.fw-session-info { padding: 8px; }
.fw-session-active { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #10b981; margin-bottom: 8px; }
.fw-session-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: pulse 2s infinite; }

.fw-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.fw-status-idle { background: #9ca3af; }
.fw-status-ringing { background: #ef4444; animation: pulse 1s infinite; }
.fw-status-connected { background: #10b981; animation: pulse 2s infinite; }

.fw-incoming-call { text-align: center; padding: 20px; }
.fw-call-animation { position: relative; width: 80px; height: 80px; margin: 0 auto 16px; }
.fw-call-ring { position: absolute; inset: 0; border: 3px solid #ef4444; border-radius: 50%; animation: fw-expand 1.5s ease infinite; opacity: 0; }
.fw-ring-2 { animation-delay: 0.5s; }
@keyframes fw-expand { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }
.fw-call-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 28px; color: #ef4444; animation: fw-ring 0.5s ease infinite; }
.fw-caller-id { font-size: 16px; font-weight: 700; color: #374151; margin-bottom: 16px; }
.fw-call-actions { display: flex; justify-content: center; gap: 16px; }
.fw-answer-btn, .fw-reject-btn {
    width: 52px; height: 52px; border-radius: 50%; border: none;
    cursor: pointer; color: white; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.fw-answer-btn { background: #10b981; }
.fw-answer-btn:hover { background: #059669; }
.fw-reject-btn { background: #ef4444; }
.fw-reject-btn:hover { background: #dc2626; }

.fw-active-call { text-align: center; padding: 16px; }
.fw-connected-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; color: #10b981; margin-bottom: 8px; }
.fw-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: pulse 2s infinite; }
.fw-call-controls { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.fw-ctrl-btn {
    width: 44px; height: 44px; border-radius: 50%; border: 2px solid #e5e7eb;
    background: white; cursor: pointer; color: #374151; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.fw-ctrl-btn:hover { background: #f3f4f6; }
.fw-ctrl-btn.fw-ctrl-active { background: #fef2f2; border-color: #ef4444; color: #ef4444; }
.fw-ctrl-btn.fw-ctrl-danger { background: #ef4444; border-color: #ef4444; color: white; }
.fw-ctrl-btn.fw-ctrl-danger:hover { background: #dc2626; }

.fw-call-log-item {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px;
    border-radius: 8px; font-size: 12px;
}
.fw-call-log-item:hover { background: #f3f4f6; }
