/* ═══ KFOO Chat - Midnight Pulse Design ═══ */
:root {
  --surface: #131313;
  --surface-low: #1c1b1b;
  --surface-lowest: #0e0e0e;
  --surface-high: #2a2a2a;
  --surface-highest: #353534;
  --surface-bright: #3a3939;
  --primary: #d0bcff;
  --primary-container: #a078ff;
  --on-primary: #3c0091;
  --secondary-container: #474747;
  --on-surface: #e5e2e1;
  --on-surface-variant: #cbc3d7;
  --outline-variant: #494454;
  --danger: #ff6b6b;
  --success: #6bffb8;
  --font-display: 'Cairo', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Cairo', 'Inter', sans-serif;
  --radius-sm: .25rem;
  --radius-md: .75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  --transition: .2s ease-in-out;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--on-surface);
  min-height: 100vh;
  overflow: hidden;
  direction: rtl;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--outline-variant); border-radius: var(--radius-full); }
.hidden { display: none !important; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea { font-family: inherit; color: var(--on-surface); background: var(--surface-highest); border: none; outline: none; padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .95rem; transition: var(--transition); }
input:focus, textarea:focus { background: var(--surface-bright); box-shadow: 0 0 0 1px rgba(73,68,84,.2); }
a { color: var(--primary); text-decoration: none; }

/* ═══ BUTTONS ═══ */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  padding: .75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: .95rem;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: var(--transition);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(160,120,255,.25); }
.btn-primary svg { width: 18px; height: 18px; }
.btn-full { width: 100%; justify-content: center; }
.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  transition: var(--transition);
  flex-shrink: 0;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: rgba(208,188,255,.1); }
.icon-btn.danger:hover { background: rgba(255,107,107,.15); color: var(--danger); }

/* ═══ AUTH SCREEN ═══ */
.auth-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  z-index: 1000;
}
.auth-bg-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: .3;
  animation: orbFloat 8s ease-in-out infinite alternate;
}
.orb-1 { width: 400px; height: 400px; background: var(--primary-container); top: -100px; right: -100px; }
.orb-2 { width: 300px; height: 300px; background: #6b3fa0; bottom: -80px; left: -80px; animation-delay: 2s; }
.orb-3 { width: 200px; height: 200px; background: var(--primary); top: 50%; left: 50%; animation-delay: 4s; }
@keyframes orbFloat { to { transform: translate(40px, -30px) scale(1.1); } }

.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-xl);
  animation: fadeSlideUp .6s ease;
}
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(30px); } }
.glass {
  background: rgba(28,27,27,.7);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(73,68,84,.15);
}
.auth-logo { text-align: center; margin-bottom: .5rem; display: flex; align-items: center; justify-content: center; gap: .75rem; }
.logo-img { height: 48px; border-radius: var(--radius-md); }
.logo-text { font-family: var(--font-display); font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--primary-container)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-tagline { text-align: center; color: var(--on-surface-variant); margin-bottom: 1.5rem; font-size: .9rem; }
.auth-tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; background: var(--surface-lowest); border-radius: var(--radius-full); padding: 4px; }
.auth-tab { flex: 1; padding: .6rem; border-radius: var(--radius-full); font-weight: 600; font-size: .9rem; transition: var(--transition); color: var(--on-surface-variant); }
.auth-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-container)); color: var(--on-primary); }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.field-group { display: flex; flex-direction: column; gap: .4rem; }
.field-group label { font-size: .85rem; color: var(--on-surface-variant); font-weight: 500; }
.auth-error { color: var(--danger); font-size: .85rem; min-height: 1.2em; }
.btn-loader { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ APP LAYOUT ═══ */
.app { display: flex; height: 100vh; width: 100vw; }

/* ═══ SIDEBAR ═══ */
.sidebar {
  width: 340px; min-width: 340px;
  background: var(--surface-low);
  display: flex; flex-direction: column;
  transition: var(--transition);
}
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
}
.sidebar-logo { display: flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.logo-sm { height: 32px; border-radius: var(--radius-sm); }
.header-actions { display: flex; gap: .25rem; }
.sidebar-search {
  margin: 0 1rem .75rem;
  display: flex; align-items: center; gap: .5rem;
  background: var(--surface-highest);
  padding: 0 .75rem;
  border-radius: var(--radius-sm);
}
.sidebar-search svg { width: 18px; height: 18px; color: var(--on-surface-variant); flex-shrink: 0; }
.sidebar-search input { background: transparent; padding: .65rem 0; flex: 1; font-size: .9rem; }
.sidebar-search input:focus { background: transparent; box-shadow: none; }

/* ═══ CONVERSATION LIST ═══ */
.conv-list { flex: 1; overflow-y: auto; padding: 0 .5rem; }
.conv-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem .75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.conv-item:hover { background: var(--surface-high); }
.conv-item.active { background: var(--surface-high); }
.conv-item .avatar { flex-shrink: 0; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 600; font-size: .95rem; margin-bottom: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last { font-size: .82rem; color: var(--on-surface-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; flex-shrink: 0; }
.conv-time { font-size: .75rem; color: var(--on-surface-variant); }
.conv-badge {
  background: var(--primary-container);
  color: var(--on-primary);
  font-size: .7rem; font-weight: 700;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
}
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem; color: var(--on-surface-variant); text-align: center; }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: .4; }
.empty-state p { font-weight: 600; margin-bottom: .25rem; }
.empty-state small { font-size: .8rem; opacity: .6; }

/* ═══ SIDEBAR FOOTER ═══ */
.sidebar-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--surface-lowest);
}
.user-profile-mini { display: flex; align-items: center; gap: .75rem; cursor: pointer; flex: 1; padding: .35rem; border-radius: var(--radius-md); transition: var(--transition); }
.user-profile-mini:hover { background: var(--surface-high); }
.avatar-wrap { position: relative; }
.avatar {
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.status-dot {
  position: absolute; bottom: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: var(--radius-full);
  border: 2px solid var(--surface-low);
  background: var(--outline-variant);
}
.status-dot.online { background: var(--success); }
.user-name-mini { font-weight: 600; font-size: .9rem; }
.user-uid-mini { font-size: .75rem; color: var(--on-surface-variant); }

/* ═══ CHAT AREA ═══ */
.chat-area { flex: 1; display: flex; flex-direction: column; background: var(--surface); position: relative; min-width: 0; }

/* Welcome */
.welcome-screen { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.welcome-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb-sm-1 { width: 200px; height: 200px; background: var(--primary-container); top: 20%; right: 10%; opacity: .15; filter: blur(80px); }
.orb-sm-2 { width: 150px; height: 150px; background: #6b3fa0; bottom: 20%; left: 15%; opacity: .1; filter: blur(60px); animation-delay: 3s; }
.welcome-content { text-align: center; z-index: 1; animation: fadeSlideUp .8s ease; }
.welcome-logo { height: 80px; margin-bottom: 1.5rem; border-radius: var(--radius-lg); }
.welcome-content h1 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin-bottom: .5rem; }
.welcome-content p { color: var(--on-surface-variant); margin-bottom: 1.5rem; }

/* Chat View */
.chat-view { display: flex; flex-direction: column; flex: 1; height: 100%; }

.chat-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem;
  background: rgba(28,27,27,.8);
  backdrop-filter: blur(20px);
  z-index: 10;
}
.back-btn { display: none; }
.chat-header-info { display: flex; align-items: center; gap: .75rem; flex: 1; cursor: pointer; }
.chat-name { font-weight: 700; font-size: 1rem; }
.chat-sub { font-size: .8rem; color: var(--on-surface-variant); }
.chat-actions { display: flex; gap: .25rem; }

/* Messages */
.messages-area { flex: 1; overflow-y: auto; padding: 1rem; }
.messages-wrap { display: flex; flex-direction: column; gap: .5rem; max-width: 900px; margin: 0 auto; }
.msg-row { display: flex; gap: .5rem; animation: msgIn .3s ease; }
.msg-row.sent { flex-direction: row-reverse; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } }
.msg-avatar { flex-shrink: 0; }
.msg-avatar .avatar { width: 32px; height: 32px; font-size: .75rem; }
.msg-bubble {
  max-width: 65%;
  padding: .65rem 1rem;
  border-radius: var(--radius-lg);
  font-size: .93rem;
  line-height: 1.55;
  position: relative;
}
.msg-row:not(.sent) .msg-bubble { background: var(--surface-high); border-bottom-right-radius: var(--radius-sm); }
.msg-row.sent .msg-bubble { background: linear-gradient(135deg, var(--primary), var(--primary-container)); color: var(--on-primary); border-bottom-left-radius: var(--radius-sm); }
.msg-sender { font-size: .78rem; font-weight: 600; color: var(--primary); margin-bottom: .2rem; }
.msg-time { font-size: .7rem; opacity: .6; margin-top: .25rem; text-align: left; }
.msg-row.sent .msg-time { text-align: right; }
.msg-date-divider { text-align: center; padding: 1rem 0; }
.msg-date-divider span { background: var(--surface-high); padding: .35rem 1rem; border-radius: var(--radius-full); font-size: .78rem; color: var(--on-surface-variant); }

/* Chat Input */
.chat-input-area {
  display: flex; align-items: flex-end; gap: .5rem;
  padding: .75rem 1rem;
  background: var(--surface-low);
}
.input-wrap { flex: 1; }
.input-wrap textarea {
  width: 100%;
  background: var(--surface-highest);
  border-radius: var(--radius-lg);
  padding: .75rem 1rem;
  resize: none;
  max-height: 120px;
  line-height: 1.5;
  font-size: .93rem;
}
.btn-send {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-send:hover { transform: scale(1.05); }
.btn-send svg { width: 20px; height: 20px; }
.attach-btn { margin-bottom: 2px; }

/* ═══ INFO PANEL ═══ */
.info-panel {
  width: 320px; min-width: 320px;
  background: var(--surface-high);
  display: flex; flex-direction: column;
  overflow-y: auto;
  animation: slideInLeft .3s ease;
}
@keyframes slideInLeft { from { transform: translateX(-20px); opacity: 0; } }
.info-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; }
.info-panel-header h3 { font-family: var(--font-display); font-weight: 700; }
.info-panel-content { padding: 0 1.25rem 1.25rem; }
.info-profile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.5rem 0; }
.info-avatar { width: 80px; height: 80px; font-size: 2rem; margin-bottom: .75rem; }
.info-name { font-weight: 700; font-size: 1.1rem; margin-bottom: .2rem; }
.info-uid { color: var(--on-surface-variant); font-size: .85rem; }
.info-section { margin-top: 1.5rem; }
.info-section h4 { font-size: .85rem; color: var(--on-surface-variant); margin-bottom: .75rem; font-weight: 600; }
.member-item { display: flex; align-items: center; gap: .65rem; padding: .5rem 0; }
.member-item .avatar { width: 36px; height: 36px; font-size: .8rem; }
.member-name { font-weight: 500; font-size: .9rem; }
.member-role { font-size: .75rem; color: var(--primary); }

/* ═══ MODALS ═══ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: 90%; max-width: 440px;
  padding: 2rem;
  border-radius: var(--radius-xl);
  animation: fadeSlideUp .3s ease;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-header h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.modal-body { display: flex; flex-direction: column; gap: 1rem; }
.search-row { display: flex; gap: .5rem; }
.search-row input { flex: 1; }
.search-result-area { min-height: 60px; }
.search-result-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface-highest);
  padding: 1rem;
  border-radius: var(--radius-md);
  animation: fadeSlideUp .3s ease;
}
.search-result-card .avatar { width: 48px; height: 48px; }
.search-result-info { flex: 1; }
.search-result-info .name { font-weight: 700; }
.search-result-info .uid { font-size: .82rem; color: var(--on-surface-variant); }
.profile-avatar-big {
  width: 80px; height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700;
  margin: 0 auto 1rem;
}
.uid-badge { text-align: center; color: var(--primary); font-size: .9rem; margin-bottom: 1rem; font-weight: 600; }

/* ═══ MESSAGE MEDIA ═══ */
.msg-image { margin: .25rem 0; }
.msg-image img {
  max-width: 280px; max-height: 300px;
  border-radius: var(--radius-md);
  cursor: pointer; transition: transform .2s;
  display: block;
}
.msg-image img:hover { transform: scale(1.03); }
.msg-file {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem; border-radius: var(--radius-md);
  background: rgba(208,188,255,.1); cursor: pointer;
  transition: background .2s; min-width: 200px;
}
.msg-file:hover { background: rgba(208,188,255,.2); }
.msg-file-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.msg-file-icon svg { width: 20px; height: 20px; }
.msg-file-info { flex: 1; min-width: 0; }
.msg-file-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-file-ext { font-size: .75rem; color: var(--on-surface-variant); }
.attach-btn.uploading { animation: uploadPulse 1s infinite; pointer-events: none; opacity: .6; }
@keyframes uploadPulse { 50% { transform: scale(1.2); } }

/* Image Preview Overlay */
.image-preview-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.9); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; animation: fadeIn .2s;
}
.image-preview-full { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius-md); }
.image-preview-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-size: 2.5rem; color: #fff; cursor: pointer;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.15); border-radius: 50%;
  transition: background .2s;
}
.image-preview-close:hover { background: rgba(255,255,255,.3); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══ CALL OVERLAY ═══ */
.call-overlay {
  position: fixed; inset: 0;
  z-index: 900;
  display: flex; flex-direction: column;
}
.call-bg-blur { position: absolute; inset: 0; background: rgba(14,14,14,.95); backdrop-filter: blur(40px); }
.call-container { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; }
.video-area { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; }
.remote-video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.local-video { position: absolute; bottom: 100px; left: 20px; width: 180px; height: 135px; object-fit: cover; border-radius: var(--radius-lg); z-index: 10; }
.no-video-placeholder { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.big-avatar { width: 120px; height: 120px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--primary), var(--primary-container)); color: var(--on-primary); display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 700; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(160,120,255,.3); } }
.call-name-display { font-size: 1.3rem; font-weight: 700; }
.call-status-bar { text-align: center; padding: .75rem; }
.call-status-text { font-size: .9rem; color: var(--on-surface-variant); }
.call-timer { font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.call-controls { display: flex; justify-content: center; gap: 1.25rem; padding: 1.5rem; }
.call-btn {
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s ease; position: relative;
}
.call-btn svg { width: 24px; height: 24px; color: #fff; }
.call-btn:hover { background: rgba(255,255,255,.22); transform: scale(1.08); }
.call-btn.danger { background: #ff3b30; color: #fff; width: 64px; height: 64px; }
.call-btn.danger svg { width: 28px; height: 28px; }
.call-btn.danger:hover { background: #ff5544; transform: scale(1.1); }
.call-btn.success { background: #34c759; color: #fff; }
.call-btn.success:hover { background: #40d86a; }
.call-btn.active {
  background: rgba(255,59,48,.85); color: #fff;
}
.call-btn.active svg { color: #fff; }
.call-btn.active:hover { background: rgba(255,59,48,1); }
.screen-share-area { position: absolute; inset: 0; z-index: 5; }
/* Viewer Controls - shown for the person WATCHING a screen share */
.viewer-controls {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 15;
  display: flex; align-items: center; gap: .75rem;
  background: rgba(0,0,0,.6); backdrop-filter: blur(20px);
  padding: .75rem 1.25rem; border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,.1);
}
.screen-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.screen-share-badge { position: absolute; top: 1rem; right: 1rem; background: rgba(208,188,255,.2); backdrop-filter: blur(10px); padding: .5rem 1rem; border-radius: var(--radius-full); font-size: .85rem; display: flex; align-items: center; gap: .5rem; }
.screen-share-badge svg { width: 16px; height: 16px; }

/* Screen Share Floating Controls */
.screen-share-controls {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 10;
  display: flex; align-items: center; gap: .75rem;
  background: rgba(0,0,0,.6); backdrop-filter: blur(20px);
  padding: .75rem 1.25rem; border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,.1);
}
.ss-ctrl-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s ease;
}
.ss-ctrl-btn svg { width: 20px; height: 20px; }
.ss-ctrl-btn:hover { background: rgba(255,255,255,.3); transform: scale(1.1); }
.ss-ctrl-btn.ss-muted { background: rgba(255,59,48,.85); }
.ss-ctrl-btn.ss-muted:hover { background: rgba(255,59,48,1); }
.ss-end-btn { background: #ff3b30; }
.ss-end-btn:hover { background: #ff5544 !important; }
.ss-stop-btn {
  width: auto; border-radius: var(--radius-full);
  padding: 0 1rem; gap: .5rem; font-size: .85rem; font-weight: 600;
  background: rgba(255,59,48,.85);
}
.ss-stop-btn span { white-space: nowrap; }
.ss-stop-btn:hover { background: rgba(255,59,48,1) !important; }

/* Incoming Call */
.incoming-call-modal { text-align: center; padding: 2.5rem; }
.incoming-call-avatar { width: 100px; height: 100px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--primary), var(--primary-container)); color: var(--on-primary); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 700; margin: 0 auto 1rem; animation: pulse 2s ease-in-out infinite; }
.incoming-call-name { font-size: 1.3rem; font-weight: 700; margin-bottom: .25rem; }
.incoming-call-type { color: var(--on-surface-variant); font-size: .9rem; margin-bottom: 1.5rem; }
.incoming-call-actions { display: flex; justify-content: center; gap: 2rem; }

/* Call Top Bar */
.call-top-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: flex-start; padding: 1rem;
}
.call-minimize-btn {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.call-minimize-btn svg { width: 20px; height: 20px; }
.call-minimize-btn:hover { background: rgba(255,255,255,.25); }

/* Mini Call Bar */
.mini-call-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  height: 48px;
  background: linear-gradient(90deg, var(--primary), #7c3aed);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
  cursor: pointer;
  animation: miniCallSlideIn .3s ease;
}
@keyframes miniCallSlideIn { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.mini-call-info { display: flex; align-items: center; gap: .75rem; }
.mini-call-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #6bffb8; animation: miniCallPulse 1.5s infinite;
}
@keyframes miniCallPulse { 50% { opacity: .4; } }
.mini-call-name { font-size: .9rem; font-weight: 600; color: #fff; }
.mini-call-timer { font-size: .85rem; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.mini-call-actions { display: flex; gap: .5rem; }
.mini-call-end {
  background: var(--danger); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.mini-call-end svg { width: 16px; height: 16px; }
.mini-call-end:hover { background: #ff4444; transform: scale(1.1); }
.mini-call-mic {
  background: rgba(255,255,255,.25); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.mini-call-mic svg { width: 16px; height: 16px; }
.mini-call-mic:hover { background: rgba(255,255,255,.4); transform: scale(1.1); }
.mini-call-mic.mini-muted { background: #ff3b30; }
.mini-call-mic.mini-muted:hover { background: #ff5544; }

/* ═══ TOAST ═══ */
.toast-container { position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  background: var(--surface-high);
  backdrop-filter: blur(20px);
  padding: .75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: .9rem;
  animation: toastIn .3s ease, toastOut .3s ease 2.7s forwards;
  white-space: nowrap;
  border: 1px solid rgba(73,68,84,.15);
}
.toast.success { border-color: rgba(107,255,184,.3); }
.toast.error { border-color: rgba(255,107,107,.3); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-20px); } }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .sidebar { position: fixed; inset: 0; z-index: 100; width: 100%; min-width: unset; transform: translateX(0); }
  .sidebar.sidebar-hidden { transform: translateX(100%); }
  .info-panel { position: fixed; inset: 0; z-index: 200; width: 100%; min-width: unset; }
  .back-btn { display: flex; }
  .chat-area { position: fixed; inset: 0; z-index: 50; }
}
