:root {
  --bg: #080a0f;
  --bg-soft: #0d1017;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);
  --text: #e9edf5;
  --muted: #8a93a6;
  --accent: #67e8f9;
  --accent-2: #a78bfa;
  --accent-ink: #07131a;
  --danger: #fb7185;
  --ok: #34d399;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

/* Ambient background -------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.ambient span:nth-child(1) {
  width: 46vw;
  height: 46vw;
  top: -18vw;
  left: 8vw;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.22), transparent 70%);
}

.ambient span:nth-child(2) {
  width: 40vw;
  height: 40vw;
  bottom: -16vw;
  right: 4vw;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18), transparent 70%);
}

.ambient span:nth-child(3) {
  width: 30vw;
  height: 30vw;
  top: 35%;
  left: 45%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.07), transparent 70%);
}

/* Lock screen --------------------------------------------------------- */

.lock {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
}

.lock-card {
  position: relative;
  width: min(100%, 382px);
  padding: 38px 34px 30px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.025)
  );
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  text-align: center;
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 16px;
  font-size: 24px;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 34px rgba(103, 232, 249, 0.25);
}

.mark.small {
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 11px;
  font-size: 17px;
  flex: 0 0 auto;
}

.lock-card h1 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.lock-card > .muted {
  font-size: 13.5px;
  margin-bottom: 24px;
}

.field {
  margin-bottom: 12px;
}

input,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

input::placeholder,
textarea::placeholder {
  color: #626b7e;
}

input:focus,
textarea:focus {
  border-color: rgba(103, 232, 249, 0.7);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.14);
  background: rgba(0, 0, 0, 0.38);
}

.primary {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px rgba(103, 232, 249, 0.18);
  transition: transform 0.15s, filter 0.15s, opacity 0.15s;
}

.primary:hover {
  filter: brightness(1.06);
}

.primary:active {
  transform: translateY(1px);
}

.primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.primary.wide {
  width: 100%;
}

.primary.small {
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12.5px;
}

.ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: var(--surface);
}

.ghost.small {
  padding: 5px 10px;
  font-size: 12.5px;
}

.form-error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--danger);
}

.lock-card.shake {
  animation: shake 0.35s;
}

/* Shell ---------------------------------------------------------------- */

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  height: 100dvh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px 16px;
  border-right: 1px solid var(--border);
  background: rgba(9, 11, 17, 0.55);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-text span {
  font-size: 11.5px;
  color: var(--muted);
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tab {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 520;
  text-align: left;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
  position: relative;
}

.tab svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab:hover {
  color: var(--text);
  background: var(--surface);
}

.tab.active {
  color: var(--text);
  background: linear-gradient(
    100deg,
    rgba(103, 232, 249, 0.14),
    rgba(167, 139, 250, 0.09)
  );
  border-color: rgba(103, 232, 249, 0.22);
}

.tab.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  translate: 0 -50%;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(var(--accent), var(--accent-2));
}

.tab.active svg {
  color: var(--accent);
}

.sidebar-foot {
  margin-top: auto;
  padding: 0 4px;
}

/* Top bar -------------------------------------------------------------- */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 18px;
}

.topbar h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.topbar p {
  font-size: 13px;
}

/* Panels --------------------------------------------------------------- */

.panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 0 28px 26px;
  overflow: auto;
}

.panel-chat {
  display: flex;
  min-width: 0;
  padding-bottom: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(12px);
}

/* Chat ----------------------------------------------------------------- */

.chat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.chat-card.chat-drop-active {
  border-color: rgba(103, 232, 249, 0.45);
}

.chat-drop-overlay {
  position: absolute;
  inset: 10px;
  z-index: 8;
  display: grid;
  place-items: center;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: rgba(8, 10, 15, 0.94);
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  pointer-events: none;
  backdrop-filter: blur(4px);
  animation: fade-in 0.15s ease both;
}

.chat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.chat-room {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  flex: 1;
  min-width: 0;
}

.chat-room strong {
  font-weight: 620;
}

.chat-room .muted {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
  flex: 0 0 auto;
  transition: background 0.2s, box-shadow 0.2s;
}

.live-dot.off {
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.live-dot.busy {
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.name-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  flex: 0 0 auto;
}

.name-field input {
  width: 130px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 9px;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.messages:empty::before {
  content: var(--empty-message, "No messages yet — say hello.");
  margin: auto;
  color: var(--muted);
  font-size: 13.5px;
}

.msg {
  display: flex;
  gap: 10px;
  max-width: 82%;
  animation: fade-in 0.2s ease both;
}

.msg.self {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 650;
  color: #0a1118;
  background: linear-gradient(
    135deg,
    rgba(103, 232, 249, 0.9),
    rgba(167, 139, 250, 0.9)
  );
  user-select: none;
}

.msg.self .avatar {
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
}

.msg-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.msg.self .msg-body {
  align-items: flex-end;
}

.msg-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  padding: 0 2px;
}

.msg-meta strong {
  color: #b8c0d1;
  font-weight: 600;
}

.msg.self .msg-meta {
  flex-direction: row-reverse;
}

.bubble {
  padding: 9px 13px;
  border-radius: 14px;
  border-top-left-radius: 5px;
  background: var(--surface-3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.45;
}

.msg.self .bubble {
  border-radius: 14px;
  border-top-right-radius: 5px;
  background: linear-gradient(
    135deg,
    rgba(103, 232, 249, 0.2),
    rgba(167, 139, 250, 0.18)
  );
  border-color: rgba(103, 232, 249, 0.22);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  max-height: 160px;
  resize: none;
  border-radius: 12px;
  padding: 10px 13px;
  line-height: 1.4;
}

.composer .primary {
  height: 42px;
  padding-inline: 20px;
}

.composer .composer-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.composer .composer-icon svg {
  width: 18px;
  height: 18px;
}

.composer .composer-icon.recording {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(251, 113, 133, 0.12);
  animation: record-pulse 1.3s ease-in-out infinite;
}

@keyframes record-pulse {
  50% {
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.1);
  }
}

/* Chat media */
.bubble.media-bubble {
  max-width: min(360px, 72vw);
  padding: 5px;
}

.chat-media-link {
  display: block;
}

.chat-media {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: 10px;
  background: #000;
}

video.chat-media {
  width: min(340px, 100%);
}

.chat-voice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 3px 3px 2px;
}

.chat-voice-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 2px 0;
  color: var(--muted);
  font-size: 11.5px;
}

.chat-voice-label svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-audio {
  display: block;
  width: min(320px, 68vw);
}

/* Storage -------------------------------------------------------------- */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 34px 20px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.dropzone svg {
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropzone strong {
  font-size: 14.5px;
}

.dropzone .muted {
  font-size: 12.5px;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: rgba(103, 232, 249, 0.6);
  background: rgba(103, 232, 249, 0.05);
  outline: none;
}

.dropzone.dragging {
  border-color: var(--accent);
  background: rgba(103, 232, 249, 0.09);
  transform: scale(1.005);
}

.uploads {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.uploads:empty {
  margin-top: 0;
}

.upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 13px;
}

.upload-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-status {
  color: var(--muted);
  font-size: 12px;
}

.upload.error .upload-status {
  color: var(--danger);
}

.upload.done .upload-status {
  color: var(--ok);
}

.upload-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.upload-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s;
}

.file-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 2px 12px;
}

.file-head h3 {
  font-size: 15px;
  font-weight: 620;
}

.file-head .muted {
  flex: 1;
  font-size: 12.5px;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: background 0.15s, border-color 0.15s;
}

.file-list li:hover {
  background: var(--surface);
  border-color: var(--border);
}

.file-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(103, 232, 249, 0.1);
  color: var(--accent);
}

.file-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.file-name {
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.file-actions {
  display: flex;
  gap: 6px;
  opacity: 0.65;
  transition: opacity 0.15s;
}

.file-list li:hover .file-actions,
.file-list li:focus-within .file-actions {
  opacity: 1;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.icon-btn.danger:hover {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.08);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.icon-btn:disabled:hover {
  color: var(--muted);
  border-color: var(--border);
  background: transparent;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.list-note {
  padding: 16px 12px;
  color: var(--muted);
  font-size: 13px;
}

.fine-print {
  margin-top: 16px;
  font-size: 11.5px;
  color: #626b7e;
}

/* Empty tabs ----------------------------------------------------------- */

.empty-slot {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  border-style: dashed;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.012);
}

.slot-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border-radius: 13px;
  border: 1px dashed var(--border-strong);
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
}

.empty-slot h3 {
  font-size: 16px;
  font-weight: 600;
}

.empty-slot p {
  max-width: 330px;
  font-size: 13px;
}

/* Toast ---------------------------------------------------------------- */

.toasts {
  position: fixed;
  bottom: 96px;
  left: 50%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: min(90vw, 420px);
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  max-width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: rgba(18, 21, 30, 0.95);
  box-shadow: var(--shadow);
  font-size: 13px;
  text-align: center;
  animation: rise 0.22s ease both;
}

.toast.error {
  border-color: rgba(251, 113, 133, 0.45);
}

/* Animations ----------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes shake {
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive ----------------------------------------------------------- */

@media (max-width: 820px) {
  body {
    overflow: hidden;
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .brand {
    display: none;
  }

  .tabs {
    flex-direction: row;
    flex: 1;
    min-width: 0;
    gap: 2px;
    padding-right: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(
      90deg,
      #000 0,
      #000 calc(100% - 16px),
      transparent 100%
    );
    mask-image: linear-gradient(
      90deg,
      #000 0,
      #000 calc(100% - 16px),
      transparent 100%
    );
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 12.5px;
    gap: 7px;
  }

  .tab.active::before {
    display: none;
  }

  .tab svg {
    width: 16px;
    height: 16px;
  }

  .sidebar-foot {
    margin: 0;
    padding: 0;
  }

  .sidebar-foot .ghost {
    padding: 6px 10px;
    font-size: 12px;
  }

  .topbar {
    padding: 15px 16px 12px;
  }

  .topbar h2 {
    font-size: 18px;
  }

  .topbar p {
    font-size: 12px;
  }

  .panel {
    padding: 0 14px 14px;
  }

  .card {
    padding: 14px;
  }

  .chat-card {
    padding: 0;
  }

  .chat-bar {
    padding: 10px 12px;
  }

  .name-field span {
    display: none;
  }

  .name-field input {
    width: 96px;
  }

  .messages {
    padding: 14px 12px;
  }

  .msg {
    max-width: 92%;
  }

  .composer {
    gap: 6px;
    padding: 10px 12px 12px;
  }

  .composer .composer-icon {
    width: 36px;
    height: 36px;
  }

  .composer .primary {
    height: 38px;
    padding-inline: 12px;
  }

  .composer textarea {
    min-height: 38px;
  }

  .empty-slot {
    min-height: 260px;
  }
}

/* ------------------------------------------------------------------ */
/* Accounts                                                            */
/* ------------------------------------------------------------------ */

.auth-switch {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.auth-mode {
  flex: 1;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.16s, color 0.16s;
}

.auth-mode:hover {
  color: var(--text);
}

.auth-mode.active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.lock-card > .auth-sub {
  margin-bottom: 18px;
}

.auth-hint {
  margin-top: 14px;
  font-size: 11.5px;
  color: #626b7e;
}

.twofa-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  text-align: left;
}

.twofa-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.twofa-account {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.twofa-secret {
  padding: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.twofa-secret-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.twofa-secret-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.twofa-secret-row code {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.twofa-secret .fine-print {
  margin-top: 6px;
  text-align: left;
}

.twofa-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.twofa-qr {
  width: 168px;
  max-width: 100%;
  padding: 9px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}

.twofa-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.twofa-qr-hint {
  margin: 0;
  text-align: center;
}

.twofa-panel .field {
  margin-bottom: 0;
}

.twofa-back {
  position: absolute;
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
}

.twofa-back svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.user-name {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-foot .ghost {
  flex: 0 0 auto;
}

.avatar.tiny {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.avatar.small {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.chat-me {
  font-size: 12.5px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.chat-me strong {
  color: var(--text);
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Friends and direct messages                                         */
/* ------------------------------------------------------------------ */

.panel-friends {
  display: flex;
  min-width: 0;
  padding-bottom: 24px;
}

.friends-card {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.friends-pane {
  display: flex;
  flex-direction: column;
  width: 304px;
  flex: 0 0 304px;
  min-height: 0;
  border-right: 1px solid var(--border);
}

.friends-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 10px;
}

.friends-head h3 {
  font-size: 15px;
  font-weight: 620;
}

.add-friend {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}

.add-friend input {
  flex: 1;
  min-width: 0;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13px;
}

.add-friend .primary {
  padding: 8px 13px;
  font-size: 13px;
  flex: 0 0 auto;
}

.friend-requests {
  max-height: 42%;
  padding: 0 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.friend-requests:empty {
  display: none;
}

.requests-title {
  margin: 8px 4px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.request-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13px;
}

.notification-row {
  width: 100%;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.notification-row:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.notification-row.unread {
  border-color: rgba(103, 232, 249, 0.3);
  background: rgba(103, 232, 249, 0.06);
}

.notification-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notification-title {
  font-size: 12.5px;
  line-height: 1.35;
}

.notification-file {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-time {
  color: var(--muted);
  font-size: 10.5px;
}

.notification-unread-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.request-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-actions {
  display: flex;
  gap: 5px;
}

.request-status {
  font-size: 11.5px;
}

.mini-btn {
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  transition: color 0.15s, border-color 0.15s;
}

.mini-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.32);
}

.mini-btn.accept {
  border: 0;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 650;
}

.friends-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 2px 12px 14px;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.friend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.friend-row:hover {
  background: var(--surface);
}

.friend-row.active {
  background: linear-gradient(
    100deg,
    rgba(103, 232, 249, 0.12),
    rgba(167, 139, 250, 0.08)
  );
  border-color: rgba(103, 232, 249, 0.2);
}

.friend-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.friend-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.friend-name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-preview {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.unread-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.dm-pane {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.dm-empty {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px;
  text-align: center;
}

.dm-empty .slot-icon {
  margin: 0;
}

.dm-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.dm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.dm-peer {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.dm-peer strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-peer .muted {
  font-size: 11.5px;
}

.dm-back {
  display: none;
}

.dm-messages {
  flex: 1;
}

.dm-messages:empty::before {
  content: var(--empty-dm, "Send the first private message.");
}

@media (max-width: 820px) {
  .sidebar-foot .user-chip {
    display: none;
  }

  .panel-friends {
    padding-bottom: 14px;
  }

  .friends-card {
    flex-direction: column;
  }

  .friends-pane {
    width: 100%;
    flex: 1;
    border-right: 0;
  }

  .friends-card:not(.dm-open) .dm-pane {
    display: none;
  }

  .friends-card.dm-open .friends-pane {
    display: none;
  }

  .friends-card.dm-open .dm-pane {
    display: flex;
    flex: 1;
  }

  .dm-back {
    display: grid;
  }

  .dm-head {
    padding: 9px 10px;
  }

  .chat-me {
    display: none;
  }
}

.signout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.signout-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 820px) {
  .signout-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
  }

  .signout-btn span {
    display: none;
  }

  .signout-btn svg {
    width: 16px;
    height: 16px;
  }

  .tab {
    padding: 8px 9px;
    gap: 6px;
  }

  .tabs {
    -webkit-mask-image: linear-gradient(
      90deg,
      #000 0,
      #000 calc(100% - 28px),
      transparent 100%
    );
    mask-image: linear-gradient(
      90deg,
      #000 0,
      #000 calc(100% - 28px),
      transparent 100%
    );
  }
}

/* ------------------------------------------------------------------ */
/* Admin terminal                                                      */
/* ------------------------------------------------------------------ */

.terminal-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
}

.terminal-prompt {
  color: var(--accent);
  margin-right: 4px;
}

.terminal-head strong {
  letter-spacing: 0.02em;
}

.terminal-section h3,
.admin-list-head h3 {
  font-size: 14px;
  font-weight: 620;
}

.terminal-section p {
  margin: 3px 0 10px;
  font-size: 12.5px;
}

.terminal-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.terminal-actions .primary {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.terminal-form input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 13px;
}

.terminal-form .primary {
  padding: 9px 16px;
  font-size: 13px;
  flex: 0 0 auto;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.admin-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 38vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-user-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-badge {
  padding: 2px 6px;
  border: 1px solid rgba(103, 232, 249, 0.25);
  border-radius: 6px;
  background: rgba(103, 232, 249, 0.14);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-badge.danger {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.12);
  color: var(--danger);
}

.terminal-notifications {
  max-height: none;
  padding: 0;
  overflow: visible;
}

.admin-notification-row {
  cursor: default;
}

.admin-notification-row.unread {
  border-color: rgba(103, 232, 249, 0.3);
  background: rgba(103, 232, 249, 0.06);
}

.admin-notification-row .ghost.small {
  flex: 0 0 auto;
}

.admin-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.danger-text:hover {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.45);
}

.terminal-log {
  margin: 0;
  padding: 12px 14px;
  min-height: 90px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 6, 10, 0.72);
  color: #9fb3c8;
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.log-line {
  color: #9fb3c8;
}

.log-line.error {
  color: var(--danger);
}

@media (max-width: 820px) {
  .terminal-form {
    flex-direction: column;
    align-items: stretch;
  }

  .terminal-form .primary {
    width: 100%;
  }

  .admin-user-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions {
    justify-content: flex-end;
  }

  .admin-user-list {
    max-height: none;
  }
}

@media (max-width: 820px) {
  .terminal-form input {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .terminal-form .primary {
    min-height: 44px;
  }
}

/* ------------------------------------------------------------------ */
/* Inside tabs (lobbies, friend notifications)                         */
/* ------------------------------------------------------------------ */

.subtabs {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

.subtabs::-webkit-scrollbar {
  display: none;
}

.subtab {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 560;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.subtab:hover {
  color: var(--text);
  background: var(--surface);
}

.subtab.active {
  color: var(--text);
  background: linear-gradient(
    100deg,
    rgba(103, 232, 249, 0.14),
    rgba(167, 139, 250, 0.09)
  );
  border-color: rgba(103, 232, 249, 0.22);
}

.subtab-badge {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.subtab-empty {
  padding: 4px 2px;
  font-size: 12.5px;
}

.chat-subtabs {
  padding: 10px 14px 4px;
  border-bottom: 0;
}

/* Friends layout with inside tabs ---------------------------------- */

.friends-card {
  flex-direction: column;
}

.friends-body {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.friends-subtabs {
  padding: 10px 16px;
}

.notifications-pane {
  flex: 1;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
}

.notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notifications-head h3 {
  font-size: 15px;
  font-weight: 620;
}

.notifications-hint {
  margin: 3px 0 14px;
  font-size: 12.5px;
}

.notifications-pane .friend-requests {
  max-height: none;
  padding: 0;
  overflow: visible;
}

.notifications-pane .friend-requests:empty {
  display: block;
}

/* Admin lobby list -------------------------------------------------- */

.lobby-list {
  max-height: 26vh;
}

.admin-slug {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
}

.composer textarea:disabled {
  opacity: 0.55;
}

@media (max-width: 820px) {
  .subtabs {
    padding: 8px 10px;
  }

  .subtab {
    padding: 6px 9px;
    font-size: 12px;
  }

  .friends-subtabs {
    padding: 8px 10px;
  }

  .friends-card.dm-open .friends-subtabs {
    display: none;
  }

  .notifications-pane {
    padding: 14px;
  }

  .lobby-list {
    max-height: none;
  }
}

/* ------------------------------------------------------------------ */
/* Terminal settings tabs                                              */
/* ------------------------------------------------------------------ */

.terminal-subtabs {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
}

.terminal-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.terminal-section .admin-user-list {
  margin-top: 12px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
  margin-top: 12px;
}

.setting-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.setting-field > span {
  font-weight: 550;
}

.setting-field input {
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 13px;
}

.setting-field small {
  font-size: 11.5px;
  line-height: 1.5;
}

.settings-form .primary {
  align-self: flex-start;
  padding: 9px 18px;
  font-size: 13px;
}

@media (max-width: 820px) {
  .settings-form .primary {
    align-self: stretch;
    width: 100%;
  }
}

/* Keep long configurable tab labels inside the sidebar. */
.tab > span:not(.nav-badge) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Storage workspace                                                   */
/* ------------------------------------------------------------------ */

.panel-storage {
  display: flex;
  min-width: 0;
  padding-bottom: 24px;
}

.storage-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.storage-subtabs {
  padding: 10px 18px;
}

.storage-view {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.dropzone.compact {
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 13px 16px;
  text-align: left;
}

.dropzone.compact svg {
  width: 24px;
  height: 24px;
  margin: 0;
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.dropzone.compact strong {
  font-size: 13.5px;
}

.upload-limit {
  margin: -2px 2px 0;
  color: var(--muted);
  font-size: 11px;
}

.storage-list-head #file-summary {
  white-space: nowrap;
}

.storage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.storage-search {
  flex: 1 1 180px;
  min-width: 150px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13px;
}

.storage-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.storage-filters::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip:hover {
  color: var(--text);
  background: var(--surface);
}

.chip.active {
  color: var(--text);
  border-color: rgba(103, 232, 249, 0.24);
  background: linear-gradient(
    100deg,
    rgba(103, 232, 249, 0.14),
    rgba(167, 139, 250, 0.09)
  );
}

.storage-sort {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.storage-sort select {
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.storage-list-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 2px;
}

.storage-list-head h3 {
  font-size: 14px;
  font-weight: 620;
}

.storage-list-head .muted {
  font-size: 12px;
}

.storage-access-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.storage-access-head h3 {
  font-size: 15px;
  font-weight: 620;
}

.storage-access-head p {
  margin-top: 2px;
  font-size: 12.5px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.045),
    rgba(255, 255, 255, 0.018)
  );
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}

.file-card:hover {
  border-color: rgba(103, 232, 249, 0.28);
  background: linear-gradient(
    160deg,
    rgba(103, 232, 249, 0.07),
    rgba(255, 255, 255, 0.02)
  );
  transform: translateY(-1px);
}

.file-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.file-kind-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}

.file-kind-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-kind-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.file-card.type-images .file-kind-icon {
  background: rgba(167, 139, 250, 0.14);
  color: #c4b5fd;
}

.file-card.type-documents .file-kind-icon {
  background: rgba(103, 232, 249, 0.13);
  color: var(--accent);
}

.file-card.type-media .file-kind-icon {
  background: rgba(244, 114, 182, 0.14);
  color: #f9a8d4;
}

.file-card.type-archives .file-kind-icon {
  background: rgba(251, 191, 36, 0.13);
  color: #fcd34d;
}

.file-card-name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.file-owner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
}

.all-files-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid rgba(103, 232, 249, 0.25);
  border-radius: 6px;
  background: rgba(103, 232, 249, 0.12);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.file-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.file-share-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 10.5px;
}

.file-share-state.shared {
  color: var(--accent);
}

.file-share-state svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
  opacity: 0.75;
  transition: opacity 0.15s;
}

.file-card:hover .file-card-actions,
.file-card:focus-within .file-card-actions {
  opacity: 1;
}

.file-card-actions .icon-btn {
  width: 29px;
  height: 29px;
  border-radius: 7px;
}

.file-card-actions .icon-btn svg {
  width: 14px;
  height: 14px;
}

.file-empty {
  grid-column: 1 / -1;
  padding: 28px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.access-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.access-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.access-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.access-name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-status {
  font-size: 11.5px;
  color: var(--muted);
}

.access-status.on {
  color: var(--accent);
}

.access-empty {
  padding: 24px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 40px;
  height: 23px;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.18s, border-color 0.18s;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #8a93a6;
  transition: transform 0.18s, background 0.18s;
}

.switch input:checked + span {
  border-color: rgba(103, 232, 249, 0.45);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.switch input:checked + span::after {
  transform: translateX(17px);
  background: #07131a;
}

.switch input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.2);
}

.switch input:disabled + span {
  opacity: 0.5;
}

/* Share modal ------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 9, 0.68);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(100%, 450px);
  max-height: min(86vh, 640px);
  padding: 20px;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: #11141b;
  box-shadow: var(--shadow);
  animation: rise 0.2s ease both;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.modal-head h3 {
  font-size: 16px;
  font-weight: 640;
}

.modal-head p {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.share-hint {
  margin-top: -4px;
  font-size: 12.5px;
}

.share-global-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 9px;
  background: rgba(103, 232, 249, 0.06);
  font-size: 11.5px;
}

.share-friend-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 40vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.share-friend {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.share-friend:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.share-friend input {
  width: 17px;
  height: 17px;
  margin-left: auto;
  accent-color: var(--accent);
  cursor: pointer;
}

.share-friend-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

/* File preview ------------------------------------------------------ */

.preview-card {
  width: min(100%, 920px);
  max-height: min(92vh, 820px);
}

.preview-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  max-height: 65vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0a0d13;
}

.preview-body img,
.preview-body video {
  display: block;
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
}

.preview-body audio {
  width: 100%;
  padding: 24px;
}

.preview-body iframe {
  width: 100%;
  height: 65vh;
  border: 0;
  background: #fff;
}

.preview-text {
  width: 100%;
  max-height: 65vh;
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-message {
  padding: 40px 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.preview-download {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Storage responsive ------------------------------------------------ */

@media (max-width: 820px) {
  .panel-storage {
    padding-bottom: 14px;
  }

  .storage-subtabs {
    padding: 8px 10px;
  }

  .storage-view {
    padding: 14px;
  }

  .storage-toolbar {
    align-items: stretch;
  }

  .storage-search {
    flex-basis: 100%;
  }

  .storage-filters {
    flex: 1 1 auto;
  }

  .storage-sort {
    margin-left: auto;
  }

  .file-grid {
    grid-template-columns: 1fr;
  }

  .storage-list-head {
    margin-top: 2px;
  }

  .modal {
    padding: 12px;
  }

  .modal-card {
    padding: 16px;
  }
}

/* Compact, visibly styled sharing checkboxes. */
.share-friend input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  padding: 0;
  margin-left: auto;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.share-friend input[type="checkbox"]:checked {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.share-friend input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(103, 232, 249, 0.2);
  outline-offset: 1px;
}

/* ------------------------------------------------------------------ */
/* Storage folders                                                     */
/* ------------------------------------------------------------------ */

.folder-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.folder-chips {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.folder-chips::-webkit-scrollbar {
  display: none;
}

.folder-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.folder-chip:hover {
  color: var(--text);
  background: var(--surface);
}

.folder-chip.active {
  color: var(--text);
  border-color: rgba(103, 232, 249, 0.24);
  background: linear-gradient(
    100deg,
    rgba(103, 232, 249, 0.14),
    rgba(167, 139, 250, 0.09)
  );
}

.folder-chip svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.folder-count {
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
}

.folder-chip.active .folder-count {
  background: rgba(103, 232, 249, 0.16);
  color: var(--accent);
}

.file-folder {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-folder svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-folder.root {
  opacity: 0.7;
}

.file-card-actions {
  gap: 2px;
}

.file-card-actions .icon-btn {
  width: 27px;
  height: 27px;
}

#folders-modal .modal-head p {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}

#delete-folder-modal .modal-foot {
  flex-wrap: wrap;
}

.folder-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.folder-create-form input {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 13px;
}

.folder-icon-field {
  display: flex;
  flex-basis: 100%;
  flex-direction: column;
  gap: 6px;
}

.folder-icon-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}

.folder-icon-picker {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.folder-icon-option {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.folder-icon-option:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface-2);
}

.folder-icon-option.active {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.12);
}

.folder-icon-caption {
  grid-column: 1 / -1;
  padding-top: 1px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}

.folder-icon-option svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.folder-row-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.folder-row-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
}

.folder-row-icon:hover {
  background: rgba(251, 191, 36, 0.2);
}

.folder-icon-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px 4px 4px 10px;
}

.danger-btn {
  border: 1px solid rgba(251, 113, 133, 0.4);
  border-radius: 10px;
  padding: 8px 14px;
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.12);
  font-weight: 600;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.danger-btn:hover {
  color: #fff1f2;
  border-color: rgba(251, 113, 133, 0.62);
  background: rgba(251, 113, 133, 0.22);
}

.danger-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.folder-create-form .primary {
  flex: 0 0 auto;
  padding: 9px 14px;
  font-size: 13px;
}

.folder-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 36vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.folder-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  transition: opacity 0.15s;
}

.folder-row.dragging {
  opacity: 0.45;
}

.folder-row.drop-before::before,
.folder-row.drop-after::after {
  position: absolute;
  right: 8px;
  left: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 7px rgba(103, 232, 249, 0.55);
  content: "";
}

.folder-row.drop-before::before {
  top: -4px;
}

.folder-row.drop-after::after {
  bottom: -4px;
}

.folder-drag-handle {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 16px;
  height: 26px;
  color: var(--muted);
  opacity: 0.55;
  cursor: grab;
}

.folder-drag-handle:hover {
  color: var(--text);
  opacity: 1;
}

.folder-drag-handle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.folder-row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
}

.folder-row-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.folder-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.folder-edit-input {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12.5px;
}

.move-folder-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 40vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.move-folder {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.move-folder:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.move-folder input {
  width: 16px;
  height: 16px;
  margin-left: auto;
  accent-color: var(--accent);
  cursor: pointer;
}

.move-folder svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.move-folder-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .folder-bar {
    gap: 6px;
  }

  .folder-chip {
    padding: 6px 8px;
    font-size: 11px;
  }

  .folder-create-form .primary {
    padding: 8px 12px;
  }
}

/* Keep modals from showing a horizontal scrollbar. */
.modal-card {
  overflow-x: hidden;
}

/* Folder cards in the files area */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 8px;
}

.folder-card-wrap {
  position: relative;
  display: flex;
  min-width: 0;
  transition: opacity 0.15s;
}

.folder-card-wrap .folder-card {
  flex: 1;
}

.folder-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.045),
    rgba(255, 255, 255, 0.018)
  );
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s,
    box-shadow 0.18s;
}

.folder-card.is-default {
  border-color: rgba(251, 191, 36, 0.32);
}

.folder-card-wrap.dragging {
  opacity: 0.3;
}

.folder-card-wrap.dragging .folder-card {
  border-style: dashed;
  transform: none;
}

.folder-card-wrap.dragging .folder-star {
  opacity: 0;
}

.folder-star {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  transition: color 0.15s, background 0.15s, opacity 0.18s;
}

.folder-star:hover,
.folder-star:focus-visible,
.folder-star.active {
  opacity: 1;
}

.folder-star:hover {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
}

.folder-star.active {
  color: #fcd34d;
}

@media (hover: none) {
  .folder-star {
    opacity: 0.6;
  }

  .folder-star.active {
    opacity: 1;
  }
}

.folder-star svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.folder-star.active svg {
  fill: currentColor;
}

.storage-view.file-drop-active {
  border-radius: 12px;
  outline: 2px dashed rgba(103, 232, 249, 0.4);
  outline-offset: -4px;
  background: rgba(103, 232, 249, 0.025);
}

.folder-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(
    160deg,
    rgba(251, 191, 36, 0.08),
    rgba(255, 255, 255, 0.02)
  );
  transform: translateY(-1px);
}

.folder-card.active {
  border-color: rgba(103, 232, 249, 0.35);
  background: linear-gradient(
    160deg,
    rgba(103, 232, 249, 0.12),
    rgba(167, 139, 250, 0.05)
  );
}

.folder-card.drag-over {
  border-color: var(--accent);
  background: rgba(103, 232, 249, 0.13);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.16);
  transform: translateY(-1px);
}

.folder-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.13);
  color: #fcd34d;
}

.folder-card-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.folder-card-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.folder-card-count {
  margin-top: auto;
  color: var(--muted);
  font-size: 10.5px;
}

.folder-card.new-folder {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  color: var(--muted);
}

.folder-card.new-folder:hover {
  border-color: rgba(103, 232, 249, 0.4);
  background: rgba(103, 232, 249, 0.05);
  color: var(--text);
}

.folder-card.new-folder .folder-card-icon {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.folder-card.new-folder .folder-card-name {
  color: inherit;
  font-size: 12px;
  font-weight: 550;
}

.folder-card.unfiled-card .folder-card-icon {
  background: rgba(103, 232, 249, 0.12);
  color: var(--accent);
}

.file-card.dragging {
  opacity: 0.45;
  transform: scale(0.99);
}

@media (max-width: 820px) {
  .folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  }

  .folder-card {
    min-height: 86px;
    padding: 10px;
  }

  .folder-card-icon {
    width: 32px;
    height: 32px;
  }
}

/* -------------------------------------------------------------------- */
/* Copy pass: hide page/section descriptions                             */
/* The Storage "Max file size" line (#upload-limit) stays visible.       */
/* -------------------------------------------------------------------- */
#page-subtitle,
.auth-sub,
#auth-hint,
.twofa-hint,
.fine-print,
.notifications-hint,
.share-hint,
[data-text$="_hint"],
[data-text^="empty_tab"] {
  display: none !important;
}
