/* =========================================================
   Makarena — Design System & App Layout
   ========================================================= */

/* ---------------------------------------------------------
   CSS Custom Properties
   --------------------------------------------------------- */
:root {
  /* Colors */
  --color-bg:           #0d0d10;
  --color-surface:      #17171d;
  --color-surface-2:    #1f1f28;
  --color-border:       #2b2b38;
  --color-border-light: #36364a;

  --color-accent:       #F6C437;
  --color-accent-hover: #d4a52f;
  --color-accent-muted: rgba(246, 196, 55, 0.15);

  --color-text:         #f0f0f5;
  --color-text-2:       #c0c0d0;
  --color-muted:        #7a7a98;

  --color-success:      #2F9E44;
  --color-warning:      #F28C38;
  --color-danger:       #D83A2E;
  --color-info:         #3b82f6;
  --color-fiesta-brown: #5A2E1E;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", Consolas, monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 12px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);

  /* Layout */
  --nav-width:      240px;
  --nav-height-mob: 64px;
  --content-max:    840px;

  /* Transitions */
  --transition: 0.15s ease;
}

/* ---------------------------------------------------------
   Reset & Base
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

ul { list-style: none; }

/* ---------------------------------------------------------
   App Shell Layout
   --------------------------------------------------------- */

/* The outer shell wraps sidebar + main content */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Main content area */
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  /* On mobile leave room for the bottom nav */
  padding-bottom: var(--nav-height-mob);
}

@media (min-width: 768px) {
  .app-main {
    margin-left: var(--nav-width);
    padding-bottom: 0;
  }
}

.app-content {
  flex: 1;
  padding: var(--space-6) var(--space-4);
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .app-content { padding: var(--space-8) var(--space-6); }
}

/* ---------------------------------------------------------
   Sidebar Navigation (desktop)
   --------------------------------------------------------- */
.app-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .app-nav { display: flex; }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo svg { width: 28px; height: 28px; flex-shrink: 0; }

.nav-section {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-top: var(--space-4);
}

.nav-links {
  padding: 0 var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--color-text-2);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative;
}

.nav-link:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
  text-decoration: none;
}

.nav-link.active {
  background: var(--color-accent-muted);
  color: var(--color-accent);
}

.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.nav-spacer { flex: 1; }

.nav-user {
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid var(--color-border);
}

.nav-user-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: var(--color-text);
}

.nav-user-card:hover { background: var(--color-surface-2); text-decoration: none; }

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--color-accent-muted);
  border: 2px solid var(--color-border);
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent);
}

.nav-user-info { min-width: 0; }

.nav-user-name {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-email {
  font-size: var(--text-xs);
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------------------------------------------------
   Bottom Tab Bar (mobile)
   --------------------------------------------------------- */
.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height-mob);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 768px) {
  .app-tabbar { display: none; }
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.tab-item.active { color: var(--color-accent); }
.tab-item:hover { text-decoration: none; color: var(--color-text); }
.tab-item svg { width: 22px; height: 22px; }

.tab-badge {
  position: absolute;
  top: 8px;
  right: calc(50% - 18px);
  background: var(--color-danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---------------------------------------------------------
   Page Header
   --------------------------------------------------------- */
.page-header {
  margin-bottom: var(--space-6);
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.page-subtitle {
  margin-top: var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.card-sm { padding: var(--space-4); border-radius: var(--radius-md); }
.card-title { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-4); }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), opacity var(--transition), transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: scale(0.97); }
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; }

.btn-primary  { background: var(--color-accent); color: #0d0d10; }
.btn-primary:hover  { background: var(--color-accent-hover); }

.btn-secondary { background: var(--color-surface-2); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { border-color: var(--color-border-light); background: var(--color-border); }

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { opacity: 0.85; }

.btn-ghost { background: transparent; color: var(--color-text-2); }
.btn-ghost:hover { background: var(--color-surface-2); color: var(--color-text); }

.btn-sm { padding: 0.4rem 0.875rem; font-size: var(--text-xs); }
.btn-lg { padding: 0.875rem 1.75rem; font-size: var(--text-base); }
.btn-full { width: 100%; }

.btn[disabled], .btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ---------------------------------------------------------
   Forms
   --------------------------------------------------------- */
.form-group { margin-bottom: var(--space-5); }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text-2);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--text-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-muted);
}

.form-control::placeholder { color: var(--color-muted); }

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2rem;
}

/* Date inputs: override browser-injected light-mode chrome */
input[type="date"].form-control {
  color-scheme: dark;
}

.form-hint { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-muted); }
.form-error { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-danger); }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.form-check-input {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  appearance: none;
  background: var(--color-surface-2);
  border: 2px solid var(--color-border-light);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-check-input:checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpolyline points='2 6 5 9 10 3' fill='none' stroke='%230d0d10' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-muted);
  border-color: var(--color-accent);
}

.form-check-label {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.5;
  cursor: pointer;
}

.form-check-label a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-check-label a:hover {
  color: var(--color-accent-hover);
}

.form-row {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------
   Alerts / Messages
   --------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

.alert-success { background: rgba(47,158,68,.1);   border: 1px solid rgba(47,158,68,.25);   color: #6bcf7f; }
.alert-warning { background: rgba(242,140,56,.1);  border: 1px solid rgba(242,140,56,.25);  color: #f5a55e; }
.alert-danger  { background: rgba(216,58,46,.1);   border: 1px solid rgba(216,58,46,.25);   color: #f08882; }
.alert-info    { background: rgba(59,130,246,.1);  border: 1px solid rgba(59,130,246,.25);  color: #60a5fa; }

/* ---------------------------------------------------------
   Avatar
   --------------------------------------------------------- */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--color-accent-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
}

.avatar-sm  { width: 32px;  height: 32px;  font-size: var(--text-xs); }
.avatar-md  { width: 44px;  height: 44px;  font-size: var(--text-sm); }
.avatar-lg  { width: 64px;  height: 64px;  font-size: var(--text-lg); }
.avatar-xl  { width: 96px;  height: 96px;  font-size: var(--text-2xl); }

/* ---------------------------------------------------------
   Online Status Indicator
   --------------------------------------------------------- */
.online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-muted);
  border: 2px solid var(--color-surface);
  flex-shrink: 0;
}

.online-dot.online { background: var(--color-success); }
.online-dot.busy  { background: var(--color-warning); }

/* ---------------------------------------------------------
   Contact / User List Item
   --------------------------------------------------------- */
.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  transition: background var(--transition);
  text-decoration: none;
  color: var(--color-text);
}

.contact-item:hover { background: var(--color-surface-2); text-decoration: none; }

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

.contact-name {
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-sub {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   Empty State
   --------------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-4);
  text-align: center;
  color: var(--color-muted);
}

.empty-state svg { width: 48px; height: 48px; opacity: 0.4; margin-bottom: var(--space-4); }
.empty-state-title { font-size: var(--text-base); font-weight: 600; color: var(--color-text-2); margin-bottom: var(--space-2); }
.empty-state-text  { font-size: var(--text-sm); max-width: 300px; }

/* ---------------------------------------------------------
   Badges
   --------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
}

.badge-primary { background: var(--color-accent-muted); color: var(--color-accent); }
.badge-success { background: color-mix(in srgb, var(--color-success) 20%, transparent); color: var(--color-success); }
.badge-warning { background: color-mix(in srgb, var(--color-warning) 20%, transparent); color: var(--color-warning); }
.badge-danger  { background: color-mix(in srgb, var(--color-danger)  20%, transparent); color: var(--color-danger); }

/* ---------------------------------------------------------
   Divider
   --------------------------------------------------------- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-5) 0;
}

/* ---------------------------------------------------------
   Utilities
   --------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.text-sm { font-size: var(--text-sm); }
.text-muted { color: var(--color-muted); }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }

/* ---------------------------------------------------------
   Auth Pages (allauth override)
   --------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  background: var(--color-bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.5px;
  margin-bottom: var(--space-8);
  display: block;
  text-align: center;
  text-decoration: none;
}

.auth-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  letter-spacing: -0.5px;
}

.auth-subtitle {
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

.auth-footer {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  text-align: center;
  color: var(--color-muted);
}

.auth-lang-switcher {
  margin-top: var(--space-6);
  display: flex;
  justify-content: center;
}

.auth-lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-muted);
  font-size: var(--text-sm);
  padding: 6px 30px 6px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.auth-lang-select:hover,
.auth-lang-select:focus {
  border-color: var(--color-border-light);
  color: var(--color-text);
  outline: none;
}

/* ---------------------------------------------------------
   Unpoly loading bar
   --------------------------------------------------------- */
up-progress-bar {
  background: var(--color-accent) !important;
  height: 2px !important;
}

/* ---------------------------------------------------------
   Scrollbar (WebKit)
   --------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-muted); }

/* ---------------------------------------------------------
   Call Room
   --------------------------------------------------------- */
.call-room {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
}

/* Remote video — fits inside the room while respecting the stream's aspect ratio */
#remote-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}

/* Remote avatar overlay — shown when remote party disables their camera */
.call-avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  z-index: 5;
  text-align: center;
}
.call-avatar-overlay[hidden] { display: none; }

.call-avatar-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--color-accent-muted);
  border: 3px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 1rem;
  overflow: hidden;
}
.call-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.call-avatar-name {
  color: #fff;
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0 0 .25rem;
}

.call-avatar-label {
  color: rgba(255,255,255,.45);
  font-size: .8125rem;
  margin: 0;
}

/* ── Local PIP wrapper — draggable, bottom-right by default ── */
#local-pip {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 120px;
  z-index: 10;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#local-pip.dragging { cursor: grabbing; }

/* Local video fills the PIP wrapper */
#local-video {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255,255,255,.2);
  background: #222;
  box-shadow: var(--shadow-lg);
  display: block;
}
#local-video[hidden] { display: none; }
#local-video.mirrored { transform: scaleX(-1); }

/* Local avatar pip — fills the PIP wrapper when camera is off */
.call-local-avatar {
  position: relative;
  min-height: 90px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255,255,255,.2);
  background: #242430;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.call-local-avatar[hidden] { display: none; }

.local-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  overflow: hidden;
}
.local-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.cam-off-label {
  font-size: .625rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .02em;
}

@media (min-width: 640px) {
  #local-pip            { width: 180px; height: 135px; }
  .local-avatar-circle  { width: 56px;  height: 56px;  font-size: 1.5rem; }
}

/* Call controls bar */
.call-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
}

.call-controls-secondary {
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 20;
  padding-bottom: 4px;
}

.call-controls-secondary .call-btn {
  width: 44px;
  height: 44px;
}

.call-controls-secondary .call-btn svg {
  width: 18px;
  height: 18px;
}

.call-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  background: rgba(255,255,255,.15);
  color: #fff;
  backdrop-filter: blur(8px);
}

.call-btn:hover  { transform: scale(1.08); background: rgba(255,255,255,.25); }
.call-btn:active { transform: scale(0.95); }
.call-btn.off    { background: rgba(239,68,68,.4); }
.call-btn-end    { background: var(--color-danger) !important; width: 60px; height: 60px; }
.call-btn svg    { width: 22px; height: 22px; flex-shrink: 0; }

/* Status overlays (shown/hidden by JS via data-call-state attribute) */
.call-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.75);
  z-index: 15;
  text-align: center;
  padding: 2rem;
  color: #fff;
}

.call-overlay[hidden] { display: none; }

.call-overlay-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-accent-muted);
  border: 3px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.call-overlay-avatar img { width: 100%; height: 100%; object-fit: cover; }

.call-overlay-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.call-overlay-status {
  color: rgba(255,255,255,.6);
  font-size: .9375rem;
  margin-bottom: 1.5rem;
}

.call-status-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Spinner for ringing/connecting */
.call-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.25rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Pulsing ring animation for ringing state */
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: .6; }
  100% { transform: scale(1.6); opacity: 0;  }
}

.call-pulse {
  position: relative;
  display: inline-block;
  margin-bottom: 1.25rem;
}

.call-pulse::before,
.call-pulse::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(246,196,55,.5);
  animation: pulse-ring 1.5s ease-out infinite;
}

.call-pulse::after { animation-delay: .75s; }

/* Duration timer */
.call-timer {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  padding: .25rem .875rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  z-index: 20;
  font-variant-numeric: tabular-nums;
  letter-spacing: .05em;
  display: none;
}

/* ---------------------------------------------------------
   Incoming Call Overlay (notification)
   --------------------------------------------------------- */
#incoming-call-overlay {
  position: fixed;
  bottom: calc(var(--nav-height-mob) + 12px);
  right: 16px;
  left: 16px;
  z-index: 500;
  animation: slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@media (min-width: 480px) {
  #incoming-call-overlay {
    left: auto;
    width: 320px;
  }
}

@media (min-width: 768px) {
  #incoming-call-overlay {
    bottom: 24px;
    right: 24px;
  }
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.incoming-call-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

.incoming-call-header {
  display: flex;
  align-items: center;
  gap: .875rem;
}

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

.incoming-call-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-accent);
  margin-bottom: .125rem;
}

.incoming-call-name {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.incoming-call-actions {
  display: flex;
  gap: .625rem;
}

.incoming-call-actions .btn { flex: 1; }

/* Call history list */
.call-history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: background var(--transition);
}

.call-history-item:hover { background: var(--color-surface-2); text-decoration: none; }

.call-direction-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.call-direction-icon.incoming  { background: rgba(47,158,68,.12);  color: var(--color-success); }
.call-direction-icon.outgoing  { background: rgba(246,196,55,.12); color: var(--color-accent); }
.call-direction-icon.missed    { background: rgba(216,58,46,.12);  color: var(--color-danger); }
.call-direction-icon.declined  { background: rgba(216,58,46,.12);  color: var(--color-danger); }

/* ---------------------------------------------------------
   Unpoly drawer — dark theme
   --------------------------------------------------------- */

/* Panel box */
up-drawer-box {
  background-color: var(--color-surface) !important;
  border-left: 1px solid var(--color-border);
  box-shadow: -8px 0 40px rgba(0, 0, 0, .7) !important;
  padding: 0 !important;           /* .app-content handles its own padding */
}

/* Right-positioned drawer gets border on the left; flip for left-positioned */
up-drawer[position=left] up-drawer-box {
  border-left: none;
  border-right: 1px solid var(--color-border);
}

/* Backdrop — darker + subtle blur */
up-drawer-backdrop {
  background: rgba(0, 0, 0, .6) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Dismiss (×) button */
up-drawer-dismiss {
  color: var(--color-muted) !important;
  top: 1rem !important;
  right: 1rem !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  transition: color var(--transition);
  z-index: 1;
}

up-drawer-dismiss:hover {
  color: var(--color-text) !important;
}

/* Make medium drawers a bit wider on larger screens */
@media (min-width: 640px) {
  up-drawer[size=medium] up-drawer-box {
    width: 420px;
  }
}

/* Content area inside the drawer — fill the panel, reset max-width */
up-drawer .app-content {
  max-width: none;
  margin: 0;
  padding: var(--space-6) var(--space-5);
  min-height: 100%;
  color: var(--color-text);
}

/* Unpoly modal — dark theme (for any up-layer="new modal" usage) */
up-modal-box {
  background-color: var(--color-surface) !important;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg) !important;
  padding: var(--space-6) !important;
  color: var(--color-text);
}

up-modal-backdrop {
  background: rgba(0, 0, 0, .6) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

up-modal-dismiss {
  color: var(--color-muted) !important;
}

up-modal-dismiss:hover {
  color: var(--color-text) !important;
}

/* Version badge
   --------------------------------------------------------- */
.app-version-badge {
  position: fixed;
  bottom: calc(var(--nav-height-mob) + 8px);
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: .04em;
  opacity: .45;
  pointer-events: none;
  z-index: 50;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  .app-version-badge {
    bottom: 12px;
  }
}

/* ---------------------------------------------------------
   In-Call Chat & Transcription Overlay (left-side glassy panel)
   --------------------------------------------------------- */

/* Wrapper: panel + toggle tab move together as a unit */
.call-chat-wrapper {
  position: absolute;
  left: 0;
  top: 50%;
  /* Translate left by the panel width so only the toggle tab peeks out */
  transform: translateY(-50%) translateX(-260px);
  display: flex;
  align-items: stretch;
  z-index: 25;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Keep within safe insets on notched phones */
  max-height: min(400px, calc(100vh - 160px));
}

.call-chat-wrapper.open {
  transform: translateY(-50%) translateX(0);
}

/* Glassy panel */
.call-chat-panel {
  width: 260px;
  display: flex;
  flex-direction: column;
  background: rgba(8, 8, 20, 0.52);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255,255,255,.13);
  border-right: none;
  border-radius: 0 0 0 0;
  overflow: hidden;
}

/* Compact label row */
.call-chat-label {
  padding: .45rem .875rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

/* Toggle tab — sticks out to the right of the panel */
.call-chat-toggle {
  width: 44px;           /* wide enough for a comfortable mobile tap */
  height: 52px;          /* compact when panel is closed */
  align-self: center;    /* vertically centred against nothing when closed */
  flex-shrink: 0;
  background: rgba(8, 8, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 0 14px 14px 0;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  transition: background 0.15s, color 0.15s, height 0.3s cubic-bezier(0.4,0,0.2,1);
  padding: 0 4px;
}

/* When the panel is open, let the toggle stretch to match the full panel height */
.call-chat-wrapper.open .call-chat-toggle {
  height: auto;
  align-self: stretch;
}
.call-chat-toggle:hover,
.call-chat-toggle:focus-visible {
  background: rgba(246, 196, 55, 0.3);
  color: #fff;
  outline: none;
}
.call-chat-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}
/* Rotate chevron when panel is open */
.call-chat-wrapper.open .call-chat-toggle svg {
  transform: rotate(180deg);
}

/* Unread badge on the toggle tab */
.chat-unread-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  position: absolute;
  top: 10px;
  right: 8px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.5);
}
.chat-unread-badge[hidden] { display: none; }

/* Messages list */
.call-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: .5rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  /* Thin custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.call-chat-messages::-webkit-scrollbar { width: 4px; }
.call-chat-messages::-webkit-scrollbar-track { background: transparent; }
.call-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

/* Individual message bubble */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 92%;
}

.chat-msg.mine {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg.theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-msg-sender {
  font-size: .65rem;
  color: rgba(255,255,255,.45);
  margin-bottom: 2px;
  padding: 0 3px;
}

.chat-msg-bubble {
  padding: .4rem .65rem;
  border-radius: 12px;
  font-size: .8125rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-msg.mine .chat-msg-bubble {
  background: var(--color-accent);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.chat-msg.theirs .chat-msg-bubble {
  background: rgba(255,255,255,.13);
  color: #fff;
  border-bottom-left-radius: 3px;
}

/* Transcription entries — subtle tint to distinguish from chat messages */
.chat-msg.transcription.mine .chat-msg-bubble {
  background: rgba(246, 196, 55, 0.2);
  border: 1px solid rgba(246, 196, 55, 0.3);
}
.chat-msg.transcription.theirs .chat-msg-bubble {
  background: rgba(47, 158, 68, 0.12);
  border: 1px solid rgba(47, 158, 68, 0.25);
}

.chat-msg-original {
  display: block;
}

/* Thin separator between original text and its translation */
.chat-msg-divider {
  display: block;
  height: 1px;
  background: rgba(255,255,255,.18);
  margin: 5px 0 4px;
  border-radius: 1px;
}

.chat-msg.mine .chat-msg-divider {
  background: rgba(255,255,255,.25);
}

.chat-msg-translation {
  display: block;
  font-size: .75rem;
  opacity: .7;
  line-height: 1.35;
}

/* Message input area */
.call-chat-input {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}

.call-chat-input input[type="text"] {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: .4rem .75rem;
  color: #fff;
  font-size: .8125rem;
  outline: none;
  transition: border-color var(--transition);
  min-width: 0;
}

.call-chat-input input[type="text"]::placeholder { color: rgba(255,255,255,.3); }
.call-chat-input input[type="text"]:focus { border-color: var(--color-accent); }

.call-chat-send {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--transition), transform 0.15s;
}
.call-chat-send:hover { opacity: .85; transform: scale(1.05); }
.call-chat-send svg  { width: 14px; height: 14px; }

/* ---------------------------------------------------------
   Call Detail — Chat & Transcription Log
   --------------------------------------------------------- */

.call-detail-wrap {
  max-width: 680px;
}

.call-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.call-detail-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 .125rem;
}

.call-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .875rem;
}

@media (min-width: 480px) {
  .call-detail-meta { grid-template-columns: repeat(4, 1fr); }
}

.call-meta-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.call-meta-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-muted);
}

.call-meta-value {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.call-log-card { margin-top: 1.25rem; }

.call-log-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-muted);
  margin: 0 0 1rem;
}

.call-log-title svg { width: 16px; height: 16px; }

.call-log-count {
  margin-left: auto;
  background: var(--color-surface-2);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.call-log-list {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.call-log-entry {
  display: flex;
}

.call-log-entry.mine  { justify-content: flex-end; }
.call-log-entry.theirs { justify-content: flex-start; }

.call-log-bubble {
  max-width: 80%;
  padding: .625rem .875rem;
  border-radius: 14px;
  background: var(--color-surface-2);
  position: relative;
}

.call-log-entry.mine .call-log-bubble {
  background: var(--color-accent-muted);
  border-bottom-right-radius: 4px;
}

.call-log-entry.theirs .call-log-bubble {
  border-bottom-left-radius: 4px;
}

.call-log-bubble.transcript {
  border-left: 3px solid var(--color-accent);
}

.call-log-sender {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: .25rem;
}

.call-log-duration {
  font-weight: 400;
  color: var(--color-muted);
}

.call-log-type-badge {
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  line-height: 1.6;
}

.chat-badge {
  background: color-mix(in srgb, var(--color-accent) 15%, transparent);
  color: var(--color-accent);
}

.transcript-badge {
  background: color-mix(in srgb, var(--color-success, #22c55e) 15%, transparent);
  color: var(--color-success, #22c55e);
}

.call-log-text {
  margin: 0;
  font-size: .9rem;
  line-height: 1.45;
  word-break: break-word;
  color: var(--color-text);
}

.call-log-translation {
  margin: .375rem 0 0;
  font-size: .8rem;
  color: var(--color-text-secondary);
}

.call-log-translation::before { content: '↳ '; }

.call-log-time {
  display: block;
  text-align: right;
  font-size: .7rem;
  color: var(--color-muted);
  margin-top: .3rem;
}

/* ---------------------------------------------------------
   Pagination
   --------------------------------------------------------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0 .5rem;
}

.pagination-btn {
  padding: .5rem 1.25rem;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition);
}

.pagination-btn:hover { background: var(--color-border); text-decoration: none; }
.pagination-info { font-size: .875rem; color: var(--color-muted); }

/* ---------------------------------------------------------
   Profile Page
   --------------------------------------------------------- */

.profile-wrap {
  max-width: 640px;
}

/* Header card */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  flex-shrink: 0;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  font-size: 2rem;
  font-weight: 700;
}

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

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 .2rem;
}

.profile-username {
  font-size: .875rem;
  margin: 0 0 .5rem;
}

.profile-bio {
  font-size: .9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

.profile-header-actions {
  width: 100%;
}

@media (min-width: 480px) {
  .profile-header-actions { width: auto; }
}

/* Details card */
.profile-details-card { margin-top: 1.25rem; }

.profile-section-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-muted);
  margin: 0 0 1rem;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.profile-detail-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.profile-detail-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-muted);
}

.profile-detail-value {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--color-text);
  word-break: break-all;
}

.profile-user-number {
  font-family: monospace;
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--color-accent);
  font-weight: 700;
}

.profile-user-number--copyable {
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s;
}

.profile-user-number--copyable:hover {
  opacity: 0.75;
}

.profile-user-number--copied {
  color: var(--color-success, #22c55e);
}

/* Actions card */
.profile-actions-card { margin-top: 1.25rem; }

.profile-action-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-action-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  font-size: .9375rem;
  transition: color var(--transition);
}

.profile-action-item:last-child { border-bottom: none; }
.profile-action-item:hover { color: var(--color-accent); text-decoration: none; }
.profile-action-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.profile-action-chevron { margin-left: auto; opacity: .4; }
.profile-action-danger { color: var(--color-danger); }
.profile-action-danger:hover { color: var(--color-danger); opacity: .8; }

/* Profile edit form */
.profile-edit-avatar-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-edit-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .875rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* ---------------------------------------------------------
   Transcription / Subtitle Overlay
   --------------------------------------------------------- */

/* Transcribe toggle button — active (recording) */
.call-btn-transcribe.active {
  background: rgba(239, 68, 68, 0.5);
  animation: transcribe-pulse 2s ease-in-out infinite;
}

@keyframes transcribe-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Dubbing toggle button — active (voice dubbing on) */
.call-btn-dub.active {
  background: rgba(20, 184, 166, 0.5);
  animation: dub-pulse 2s ease-in-out infinite;
}

@keyframes dub-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(20, 184, 166, 0); }
}

/* Transcribe toggle button — loading VAD model */
.call-btn-transcribe.loading {
  opacity: 0.5;
  cursor: wait;
  animation: vad-loading-spin 1s linear infinite;
}

@keyframes vad-loading-spin {
  from { box-shadow: 0 0 0 0 rgba(255,255,255,.5); }
  50%  { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
  to   { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* VAD speaking indicator — appears while speech is being detected */
.vad-speaking {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: #6bcf7f;
  border-radius: 999px;
  padding: .3rem .75rem .3rem .5rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  pointer-events: none;
  animation: subtitle-in 0.15s ease;
  align-self: center;
}

.vad-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6bcf7f;
  animation: vad-dot-pulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes vad-dot-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.5); opacity: .7; }
}

/* Subtitle container — sits above both toolbars */
#call-subtitles {
  position: absolute;
  bottom: 172px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 2rem));
  z-index: 22;
  display: flex;
  flex-direction: column;
  gap: .375rem;
  pointer-events: none;
}

/* Individual subtitle line */
.subtitle-line {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
  border-radius: var(--radius-md);
  padding: .45rem .875rem;
  font-size: .9375rem;
  line-height: 1.4;
  text-align: center;
  animation: subtitle-in 0.2s ease;
}

@keyframes subtitle-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.subtitle-line.fading {
  transition: opacity 0.6s ease;
  opacity: 0;
}

.subtitle-speaker {
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-accent);
  display: block;
  margin-bottom: 2px;
}

.subtitle-original { display: block; }

.subtitle-divider {
  display: block;
  height: 1px;
  background: rgba(255,255,255,.2);
  margin: 4px 0;
  border-radius: 1px;
}

.subtitle-translation {
  display: block;
  font-size: .8125rem;
  opacity: .7;
}

/* ---------------------------------------------------------
   In-Call Settings Pop-up
   --------------------------------------------------------- */

/* Settings button — fixed to the top-right corner */
.call-btn-settings {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top));
  right: 1rem;
  z-index: 30;
}

.call-btn-settings.active {
  background: rgba(255,255,255,.3);
}

/* GameHub button — fixed below the settings button */
.call-btn-gamehub {
  position: fixed;
  right: 1rem;
  top: calc(1rem + env(safe-area-inset-top) + 3.25rem + 0.75rem);
  z-index: 30;
  transition: none;
}

.call-btn-gamehub:hover  { transform: none; }
.call-btn-gamehub:active { transform: none; }

.call-btn-gamehub.active {
  background: rgba(99, 102, 241, .35);
  color: #a5b4fc;
}

/* GameHub slide-in panel */
.call-gamehub-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  z-index: 35;
  background: rgba(8, 9, 22, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-direction: column;
  animation: gamehub-slide-in .2s ease;
}

.call-gamehub-panel[hidden] { display: none; }

@keyframes gamehub-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.call-gamehub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  flex-shrink: 0;
}

.call-gamehub-title {
  color: #fff;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.call-gamehub-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: .5rem;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}

.call-gamehub-close:hover { background: rgba(255, 255, 255, .2); }

.call-gamehub-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #000;
}

/* Dimmed backdrop — sits above video, below popup */
.call-settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: settings-fade-in .15s ease;
}

/* Glassy popup card — drops down from the top-right button */
.call-settings-popup {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top) + 60px); /* below the button */
  right: 1rem;
  z-index: 41;
  width: min(300px, calc(100vw - 2rem));
  background: rgba(10, 12, 28, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .55);
  animation: settings-slide-down .18s ease;
  overflow: hidden;
}

@keyframes settings-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes settings-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.call-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1rem .75rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.call-settings-title {
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.call-settings-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s;
  flex-shrink: 0;
}
.call-settings-close:hover { background: rgba(255, 255, 255, .2); }
.call-settings-close svg   { width: 14px; height: 14px; }

.call-settings-body {
  padding: .875rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.call-settings-label {
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .55);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.call-settings-select {
  width: 100%;
  padding: .5rem .75rem;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  color: #fff;
  font-size: .9375rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.6)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
  transition: border-color .15s, background-color .15s;
}
.call-settings-select:focus {
  border-color: rgba(255, 255, 255, .4);
  background-color: rgba(255, 255, 255, .12);
}
.call-settings-select option {
  background: #1a1c2e;
  color: #fff;
}

.call-settings-hint {
  font-size: .75rem;
  color: rgba(255, 255, 255, .4);
  line-height: 1.4;
  margin: 0;
}

/* ---------------------------------------------------------
   Dashboard — Home Page
   --------------------------------------------------------- */

/* Stats grid */
.dash-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-bottom: 2rem;
}

/* Individual stat card */
.dash-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.125rem 1.125rem 1.125rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  position: relative;
  transition: border-color var(--transition);
}

.dash-stat-card:hover {
  border-color: var(--color-border-light);
}

.dash-stat-card--warn {
  border-color: rgba(242,140,56,.35);
  background: color-mix(in srgb, var(--color-warning) 5%, var(--color-surface));
}

.dash-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.dash-stat-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.dash-stat-value--sm {
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.dash-stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-top: 2px;
}

.dash-stat-sub {
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.5;
  margin-top: 4px;
}

.dash-stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 5px;
  width: fit-content;
}

.dash-stat-pill--warning {
  background: color-mix(in srgb, var(--color-warning) 18%, transparent);
  color: var(--color-warning);
}

.dash-stat-pill--danger {
  background: color-mix(in srgb, var(--color-danger) 18%, transparent);
  color: var(--color-danger);
}

.dash-stat-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  transition: color var(--transition), transform var(--transition);
  text-decoration: none;
}

.dash-stat-arrow:hover {
  color: var(--color-accent);
  transform: translateX(2px);
  text-decoration: none;
}

/* Section header (Recent Calls label + See all link) */
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.dash-section-title {
  font-size: var(--text-base);
  font-weight: 700;
}

.dash-section-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

.dash-section-link:hover {
  opacity: 0.75;
  text-decoration: none;
}

/* Recent calls list */
.dash-call-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-call-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: background var(--transition);
}

.dash-call-list li:last-child .dash-call-item {
  border-bottom: none;
}

.dash-call-item:hover {
  background: var(--color-surface-2);
  text-decoration: none;
}

.dash-call-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-call-name {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-call-meta {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ---------------------------------------------------------
   In-Call Recording (superadmin)
   --------------------------------------------------------- */

/* Record toggle button — active state */
.call-btn-record.active {
  background: rgba(239, 68, 68, 0.55);
  animation: record-pulse 1.5s ease-in-out infinite;
}

@keyframes record-pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(239, 68, 68, 0.5); }
  50%       { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

/* Picture-in-Picture button — active state */
.call-btn-pip.active {
  background: rgba(99, 179, 237, 0.45);
  box-shadow: 0 0 0 2px rgba(99, 179, 237, 0.6);
}

/* REC badge — fixed top-right, blinking while recording */
.recording-indicator {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top));
  right: 4rem; /* leave room for the settings button */
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(239, 68, 68, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  border-radius: 999px;
  padding: .3rem .75rem .3rem .6rem;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  pointer-events: none;
  z-index: 29;
  animation: rec-blink 1.2s ease-in-out infinite;
}

.recording-indicator::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}

@keyframes rec-blink {
  0%, 100% { opacity: 1;   }
  50%       { opacity: 0.5; }
}

/* Recording save popup — backdrop */
.call-recording-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: settings-fade-in .2s ease;
}

/* Recording save popup — card */
.call-recording-popup {
  position: fixed;
  bottom: 180px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 151;
  width: min(340px, calc(100vw - 2rem));
  background: rgba(10, 12, 28, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 1.25rem;
  color: #fff;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  animation: settings-slide-down .2s ease;
}

.recording-popup-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .3s, color .3s;
}

.recording-popup-icon svg {
  width: 26px;
  height: 26px;
}

.recording-popup-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: rgba(255, 255, 255, .85);
  border-radius: 50%;
  animation: recording-spin .75s linear infinite;
}

@keyframes recording-spin {
  to { transform: rotate(360deg); }
}

.recording-popup-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.recording-popup-status {
  font-size: .875rem;
  color: rgba(255, 255, 255, .65);
  margin: 0;
  line-height: 1.5;
}

/* ---------------------------------------------------------
   Admin nav link — Recordings (superadmin only)
   --------------------------------------------------------- */

.nav-link-admin {
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2);
  padding-top: calc(var(--space-3) + var(--space-2));
}

.nav-link-admin:hover,
.nav-link-admin.active {
  color: rgba(239, 68, 68, 0.9);
  background: rgba(239, 68, 68, 0.08);
}

.nav-link-admin.active {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

/* Mobile tab bar — admin item */
.tab-item-admin {
  color: rgba(239, 68, 68, 0.7);
}

.tab-item-admin.active {
  color: #ef4444;
}

.tab-item-admin:hover {
  color: #ef4444;
}

/* ---------------------------------------------------------
   Recordings list page
   --------------------------------------------------------- */

.recordings-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Recording card */
.recording-card {
  padding: 0;
  overflow: hidden;
}

/* Header: participants + date */
.recording-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.75rem;
  flex-wrap: wrap;
}

.recording-card-parties {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  min-width: 0;
}

.recording-card-arrow {
  color: var(--color-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.recording-card-arrow svg {
  width: 14px;
  height: 14px;
}

.recording-card-names {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  min-width: 0;
}

.recording-card-caller,
.recording-card-callee {
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.recording-card-sep {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.recording-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.recording-card-date {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-2);
  white-space: nowrap;
}

.recording-card-time {
  font-size: var(--text-xs);
  color: var(--color-muted);
  white-space: nowrap;
}

/* Info strip: status chip + duration + call detail link */
.recording-card-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem 0.75rem;
  flex-wrap: wrap;
}

.recording-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.recording-info-link {
  color: var(--color-accent);
  border-color: var(--color-accent-muted);
  background: var(--color-accent-muted);
  text-decoration: none;
  transition: opacity var(--transition);
}

.recording-info-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* Video player */
.recording-player-wrap {
  background: #000;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.recording-player {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #000;
}

/* Footer: recorded-by + actions */
.recording-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  flex-wrap: wrap;
}

.recording-footer-by {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.recording-footer-by strong {
  color: var(--color-text-2);
  font-weight: 600;
}

.recording-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------
   Recording save toast (shown in the call room on manual stop)
   --------------------------------------------------------- */

.recording-toast {
  position: fixed;
  bottom: calc(90px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 200;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: rgba(30, 30, 40, 0.92);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}

.recording-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.recording-toast--saving { color: rgba(255,255,255,.8); }
.recording-toast--saved  { color: #6bcf7f; }
.recording-toast--error  { color: #f08882; }

/* WS reconnection toast colour variants */
.ws-toast--reconnecting { color: #fbbf24; }
.ws-toast--reconnected  { color: #6bcf7f; }
.ws-toast--failed       { color: #f08882; }

/* ---------------------------------------------------------
   Recording delete confirmation modal
   --------------------------------------------------------- */

.rdel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: settings-fade-in .15s ease;
}

.rdel-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 201;
  width: min(380px, calc(100vw - 2rem));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  animation: settings-slide-down .18s ease;
}

.rdel-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(216, 58, 46, 0.12);
  color: var(--color-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}

.rdel-icon svg {
  width: 24px;
  height: 24px;
}

.rdel-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.rdel-body {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-2);
  margin: 0;
  word-break: break-word;
}

.rdel-warning {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin: 0;
}

.rdel-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  width: 100%;
  justify-content: center;
}

.rdel-actions .btn {
  flex: 1;
  max-width: 160px;
}
