* { box-sizing: border-box; }
    html, body {
      margin: 0;
      padding: 0;
      height: 100%;
    }
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background: radial-gradient(circle at top left, #7f5af0, #16161a);
      color: #fffffe;
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      padding-bottom: 0;
    }

    a { color: #7f5af0; text-decoration: none; }

    #loginView, #appView {
      width: 100%;
    }

    .page-wrap {
      width: min(1280px, 100% - 24px);
      margin: 20px auto 32px auto;
    }

    /* ==== LOGIN ==== */

    #loginView {
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .login-card {
      background: rgba(12, 12, 20, 0.96);
      border-radius: 20px;
      padding: 28px 26px 24px;
      width: 360px;
      max-width: 100%;
      margin: 40px auto;
      box-shadow: 0 18px 45px rgba(0,0,0,0.5);
      border: 1px solid rgba(255,255,255,0.08);
      backdrop-filter: blur(14px);
    }

    .login-card h1 {
      margin: 0 0 14px;
      font-size: 22px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .login-logo {
      width: 32px;
      height: 32px;
      border-radius: 999px;
      background: linear-gradient(135deg, #7f5af0, #2cb67d);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
    }
    .login-card p.sub {
      margin: 0 0 20px;
      font-size: 13px;
      color: #94a1b2;
    }

    .login-card label {
      display: block;
      font-size: 12px;
      margin-bottom: 4px;
    }
    .login-card input {
      width: 100%;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid #27272f;
      background: #11111a;
      color: #fffffe;
      font-size: 14px;
      margin-bottom: 10px;
      outline: none;
      transition: border 0.15s, box-shadow 0.15s, background 0.15s;
    }
    .login-card input:focus {
      border-color: #7f5af0;
      box-shadow: 0 0 0 1px rgba(127,90,240,0.45);
      background: #050509;
    }

    .btn {
      border: none;
      border-radius: 999px;
      padding: 8px 12px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
      transition: background 0.18s, box-shadow 0.18s, transform 0.08s, opacity 0.12s;
      font-family: inherit;
    }
    .btn:disabled {
      opacity: 0.45;
      cursor: default;
      box-shadow: none;
      transform: none;
    }
    .btn-primary {
      background: linear-gradient(135deg, #7f5af0, #6246ea);
      color: #fffffe;
      box-shadow: 0 10px 22px rgba(98,70,234,0.55);
    }
    .btn-primary:hover:not(:disabled) {
      transform: translateY(-1px);
      box-shadow: 0 14px 30px rgba(98,70,234,0.75);
    }
    .btn-secondary {
      background: rgba(144,144,176,0.20);
      color: #fffffe;
    }
    .btn-secondary:hover:not(:disabled) {
      background: rgba(144,144,176,0.30);
    }
    .btn-muted {
      background: rgba(144,144,176,0.18);
      color: #fffffe;
    }
    .btn-muted:hover:not(:disabled) {
      background: rgba(144,144,176,0.26);
    }
    .btn-danger {
      background: #ef4565;
      color: #fffffe;
    }
    .btn-danger:hover:not(:disabled) {
      background: #ff5c7a;
    }
    .btn-sm { padding: 5px 10px; font-size: 12px; }
    .btn-full { width: 100%; }

    .row {
      display: flex;
      gap: 10px;
    }

    #loginStatus {
      font-size: 12px;
      margin-top: 8px;
      min-height: 16px;
      color: #f9f5d7;
    }
    .hint {
      font-size: 11px;
      color: #94a1b2;
      margin-top: 10px;
    }

    /* ==== APP ==== */

    #appView {
      display: none;
    }

    .app-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }

    .app-title {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .app-logo {
      width: 34px;
      height: 34px;
      border-radius: 999px;
      background: linear-gradient(135deg, #7f5af0, #2cb67d);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 19px;
    }
    .app-title-text {
      display: flex;
      flex-direction: column;
    }
    .app-title-text span.main {
      font-size: 18px;
      font-weight: 600;
    }
    .app-title-text span.sub {
      font-size: 11px;
      color: #94a1b2;
    }

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

    .user-chip {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: #fffffe;
      padding: 4px 10px;
      border-radius: 4px;
      background: rgba(6,6,14,0.9);
      border: 1px solid rgba(255,255,255,0.06);
    }
    .user-chip-avatar {
      width: 26px;
      height: 26px;
      border-radius: 999px;
      overflow: hidden;
      background: #11111a;
      border: 1px solid rgba(255,255,255,0.15);
      flex-shrink: 0;
    }
    .user-chip-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .status-dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      margin-right: 4px;
      background: #7f8c8d;
    }
    .status-online { background: #2cb67d; }
    .status-away   { background: #f1c40f; }
    .status-busy   { background: #ef4565; }
    .status-offline{ background: #7f8c8d; }

    .icon-btn {
      position: relative;
      border-radius: 999px;
      border: none;
      padding: 6px 9px;
      background: rgba(144,144,176,0.15);
      color: #fffffe;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: background 0.18s, transform 0.08s;
    }
    .icon-btn:hover {
      background: rgba(144,144,176,0.24);
      transform: translateY(-1px);
    }
    .notif-badge {
      position: absolute;
      top: -3px;
      right: -1px;
      min-width: 15px;
      height: 15px;
      border-radius: 999px;
      background: #ef4565;
      color: #fffffe;
      font-size: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 4px;
      box-shadow: 0 0 0 1px rgba(15,15,24,0.95);
    }

    .card {
      background: radial-gradient(circle at top left, rgba(12, 12, 19, 0.8), rgba(6,6,12,0.98));
      border-radius: 20px;
      padding: 14px 14px 16px;
      box-shadow: 0 16px 38px rgba(0,0,0,0.55);
      border: 1px solid rgba(255,255,255,0.08);
      backdrop-filter: blur(12px);
    }

    .layout {
      display: grid;
      grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
      gap: 16px;
    }

    h2 {
      margin: 0 0 10px;
      font-size: 14px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #94a1b2;
    }

    label {
      font-size: 11px;
      color: #94a1b2;
      display: block;
      margin-bottom: 3px;
    }
    input, select, textarea {
      width: 100%;
      padding: 7px 9px;
      border-radius: 10px;
      border: 1px solid #27272f;
      background: #11111a;
      color: #fffffe;
      font-size: 13px;
      outline: none;
      margin-bottom: 7px;
      transition: border 0.15s, box-shadow 0.15s, background 0.15s;
      font-family: inherit;
    }
    input:focus, select:focus, textarea:focus {
      border-color: #7f5af0;
      box-shadow: 0 0 0 1px rgba(127,90,240,0.45);
      background: #050509;
    }
    textarea { resize: vertical; min-height: 60px; }

    .chips-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 10px;
    }
    .chip {
      border-radius: 999px;
      background: rgba(144,144,176,0.18);
      color: #fffffe;
      padding: 3px 8px;
      font-size: 11px;
    }

    .profile-avatar-preview {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 4px;
      margin-bottom: 8px;
    }
    .profile-avatar-preview .avatar {
      width: 40px;
      height: 40px;
      border-radius: 999px;
      overflow: hidden;
      background: #11111a;
      border: 1px solid #27272f;
      flex-shrink: 0;
    }
    .profile-avatar-preview .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .flex-row { display: flex; gap: 8px; align-items: center; }
    .flex-spread { display: flex; gap: 8px; align-items: center; justify-content: space-between; }

    #friendsList, #searchResults {
      max-height: 220px;
      overflow-y: auto;
      padding-right: 4px;
      font-size: 13px;
    }

    .friend-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 4px;
      border-radius: 10px;
      transition: background 0.15s;
    }
    .friend-item:hover {
      background: rgba(255,255,255,0.03);
    }

    .friend-info {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .avatar {
      width: 32px;
      height: 32px;
      border-radius: 999px;
      overflow: hidden;
      background: #11111a;
      border: 1px solid #27272f;
      flex-shrink: 0;
    }
    .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .friend-name {
      font-weight: 500;
    }
    .friend-meta {
      font-size: 11px;
      color: #94a1b2;
    }

    #incomingInfo {
      font-size: 13px;
      margin-bottom: 8px;
    }

    #log {
      font-size: 11px;
      max-height: 640px;
      overflow-y: auto;
      background: #050509;
      border-radius: 10px;
      padding: 6px 8px;
      border: 1px solid #27272f;
      color: #94a1b2;
    }

    #callInfo {
      font-size: 13px;
      margin-bottom: 8px;
      cursor: pointer;
    }

    /* ==== Notification panel ==== */

    .notif-panel {
      position: fixed;
      top: 60px;
      right: 12px;
      width: 320px;
      max-width: calc(100% - 24px);
      background: rgba(8, 8, 16, 0.98);
      border-radius: 16px;
      box-shadow: 0 16px 40px rgba(0,0,0,0.6);
      border: 1px solid rgba(255,255,255,0.12);
      backdrop-filter: blur(14px);
      z-index: 9999;
      overflow: hidden;
    }
    .notif-panel-header {
      padding: 8px 10px;
      font-size: 13px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .notif-list {
      max-height: 260px;
      overflow-y: auto;
    }
    .notif-item {
      padding: 8px 10px;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      font-size: 12px;
    }
    .notif-item:last-child {
      border-bottom: none;
    }
    .notif-title {
      font-weight: 500;
      margin-bottom: 2px;
    }
    .notif-meta {
      font-size: 10px;
      color: #94a1b2;
      margin-top: 3px;
    }
    .notif-actions {
      margin-top: 6px;
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    /* ==== Incoming call overlay ==== */

    .overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.55);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 50;
    }

    .overlay.visible {
      display: flex;
    }

    .overlay-card {
      background: rgba(10, 10, 20, 0.98);
      border-radius: 18px;
      padding: 20px 18px 16px;
      width: 330px;
      max-width: 100%;
      box-shadow: 0 18px 46px rgba(0,0,0,0.7);
      border: 1px solid rgba(255,255,255,0.10);
      text-align: center;
    }
    .overlay-avatar {
      width: 70px;
      height: 70px;
      border-radius: 999px;
      overflow: hidden;
      margin: 0 auto 10px;
      background: #11111a;
      border: 1px solid #27272f;
    }
    .overlay-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .overlay-title {
      font-size: 15px;
      margin-bottom: 4px;
    }
    .overlay-sub {
      font-size: 12px;
      color: #94a1b2;
      margin-bottom: 12px;
    }
    .overlay-buttons {
      display: flex;
      gap: 8px;
      justify-content: center;
      flex-wrap: wrap;
    }

    /* ==== VIDEO AREA ==== */

    .video-wrap {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 10px;
      margin-bottom: 10px;
    }
    .video-main, .video-self {
      background: #050509;
      border-radius: 12px;
      border: 1px solid #27272f;
      position: relative;
      overflow: hidden;
    }
    .video-main video,
    .video-self video {
      width: 100%;
      height: 200px;
      object-fit: cover;
      background: #000;
      display: block;
    }
    .video-label {
      position: absolute;
      left: 8px;
      bottom: 6px;
      background: rgba(0,0,0,0.55);
      padding: 2px 6px;
      border-radius: 999px;
      font-size: 11px;
      color: #fff;
    }

    
    .video-placeholder {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: radial-gradient(circle at top, rgba(127,90,240,0.25), rgba(6,6,12,0.9));
      color: #e5e7eb;
      text-align: center;
      pointer-events: none;
      transition: opacity 0.18s ease;
    }
    .video-placeholder.hidden {
      opacity: 0;
      pointer-events: none;
    }
    .video-placeholder-avatar {
      width: 64px;
      height: 64px;
      border-radius: 999px;
      background: #11111a;
      border: 2px solid rgba(255,255,255,0.18);
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
    }
    .video-placeholder-name {
      font-size: 13px;
      font-weight: 500;
    }
/* ==== CALL CONTROLS ==== */

    .call-controls-row {
      display: flex;
      justify-content: center;
      gap: 14px;
      margin: 10px 0 4px;
    }

    .call-circle-btn {
      width: 50px;
      height: 50px;
      border-radius: 999px;
      border: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      background: #f3f4ff;
      color: #11111a;
      cursor: pointer;
      box-shadow: 0 8px 20px rgba(0,0,0,0.45);
      transition: transform 0.08s, box-shadow 0.12s, background 0.15s, opacity 0.12s;
    }
    .call-circle-btn:hover:not(:disabled) {
      transform: translateY(-1px);
      box-shadow: 0 12px 26px rgba(0,0,0,0.6);
    }
    .call-circle-btn:disabled {
      opacity: 0.45;
      cursor: default;
      box-shadow: none;
      transform: none;
    }
    .call-circle-btn-danger {
      background: #ef4565;
      color: #fff;
    }
    .call-circle-btn-off {
      background: rgba(148,163,184,0.25);
      color: #e5e7eb;
    }

    .call-audio-bar {
      margin-top: 6px;
      padding: 8px 10px;
      border-radius: 12px;
      background: rgba(10,10,20,0.95);
      border: 1px solid rgba(255,255,255,0.06);
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .call-audio-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .call-audio-label {
      font-size: 12px;
      color: #94a1b2;
    }
    .audio-icon-btn {
      border-radius: 999px;
      width: 32px;
      height: 32px;
      border: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(148,163,184,0.2);
      color: #f9fafb;
      cursor: pointer;
      font-size: 16px;
      transition: background 0.15s, transform 0.08s;
    }
    .audio-icon-btn:hover:not(:disabled) {
      background: rgba(148,163,184,0.35);
      transform: translateY(-1px);
    }
    .audio-icon-btn-muted {
      background: rgba(239,69,101,0.35);
    }

    .call-audio-bottom {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .call-audio-bottom input[type="range"] {
      -webkit-appearance: none;
      width: 100%;
      height: 4px;
      border-radius: 999px;
      background: rgba(55,65,81,0.8);
      cursor: pointer;
    }
    .call-audio-bottom input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #7f5af0;
      box-shadow: 0 0 0 2px rgba(15,23,42,0.9);
      margin-top: -5px;
    }
    .call-audio-bottom input[type="range"]::-moz-range-thumb {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #7f5af0;
      border: none;
    }

    .call-audio-bar audio {
      display: none; /* скрываем стандартный плеер */
    }

    /* HOLD BANNER */
    .call-hold-banner {
      margin-top: 6px;
      padding: 6px 10px;
      border-radius: 10px;
      background: rgba(239,69,101,0.12);
      border: 1px solid rgba(239,69,101,0.4);
      font-size: 12px;
      color: #fecaca;
      display: none;
    }

    /* ==== CALL HISTORY ==== */

    #callHistory {
      max-height: 510px;
      overflow-y: auto;
      font-size: 12px;
      border-radius: 10px;
      border: 1px solid #27272f;
      background: #050509;
      padding: 6px 8px;
    }
    .call-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 0;
      border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .call-row:last-child {
      border-bottom: none;
    }
    .call-peer {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .call-direction {
      font-size: 14px;
    }
    .call-direction.out { color: #2cb67d; }
    .call-direction.in { color: #7f5af0; }
    .call-direction.missed { color: #ef4565; }
    .call-meta {
      font-size: 11px;
      color: #94a1b2;
    }

    /* Collapsible headers (мобилка) */

    details.call-block {
      margin-bottom: 8px;
    }
    details.call-block > summary {
      list-style: none;
      cursor: pointer;
      font-size: 12px;
      color: #94a1b2;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    details.call-block > summary::-webkit-details-marker {
      display: none;
    }
    .summary-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 18px;
      height: 18px;
      border-radius: 999px;
      background: rgba(148,163,184,0.25);
      font-size: 11px;
    }

    /* ==== Responsive ==== */

    @media (max-width: 960px) {
      .page-wrap {
        width: calc(100% - 16px);
        margin-top: 10px;
      }
      .layout {
        grid-template-columns: 1fr;
      }
      .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }
      .user-area {
        width: 100%;
        justify-content: space-between;
      }
      #log {
        max-height: 200px;
      }
      .video-main video,
      .video-self video {
        height: 160px;
      }
      /* Dock-панель для медиа-кнопок снизу */
      .call-controls-row {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 10px;
        justify-content: space-around;
        padding: 0 16px;
        z-index: 60;
      }
      .call-circle-btn {
        width: 56px;
        height: 56px;
        font-size: 22px;
      }
      body {
        padding-bottom: 80px; /* чтобы контент не уходил под док */
      }
    }

    @media (max-width: 640px) {
      #log {
        max-height: 240px;
      }
    }

/* ====== Основной layout с левым меню ====== */

.app-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 14px;
}

.sidebar {
  width: 220px;
  min-width: 200px;
  background: rgba(10, 10, 20, 0.96);
  border-radius: 18px;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  padding: 12px 12px 10px;
}

.sidebar-header {
  margin-bottom: 8px;
}

.sidebar-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a1b2;
}

.sidebar-sub {
  font-size: 11px;
  color: #6b7280;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.sidebar-link {
  border: none;
  outline: none;
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.08s ease,
    opacity 0.12s ease;
}

.sidebar-link::after {
  content: "›";
  font-size: 11px;
  opacity: 0.6;
}

.sidebar-link:hover {
  background: rgba(148, 163, 184, 0.25);
  transform: translateY(-1px);
}

.sidebar-link.is-active {
  background: linear-gradient(135deg, #7f5af0, #2cb67d);
  color: #f9fafb;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 12px 30px rgba(15, 23, 42, 0.9);
}

.sidebar-link.is-active::after {
  opacity: 0.95;
}

.app-content {
  flex: 1 1 auto;
  min-width: 0;
}

/* секции-страницы */
.app-section {
  display: none;
  animation: appSectionFade 0.2s ease-out;
}

.app-section.is-active {
  display: block;
}

/* анимация */
@keyframes appSectionFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптация под планшеты и мобильные */
@media (max-width: 960px) {
  .app-body {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar-link {
    flex: 1 1 120px;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .app-body {
    margin-top: 10px;
    gap: 10px;
  }
  .sidebar {
    padding: 10px 8px;
    border-radius: 14px;
  }
  .sidebar-link {
    font-size: 12px;
    padding: 7px 8px;
  }
}


/* вторичная карта (например, история звонков) */
.card.card-secondary {
  margin-top: 12px;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.16), rgba(15, 23, 42, 0.96));
}

/* вертикальный левый блок с логотипом, в стиле диспетчера (Discord-like) */
.sidebar-rail {
  width: 72px;
  min-width: 64px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
  border-radius: 24px;
  margin-right: 12px;
  padding: 10px 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

.rail-logo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0%, #7f5af0, #2cb67d);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

.rail-logo-icon {
  font-size: 22px;
}

/* переопределения для нового layout */
.sidebar-main {
  flex: 0 0 220px;
}

.app-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 14px;
}

/* адаптация под мобильные: прячем rail, делаем меню сверху */
@media (max-width: 960px) {
  .app-body {
    flex-direction: column;
  }
  .sidebar-rail {
    display: none;
  }
  .sidebar-main {
    width: 100%;
  }
}

/* уже существующие медиастили на app-body можно слегка скорректировать, но
   основной responsivity остаётся прежним */

@media (max-width: 960px) {
  .app-body {
    flex-direction: column;
  }
  .sidebar-main {
    width: 100%;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .sidebar-link {
    width: 100%;
    flex: 0 0 auto;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 960px) {
  .app-body {
    flex-direction: column;
  }
  .sidebar-main {
    width: 100%;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .sidebar-link {
    width: 100%;
    flex: 0 0 auto;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 960px) {
  .app-body {
    flex-direction: column;
  }
  .sidebar-main {
    width: 100%;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .sidebar-link {
    width: 100%;
    flex: 0 0 auto;
    justify-content: flex-start;
    text-align: left;
  }
}

.card.card-compact {
  background: rgba(23, 24, 38, 0.95);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.call-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.call-info-status {
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  animation: callStatusFadeIn 0.6s ease-in;
}

.call-status-indicators {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.status-indicator {
  color: #ffffff;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px;
  border-radius: 8px;
  transition: background 0.3s;
}

.status-indicator:hover {
  background: rgba(255, 255, 255, 0.3);
}

.call-controls-row {
  display: flex;
  justify-content: space-around;
  gap: 10px;
}

.call-circle-btn {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  color: #ffffff;
  transition: 0.2s ease;
}

.call-circle-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.call-circle-btn.call-circle-btn-danger {
  background: rgba(255, 50, 50, 0.35);
}

.call-media-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-wrap {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.video-main, .video-self {
  position: relative;
  width: 200px;
  height: 200px;
  background: #333;
  border-radius: 8px;
}

.video-label {
  position: absolute;
  left: 5px;
  font-size: 12px;
  color: white;
}

.video-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #444;
  border-radius: 8px;
}

.video-placeholder-avatar {
  font-size: 36px;
  color: white;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes callStatusFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes videoFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
