/*
 * Application-wide styles. Compiled to application.css by Propshaft.
 */

/* ---- Base reset ------------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
}

/* ---- Flash toasts ---------------------------------------------------- */
.flash {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.flash__msg {
  margin: 0;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: flash-in .25s ease;
}

.flash__msg--notice { background: rgba(26, 161, 121, .92); }
.flash__msg--alert  { background: rgba(196, 75, 58, .92); white-space: pre-line; }

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

/* ===================================================================== */
/* Desktop (post-login home page)                                        */
/* ===================================================================== */
.desktop {
  position: fixed;
  inset: 0;
  overflow: hidden;          /* desktop never scrolls */
  background-image: url("/assets/windows-fda68cf3.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.desktop__icon {
  position: absolute;        /* placed at its grid cell via inline left/top */
  width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 8px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  user-select: none;
  touch-action: none;        /* let pointer events drive dragging */
  transition: background .12s, border-color .12s;
}

.desktop__icon svg,
.desktop__icon img { -webkit-user-drag: none; user-drag: none; }

.desktop__icon:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .3);
}

.desktop__icon.is-dragging {
  z-index: 50;
  opacity: .85;
  transition: none;
  cursor: grabbing;
}

/* Highlight when dragging OS files over a drop zone */
.desktop.is-dropzone::after {
  content: "Drop files to upload";
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: rgba(40, 120, 230, .25);
  border: 3px dashed rgba(150, 200, 255, .9);
  border-radius: 10px;
  pointer-events: none;
  z-index: 60;
}
.desktop--pane.is-dropzone::after { color: #1f4f8b; background: rgba(40, 120, 230, .12); }
.folder-window.is-dropzone { box-shadow: inset 0 0 0 3px rgba(120, 190, 255, .9), 0 24px 64px rgba(0, 0, 0, .5); }

/* Folder highlighted as a drop target while dragging an item over it */
.desktop__icon.is-droptarget {
  background: rgba(80, 160, 255, .35);
  border-color: rgba(120, 190, 255, .9);
  box-shadow: 0 0 0 2px rgba(120, 190, 255, .5);
}

/* ---- File Explorer window (C:/D: drives) ---------------------------- */
.filewin {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 40px;            /* sit above the taskbar */
  display: flex;
  background: #fff;
  color: #1b1b1b;
  z-index: 1;
}

.filewin__nav {
  width: 210px;
  flex: 0 0 auto;
  padding: 10px 8px;
  background: #eef3f8;
  border-right: 1px solid #d4dde7;
  overflow-y: auto;
}
.filewin__nav-title { font-size: 12px; font-weight: 700; color: #2b5797; padding: 6px 8px; }
.filewin__nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 4px;
  color: #1b1b1b;
  text-decoration: none;
  font-size: 13px;
}
.filewin__nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.filewin__nav-item:hover { background: #dceaf7; }
.filewin__nav-item.is-active { background: #cfe3f6; }
.filewin__nav-item.is-droptarget {
  background: rgba(80, 160, 255, .35);
  box-shadow: inset 0 0 0 2px rgba(120, 190, 255, .9);
}

.filewin__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.filewin__addr {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: #f6f9fc;
  border-bottom: 1px solid #e0e6ee;
}
.filewin__crumb {
  padding: 3px 6px;
  font-size: 13px;
  color: #234;
  background: transparent;
  border: 0;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}
.filewin__crumb:hover { background: #e7eef6; }
.filewin__crumb--current { color: #1b1b1b; font-weight: 600; cursor: default; }
.filewin__crumb--current:hover { background: transparent; }
.filewin__sep { color: #9aa7b5; padding: 0 1px; }

/* The shared icon grid rendered as a white content pane inside the window */
.desktop--pane {
  position: relative;
  inset: auto;
  flex: 1;
  min-height: 0;
  background: #fff;
  background-image: none;
  overflow: auto;
}
/* Darker labels on the white pane */
.desktop--pane .desktop__icon { color: #1b1b1b; }
.desktop--pane .desktop__icon-label { text-shadow: none; }
.desktop--pane .desktop__icon:hover { background: #eaf3fb; border-color: #cfe3f6; }
.desktop--pane .desktop__icon-img--file svg { fill: #6b7785; }

/* ---- Folder window (modal) ------------------------------------------ */
.folder-window {
  width: min(760px, 92vw);
  height: min(520px, 80vh);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1b1b1b;
  border: 1px solid rgba(0, 0, 0, .3);
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
}
.folder-window--max { width: 100vw; height: 100vh; border-radius: 0; border: 0; }

.folder-window__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 6px 6px 12px;
  background: linear-gradient(#f6f9fc, #e7eef6);
  border-bottom: 1px solid #d4dde7;
  cursor: default;
  user-select: none;
}
.folder-window__title-text { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #234; }
.folder-window__controls { display: flex; align-items: center; gap: 2px; }
.folder-window__btn {
  min-width: 30px;
  height: 26px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
}
.folder-window__btn:hover { background: rgba(0, 0, 0, .1); }
.folder-window__btn--close { font-size: 18px; }
.folder-window__btn--close:hover { background: #e23b3b; color: #fff; }

.folder-window__body { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #fff; }

.folderwin__addr {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: #f6f9fc;
  border-bottom: 1px solid #e0e6ee;
  flex: 0 0 auto;
}
.folderwin__items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 12px;
}
.folderwin__empty { margin: auto; color: #777; font-size: 14px; }

.winitem {
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}
.winitem svg { -webkit-user-drag: none; pointer-events: none; }
.winitem { touch-action: none; }
.winitem:hover { background: #eaf3fb; border-color: #cfe3f6; }
.winitem.is-droptarget {
  background: rgba(80, 160, 255, .35);
  border-color: rgba(120, 190, 255, .9);
  box-shadow: 0 0 0 2px rgba(120, 190, 255, .5);
}
.winitem--ghost {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  opacity: .85;
  background: #fff;
  border: 1px solid #cfe3f6;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}
.winitem__img { width: 44px; height: 44px; flex: 0 0 auto; overflow: hidden; }
.winitem__img svg { width: 44px; height: 44px; }
.winitem__label {
  font-size: 12px;
  line-height: 1.2;
  max-width: 88px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.desktop__icon:focus-visible {
  outline: none;
  background: rgba(0, 120, 215, .35);
  border-color: rgba(120, 190, 255, .7);
}

.desktop__icon-img {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  overflow: hidden;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .45));
}
.desktop__icon-img svg { width: 48px; height: 48px; }
.desktop__icon-img--folder svg { fill: #f6c84c; }
.desktop__icon-img--file svg { fill: #e9eef5; }

/* Image preview thumbnails (fills the icon box) */
.file-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

/* Inline rename box for a freshly created folder */
.desktop__icon-input {
  width: 80px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  color: #000;
  background: #fff;
  border: 1px solid #2b7fd0;
  border-radius: 2px;
  padding: 1px 2px;
  outline: none;
}

.desktop__icon-label {
  font-size: 12px;
  line-height: 1.25;
  max-width: 84px;
  /* clamp long names to two lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}

/* ---- Right-click context menu --------------------------------------- */
.ctxmenu {
  position: fixed;
  z-index: 1000;            /* above the modal windows (overlays are z-index 300) */
  min-width: 180px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: rgba(43, 43, 43, .98);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  font-size: 13px;
  user-select: none;
}

.ctxmenu[hidden] { display: none; }

.ctxmenu__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.ctxmenu__item:hover { background: rgba(255, 255, 255, .14); }

.ctxmenu__label {
  padding: 6px 12px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #9b9b9b;
  cursor: default;
}

.ctxmenu__sep {
  height: 1px;
  margin: 4px 8px;
  background: rgba(255, 255, 255, .12);
}

.ctxmenu__caret { color: #b8b8b8; }

.ctxmenu__item--danger { color: #ff6b6b; }
.ctxmenu__item--danger:hover { background: rgba(255, 80, 80, .22); }

/* Folder browse header (back + title) */
.explorer-bar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px 6px 8px;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.explorer-bar__back {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, .14);
  border-radius: 50%;
}
.explorer-bar__back:hover { background: rgba(255, 255, 255, .28); }

.explorer-bar__title { font-size: 14px; font-weight: 600; }

/* Submenu: hidden until the parent item is hovered */
.ctxmenu__submenu {
  position: absolute;
  top: -5px;
  left: 100%;
  margin-left: 2px;
  display: none;
}
.ctxmenu__item--sub:hover > .ctxmenu__submenu { display: block; }

/* ---- Start menu (drop-up) ------------------------------------------- */
.startmenu {
  position: fixed;
  left: 6px;
  bottom: 46px;
  z-index: 250;
  width: 240px;
  padding: 8px;
  background: rgba(32, 32, 32, .98);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .45);
}
.startmenu[hidden] { display: none; }

.startmenu__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.startmenu__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
}
.startmenu__name { font-size: 14px; font-weight: 600; }

.startmenu__form { margin: 0; }
.startmenu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.startmenu__item:hover { background: rgba(255, 255, 255, .12); }
.startmenu__icon { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---- Settings modal ------------------------------------------------- */
.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .4);
}
.settings-overlay[hidden] { display: none; }

.settings-window {
  width: min(420px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: #f3f3f3;
  color: #1b1b1b;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
}
.settings-window__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #e6e6e6;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  font-weight: 600;
  font-size: 14px;
}
.settings-window__close {
  width: 30px;
  height: 24px;
  border: 0;
  background: transparent;
  font-size: 18px;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
}
.settings-window__close:hover { background: #e23b3b; color: #fff; }

.settings-form { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.settings-field--avatar { display: flex; align-items: center; gap: 14px; }
.settings-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 20px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
  flex: 0 0 auto;
}
.settings-avatar__btn { font-size: 13px; color: #1b6fd0; cursor: pointer; }
.settings-hidden-file { display: none; }

.settings-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.settings-input {
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 4px;
  background: #fff;
  color: #111;
  width: 100%;
}
.settings-fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 6px;
  padding: 12px;
}
.settings-fieldset legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.settings-hint { color: #666; font-size: 11px; }

.settings-actions { display: flex; justify-content: flex-end; gap: 8px; }
.settings-btn {
  padding: 8px 16px;
  font-size: 13px;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 4px;
  background: #fff;
  color: #111;
  cursor: pointer;
}
.settings-btn--primary { background: #2b7fd0; border-color: #2b7fd0; color: #fff; }
.settings-btn--primary:hover { background: #2569b0; }

/* ---- Media viewer (video / audio) ----------------------------------- */
.mv-overlay {
  position: fixed;
  inset: 0;
  z-index: 330;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .85);
}
.mv-overlay[hidden] { display: none; }
.mv-window { display: flex; flex-direction: column; max-width: 94vw; max-height: 92vh; }
.mv-body { display: grid; place-items: center; min-height: 80px; }
.mv-media { max-width: 94vw; max-height: 82vh; display: block; background: #000; border-radius: 4px; outline: none; }
audio.mv-media { width: 80vw; max-width: 560px; background: transparent; }
.mv-status { color: #ddd; font-size: 14px; margin: 0; }

/* ---- Generic viewers (text / font / zip / epub) --------------------- */
.vw-overlay {
  position: fixed;
  inset: 0;
  z-index: 330;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .6);
}
.vw-overlay[hidden] { display: none; }
.vw-window {
  width: min(900px, 94vw);
  height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1b1b1b;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}
.vw-window--tall { width: min(720px, 94vw); }
.vw-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 14px;
  background: #e6e6e6;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}
.vw-title-text { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-controls { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.vw-btn {
  padding: 6px 12px; font-size: 13px; color: #1b1b1b; background: #fff;
  border: 1px solid rgba(0, 0, 0, .25); border-radius: 5px; cursor: pointer; text-decoration: none;
}
.vw-btn:hover { background: #eaf3fb; }
.vw-btn--close { font-size: 18px; line-height: 1; border-color: transparent; background: transparent; }
.vw-btn--close:hover { background: #e23b3b; color: #fff; }
.vw-body { flex: 1; overflow: auto; background: #fff; }
.vw-status { padding: 16px; color: #777; }

.tx-pre {
  margin: 0; padding: 16px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; white-space: pre; color: #1b1b1b;
}

.ft-body { padding: 24px; }
.ft-pangram { font-size: 40px; margin-bottom: 18px; line-height: 1.2; }
.ft-line { margin: 6px 0; }
.ft-glyphs { margin-top: 18px; font-size: 22px; line-height: 1.7; color: #333; }

.zip-count { padding: 12px 16px; font-weight: 600; border-bottom: 1px solid #eee; }
.zip-list { margin: 0; padding: 8px 16px; list-style: none; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.zip-list li { padding: 3px 0; border-bottom: 1px solid #f2f2f2; }

.epub-body iframe { border: 0; }

/* ---- Properties dialog (Windows-style) ------------------------------ */
.props-window { width: min(460px, 94vw); height: auto; max-height: 86vh; }
.props-body { padding: 18px 20px; }
.props-name { font-size: 15px; font-weight: 600; margin-bottom: 12px; word-break: break-all; }
.props-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.props-table th {
  text-align: left; vertical-align: top; color: #555; font-weight: 500;
  width: 38%; padding: 5px 12px 5px 0; white-space: nowrap;
}
.props-table td { vertical-align: top; padding: 5px 0; color: #1b1b1b; word-break: break-word; }
.props-details-head {
  margin: 16px 0 6px; font-weight: 600;
  border-top: 1px solid #e2e2e2; padding-top: 12px;
}
.props-details th, .props-details td { font-size: 12px; }

/* ---- Image viewer --------------------------------------------------- */
.iv-overlay {
  position: fixed;
  inset: 0;
  z-index: 330;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .8);
}
.iv-overlay[hidden] { display: none; }
.iv-window {
  display: flex;
  flex-direction: column;
  max-width: 94vw;
  max-height: 92vh;
}
.iv-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 4px;
  color: #fff;
}
.iv-title-text { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-controls { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.iv-btn {
  padding: 6px 12px;
  font-size: 13px;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
}
.iv-btn:hover { background: rgba(255, 255, 255, .28); }
.iv-btn--close { font-size: 18px; line-height: 1; }
.iv-body { position: relative; display: grid; place-items: center; min-height: 80px; }
.iv-img { max-width: 94vw; max-height: 80vh; display: block; background: #fff; border-radius: 4px; }
.iv-img:not([src]) { display: none; }
.iv-status { position: absolute; color: #ddd; font-size: 14px; margin: 0; }

/* ---- PDF viewer ----------------------------------------------------- */
.pv-overlay {
  position: fixed;
  inset: 0;
  z-index: 330;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .7);
}
.pv-overlay[hidden] { display: none; }
.pv-window {
  width: 92vw;
  height: 92vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.pv-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 14px;
  background: #e6e6e6;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}
.pv-title-text { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-controls { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pv-btn {
  padding: 6px 12px;
  font-size: 13px;
  color: #1b1b1b;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
}
.pv-btn:hover { background: #eaf3fb; }
.pv-btn--close { font-size: 18px; line-height: 1; border-color: transparent; background: transparent; }
.pv-btn--close:hover { background: #e23b3b; color: #fff; }
.pv-body { flex: 1; position: relative; background: #525659; }
.pv-frame { width: 100%; height: 100%; border: 0; }
.pv-status { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: #ddd; font-size: 14px; }
.pv-status:empty { display: none; }

/* ---- Spreadsheet viewer (Excel / CSV) ------------------------------- */
.sv-overlay {
  position: fixed;
  inset: 0;
  z-index: 330;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .7);
}
.sv-overlay[hidden] { display: none; }
.sv-window {
  width: 92vw;
  height: 92vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.sv-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  background: #f3f3f3;
  border-bottom: 1px solid #e0e0e0;
  overflow-x: auto;
}
.sv-tabs:empty { display: none; }
.sv-tab {
  padding: 5px 12px;
  font-size: 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.sv-tab:hover { background: #e6eef7; }
.sv-tab.is-active { background: #cfe3f6; border-color: #9bc1e8; }

.sv-body { flex: 1; overflow: auto; background: #fff; }
.sv-status { padding: 16px; color: #777; }
.sv-body table { border-collapse: collapse; font-size: 13px; width: max-content; color: #1b1b1b; }
.sv-body td, .sv-body th { border: 1px solid #d8dde3; padding: 4px 8px; white-space: nowrap; }
.sv-body tr:first-child td { position: sticky; top: 0; background: #f6f8fa; font-weight: 600; }

/* ---- Share dialog --------------------------------------------------- */
.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .4);
}
.share-overlay[hidden] { display: none; }
.share-window {
  width: min(440px, 92vw);
  background: #fff;
  color: #1b1b1b;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
}
.share-window__title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 10px 14px;
  background: #e6e6e6; border-bottom: 1px solid rgba(0, 0, 0, .12);
  font-weight: 600; font-size: 14px;
}
.share-window__close { width: 30px; height: 24px; border: 0; background: transparent; font-size: 18px; color: #333; cursor: pointer; border-radius: 4px; }
.share-window__close:hover { background: #e23b3b; color: #fff; }
.share-window__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.share-row { display: flex; gap: 8px; }
.share-input { flex: 1; padding: 8px 10px; font-size: 14px; border: 1px solid rgba(0, 0, 0, .25); border-radius: 4px; }
.share-btn { padding: 8px 16px; font-size: 13px; color: #fff; background: #2b7fd0; border: 0; border-radius: 4px; cursor: pointer; }
.share-linkbtn { padding: 8px 12px; font-size: 13px; color: #2b7fd0; background: transparent; border: 1px dashed #9bc1e8; border-radius: 4px; cursor: pointer; }
.share-list { display: flex; flex-direction: column; gap: 6px; }
.share-empty { color: #888; font-size: 13px; }
.share-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f4f6f8; border-radius: 6px; }
.share-item__label { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-item__copy { font-size: 12px; color: #2b7fd0; background: transparent; border: 0; cursor: pointer; }
.share-item__revoke { font-size: 12px; color: #cf2f2f; background: transparent; border: 0; cursor: pointer; }

/* ---- Shared page (Shared with me / by me) --------------------------- */
.sharedpage { position: fixed; inset: 0; overflow: auto; background-image: url("/assets/windows-fda68cf3.jpg"); background-size: cover; background-position: center; }
.sharedpage__bar {
  position: sticky; top: 0; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(0, 0, 0, .42); backdrop-filter: blur(10px); color: #fff;
}
.sharedpage__title { font-size: 16px; font-weight: 600; }
.sharedpage__body { padding: 20px; display: flex; flex-direction: column; gap: 24px; max-width: 900px; }
.sharedpage__section { background: rgba(255, 255, 255, .92); border-radius: 10px; padding: 16px; }
.sharedpage__heading { margin: 0 0 12px; font-size: 15px; }
.sharedpage__empty { color: #777; font-size: 14px; margin: 0; }
.sharedgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.sharedtile { width: 110px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 8px; text-decoration: none; color: #1b1b1b; text-align: center; }
.sharedtile:hover { background: #eaf3fb; }
.sharedtile__img svg { width: 44px; height: 44px; }
.sharedtile__name { font-size: 12px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sharedtile__by { font-size: 11px; color: #777; }
.sharedlist { display: flex; flex-direction: column; gap: 6px; }
.sharedby { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: #f4f6f8; border-radius: 6px; }
.sharedby__name { font-weight: 600; font-size: 13px; }
.sharedby__to { flex: 1; font-size: 12px; color: #555; }
.sharedby__revoke { font-size: 12px; color: #cf2f2f; background: transparent; border: 0; cursor: pointer; }

/* ---- Public share link page ----------------------------------------- */
.sharelink { max-width: 720px; margin: 40px auto; padding: 0 16px; font-family: "Segoe UI", system-ui, sans-serif; }
.sharelink__head { display: flex; align-items: center; gap: 12px; }
.sharelink__head h1 { font-size: 20px; margin: 0; }
.sharelink__badge { font-size: 12px; color: #2b7fd0; background: #eaf3fb; padding: 3px 8px; border-radius: 999px; }
.sharelink__files { list-style: none; padding: 0; margin: 20px 0; }
.sharelink__files li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e2e6ea; border-radius: 8px; margin-bottom: 8px; }
.sharelink__name { flex: 1; font-size: 14px; }
.sharelink__open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.sharelink__open .sharelink__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sharelink__dl { font-size: 13px; color: #fff; background: #2b7fd0; padding: 6px 12px; border-radius: 4px; text-decoration: none; }
.sharelink__empty { color: #777; }

/* Shared single-file preview */
.sharelink--preview .sharelink__head h1 {
  flex: 1; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sharepreview {
  margin: 20px 0 40px; background: #1b1b1f; border: 1px solid #e2e6ea; border-radius: 8px;
  overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 50vh;
}
.sharepreview__img { max-width: 100%; max-height: 78vh; object-fit: contain; display: block; }
.sharepreview__frame { width: 100%; height: 80vh; border: 0; background: #fff; }
.sharepreview__media { max-width: 100%; max-height: 80vh; }
.sharepreview__audiowrap { padding: 40px 16px; width: 100%; text-align: center; }
.sharepreview__text {
  align-self: stretch; width: 100%; margin: 0; padding: 16px; box-sizing: border-box;
  color: #e8e8e8; background: #14141a; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; white-space: pre; overflow: auto; max-height: 80vh;
}
.sharepreview__none { padding: 48px 20px; text-align: center; color: #aab; }
.sharepreview__none p { margin: 0 0 16px; }

/* ---- Bubu Messenger --------------------------------------------------- */
.msg-overlay { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; background: rgba(0, 0, 0, .35); }
.msg-overlay[hidden] { display: none; }
.msg-window {
  width: 780px; max-width: 95vw; height: 580px; max-height: 88vh;
  display: flex; flex-direction: column; background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .4); font-family: "Segoe UI", system-ui, sans-serif;
}
.msg-window--max { width: 96vw; height: 92vh; max-width: 96vw; max-height: 92vh; }
.msg-window { position: relative; }

/* New chat dialog (in-app, over the messenger window) */
.msg-newchat { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(20, 28, 40, .45); }
.msg-newchat[hidden] { display: none; }
.msg-newchat__card { width: 340px; max-width: 88%; background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.msg-newchat__title { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: #1b1b1b; }
.msg-newchat__hint { margin: 0 0 14px; font-size: 13px; color: #6b7785; line-height: 1.4; }
.msg-newchat__input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d4dae2; border-radius: 6px; font-size: 14px; outline: none; }
.msg-newchat__input:focus { border-color: #1f6fd0; }
.msg-newchat__error { margin: 8px 0 0; font-size: 13px; color: #d33; }
.msg-newchat__error[hidden] { display: none; }
.msg-newchat__btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.msg-newchat__cancel, .msg-newchat__start { border: 0; padding: 9px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.msg-newchat__cancel { background: #eceff3; color: #333; }
.msg-newchat__start { background: #1f6fd0; color: #fff; }
.msg-window__title { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; background: #1f6fd0; color: #fff; }
.msg-window__title-text { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.msg-window__controls { display: flex; gap: 2px; }
.msg-window__btn { width: 34px; height: 28px; border: 0; background: transparent; color: #fff; font-size: 15px; cursor: pointer; border-radius: 4px; }
.msg-window__btn:hover { background: rgba(255, 255, 255, .18); }
.msg-window__btn--close:hover { background: #e23b3b; }
.msg-window__body { flex: 1; display: flex; min-height: 0; }

.msg-list { width: 260px; flex: 0 0 auto; border-right: 1px solid #e6e9ee; display: flex; flex-direction: column; background: #f7f9fc; }
.msg-list__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-weight: 600; font-size: 14px; border-bottom: 1px solid #e6e9ee; }
.msg-list__new { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #1f6fd0; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.msg-list__items { flex: 1; overflow-y: auto; }
.msg-list__empty { padding: 24px 16px; color: #8a93a0; font-size: 13px; text-align: center; }
.msg-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; background: transparent; cursor: pointer; text-align: left; border-bottom: 1px solid #eef1f5; }
.msg-item:hover { background: #eef3fb; }
.msg-item.is-active { background: #e4eefb; }
.msg-item.is-request { background: #fff7e6; }
.msg-item__text { min-width: 0; display: flex; flex-direction: column; }
.msg-item__name { font-size: 14px; color: #1b1b1b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item__sub { font-size: 12px; color: #8a93a0; }
.msg-av { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 600; }

.msg-thread { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-thread__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #99a3b0; padding: 20px; text-align: center; }
.msg-thread__open { flex: 1; display: flex; flex-direction: column; min-height: 0; }
/* the display:flex above otherwise overrides the hidden attribute */
.msg-thread__empty[hidden], .msg-thread__open[hidden], .msg-thread__request[hidden], .msg-compose[hidden] { display: none; }
.msg-thread__head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #e6e9ee; }
.msg-thread__head .msg-av { width: 32px; height: 32px; font-size: 13px; }
.msg-thread__name { font-size: 15px; font-weight: 600; }
.msg-thread__scroll { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: #fbfcfe; }
.msg-loading { color: #99a3b0; text-align: center; }
.msg-b { max-width: 72%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.35; word-wrap: break-word; overflow-wrap: anywhere; }
.msg-b__body { display: block; }
.msg-b__time { display: block; font-size: 10px; opacity: .6; margin-top: 3px; text-align: right; }
.msg-b--me { align-self: flex-end; background: #1f6fd0; color: #fff; border-bottom-right-radius: 4px; }
.msg-b--them { align-self: flex-start; background: #eceff3; color: #1b1b1b; border-bottom-left-radius: 4px; }
.msg-thread__request { padding: 12px 16px; background: #fff7e6; border-top: 1px solid #f0e2c4; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.msg-req__btns { display: flex; gap: 8px; flex: 0 0 auto; }
.msg-req__accept, .msg-req__decline { border: 0; padding: 7px 14px; border-radius: 5px; font-size: 13px; cursor: pointer; }
.msg-req__accept { background: #1aa179; color: #fff; }
.msg-req__decline { background: #e2e6ea; color: #333; }
.msg-compose { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid #e6e9ee; }
.msg-compose__input { flex: 1; border: 1px solid #d4dae2; border-radius: 18px; padding: 9px 14px; font-size: 14px; outline: none; }
.msg-compose__input:focus { border-color: #1f6fd0; }
.msg-compose__btn { width: 36px; height: 36px; flex: 0 0 auto; border: 0; background: transparent; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.msg-compose__btn:hover { background: #eef3fb; }
.msg-compose__btn.is-recording { background: #fde2dd; animation: msg-rec 1s infinite; }
.msg-compose__btn.is-recording svg path { stroke: #e3350d; }
@keyframes msg-rec { 50% { opacity: .5; } }
.msg-compose__send { width: 38px; height: 38px; flex: 0 0 auto; border: 0; border-radius: 50%; background: #1f6fd0; color: #fff; font-size: 15px; cursor: pointer; }

/* file / image / voice message bubbles */
.msg-b--attach { padding: 5px; }
.msg-b__img { display: block; max-width: 240px; max-height: 240px; border-radius: 10px; }
.msg-b__imglink { display: block; }
.msg-b__audio { display: block; width: 240px; max-width: 60vw; height: 38px; }
.msg-b__file { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none; color: inherit; }
.msg-b__fileicon { font-size: 24px; flex: 0 0 auto; }
.msg-b__fileinfo { display: flex; flex-direction: column; min-width: 0; }
.msg-b__filename { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.msg-b__filesize { font-size: 11px; opacity: .7; }
.msg-b--me .msg-b__file { color: #fff; }

/* media gallery + save-to-drive */
.msg-thread__topbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6e9ee; }
.msg-thread__topbar .msg-thread__head { border-bottom: 0; flex: 1; }
.msg-thread__mediabtn { width: 36px; height: 36px; margin-right: 8px; flex: 0 0 auto; border: 0; background: transparent; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.msg-thread__mediabtn:hover { background: #eef3fb; }
.msg-thread__mediabtn[hidden] { display: none; }
.msg-media { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #fbfcfe; }
.msg-media[hidden] { display: none; }
.msg-media__bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #e6e9ee; font-weight: 600; font-size: 14px; }
.msg-media__back { border: 0; background: transparent; color: #1f6fd0; font-size: 14px; cursor: pointer; }
.msg-media__grid { flex: 1; overflow-y: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; align-content: start; }
.msg-media__empty { color: #99a3b0; grid-column: 1 / -1; text-align: center; padding: 30px; }
.msg-media__item { border: 1px solid #e6e9ee; border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.msg-media__thumb { height: 90px; display: flex; align-items: center; justify-content: center; background: #f0f3f7; overflow: hidden; }
.msg-media__thumb img { width: 100%; height: 100%; object-fit: cover; }
.msg-media__icon { font-size: 34px; }
.msg-media__name { font-size: 12px; padding: 6px 8px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-media__acts { display: flex; justify-content: space-between; gap: 6px; padding: 4px 8px 8px; margin-top: auto; }
.msg-media__acts a, .msg-media__acts button { font-size: 11px; border: 0; background: none; color: #1f6fd0; cursor: pointer; padding: 2px; text-decoration: none; }
.msg-media__acts button { color: #1aa179; font-weight: 600; }
.msg-save { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(20, 28, 40, .45); }
.msg-save[hidden] { display: none; }
.msg-save__card { width: 340px; max-width: 88%; background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.msg-save__title { margin: 0 0 14px; font-size: 17px; font-weight: 600; color: #1b1b1b; }
.msg-save__label { display: block; font-size: 13px; color: #6b7785; margin-bottom: 12px; }
.msg-save__select { display: block; width: 100%; margin-top: 5px; padding: 9px 10px; border: 1px solid #d4dae2; border-radius: 6px; font-size: 14px; }
.msg-save__status { margin: 4px 0 0; font-size: 13px; color: #1aa179; }
.msg-save__status[hidden] { display: none; }
.msg-save__btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ---- Camera ---------------------------------------------------------- */
.cam-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .45);
}
.cam-overlay[hidden] { display: none; }

.cam-window {
  width: min(640px, 94vw);
  display: flex;
  flex-direction: column;
  background: #1c1e22;
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.cam-window__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 12px;
  background: linear-gradient(#f6f9fc, #e7eef6);
  color: #234;
  border-bottom: 1px solid #d4dde7;
}
.cam-window__title-text { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.cam-window__close {
  width: 30px; height: 24px; border: 0; background: transparent;
  font-size: 18px; color: #333; cursor: pointer; border-radius: 4px;
}
.cam-window__close:hover { background: #e23b3b; color: #fff; }

.cam-window__body { position: relative; background: #000; }
.cam-video { display: block; width: 100%; max-height: 60vh; background: #000; }
.cam-status {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  font-size: 14px;
  color: #cfcfcf;
  pointer-events: none;
}
.cam-status:empty { display: none; }

.cam-window__toolbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: #26282d;
}
.cam-btn {
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 6px;
  cursor: pointer;
}
.cam-btn:hover { background: rgba(255, 255, 255, .24); }
.cam-btn--record.is-recording { background: #cf2f2f; border-color: #cf2f2f; }

/* ---- Action center (notifications / upload status) ------------------ */
.taskbar__tray-btn--notif { position: relative; }

.ac {
  position: fixed;
  top: 0;
  bottom: 40px;
  right: 0;
  width: 340px;
  max-width: 90vw;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  background: rgba(32, 34, 38, .97);
  color: #fff;
  border-left: 1px solid rgba(255, 255, 255, .12);
  box-shadow: -8px 0 32px rgba(0, 0, 0, .4);
  animation: ac-in .18s ease;
}
.ac[hidden] { display: none; }
@keyframes ac-in { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.ac__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
}
.ac__close {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
}
.ac__close:hover { background: rgba(255, 255, 255, .12); }

.ac__group { padding: 0 12px 12px; overflow-y: auto; }
.ac__group-title { font-size: 12px; color: #bcbcc4; padding: 6px 4px; }
.ac__summary { color: #8ab4f8; }
.ac__empty { color: #9a9aa2; font-size: 13px; padding: 8px 4px; }
.ac__uploads { display: flex; flex-direction: column; gap: 8px; }

.ac-upload {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 10px 12px;
}
.ac-upload__name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-upload__bar { height: 6px; margin: 6px 0 4px; background: rgba(255, 255, 255, .15); border-radius: 3px; overflow: hidden; }
.ac-upload__fill { display: block; height: 100%; width: 0; background: linear-gradient(#5db0ee, #1f7fd0); transition: width .15s; }
.ac-upload__status { font-size: 11px; color: #bcbcc4; }
.ac-upload.is-done .ac-upload__fill { background: linear-gradient(#48c774, #2ea24f); }
.ac-upload.is-done .ac-upload__status { color: #7fdca0; }
.ac-upload.is-failed .ac-upload__fill { background: linear-gradient(#ef6a6a, #cf2f2f); }
.ac-upload.is-failed .ac-upload__status { color: #ff8a8a; }

/* ---- This PC window (Windows Explorer style) ------------------------ */
.pc-window {
  width: min(720px, 92vw);
  height: min(520px, 80vh);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1b1b1b;
  border: 1px solid rgba(0, 0, 0, .3);
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
}

/* Maximized (full screen) */
.pc-window--max {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  border: 0;
}

.pc-window__controls { display: flex; align-items: center; gap: 2px; }
.pc-window__btn {
  width: 34px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
}
.pc-window__btn:hover { background: rgba(0, 0, 0, .1); }
.pc-window__btn--close { font-size: 18px; }
.pc-window__btn--close:hover { background: #e23b3b; color: #fff; }

.pc-window__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 12px;
  background: linear-gradient(#f6f9fc, #e7eef6);
  border-bottom: 1px solid #d4dde7;
}
.pc-window__title-text { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #234; }
.pc-window__title { cursor: default; user-select: none; }

.pc-window__body { flex: 1; padding: 10px 14px 16px; overflow-y: auto; background: #fff; }

.pc-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #2b5797;
  padding: 6px 2px;
}
.pc-group::after { content: ""; flex: 1; height: 1px; background: #d8dee6; }
.pc-group__tri { color: #6b7785; font-size: 10px; }

.pc-drives {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 6px 0;
}

.pc-drive {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
}
.pc-drive:hover { background: #eaf3fb; border-color: #cfe3f6; }

.pc-drive__icon { flex: 0 0 auto; width: 48px; height: 40px; }
.pc-drive__icon svg { width: 48px; height: 40px; }

.pc-drive__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pc-drive__name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-drive__bar {
  width: 140px;
  max-width: 100%;
  height: 12px;
  background: #e9e9e9;
  border: 1px solid #b8b8b8;
  border-radius: 2px;
  overflow: hidden;
}
.pc-drive__fill {
  display: block;
  height: 100%;
  background: linear-gradient(#5db0ee, #1f7fd0);
}
.pc-drive__fill--full { background: linear-gradient(#ef6a6a, #cf2f2f); }

.pc-drive__free { font-size: 11px; color: #555; }

/* ---- Recycle Bin window --------------------------------------------- */
.taskbar__icon--bin { position: relative; }

.taskbar__badge {
  position: absolute;
  top: 3px;
  right: 4px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #e23b3b;
  border-radius: 999px;
}

.bin-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .35);
}
.bin-overlay[hidden] { display: none; }

.bin-window {
  width: min(680px, 92vw);
  height: min(460px, 78vh);
  display: flex;
  flex-direction: column;
  background: #f3f3f3;
  color: #1b1b1b;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
}

.bin-window__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 12px;
  background: #e6e6e6;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}
.bin-window__title { cursor: default; user-select: none; }
.bin-window__title-text { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.bin-window__title-text svg path { fill: #555; }

.bin-window__controls { display: flex; align-items: center; gap: 2px; }

.bin-window__btn {
  width: 34px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
}
.bin-window__btn:hover { background: rgba(0, 0, 0, .1); }
.bin-window__btn--close { font-size: 18px; }
.bin-window__btn--close:hover { background: #e23b3b; color: #fff; }

/* Maximized (full screen) */
.bin-window--max {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
}

.bin-window__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fafafa;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.bin-window__spacer { flex: 1; }

.bin-btn {
  padding: 6px 12px;
  font-size: 13px;
  color: #1b1b1b;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 4px;
  cursor: pointer;
}
.bin-btn:hover:not(:disabled) { background: #eaf3ff; border-color: #2b7fd0; }
.bin-btn:disabled { opacity: .45; cursor: default; }

.bin-window__body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
}

.bin-window__empty {
  margin: auto;
  color: #777;
  font-size: 14px;
}

.bin-item {
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  color: inherit;
  text-decoration: none;
}
.bin-item:hover { background: rgba(0, 0, 0, .05); }
.bin-item.is-selected { background: #cfe4ff; border-color: #2b7fd0; }

.bin-item__img { width: 40px; height: 40px; }
.bin-item__img svg { width: 40px; height: 40px; }

.bin-item__label {
  font-size: 12px;
  line-height: 1.2;
  max-width: 88px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* ---- Windows 10 taskbar --------------------------------------------- */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
}

.taskbar__left {
  display: flex;
  align-items: stretch;
}

.taskbar__start,
.taskbar__icon,
.taskbar__tray-btn {
  display: grid;
  place-items: center;
  min-width: 44px;
  padding: 0 8px;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  transition: background .12s;
}
.taskbar__start:hover,
.taskbar__icon:hover,
.taskbar__tray-btn:hover { background: rgba(255, 255, 255, .12); }

.taskbar__start svg { width: 20px; height: 20px; fill: #fff; }
.taskbar__icon svg { width: 22px; height: 22px; }

/* Search box */
.taskbar__search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  margin: 5px 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .12);
  border-radius: 3px;
  cursor: text;
}
.taskbar__search { position: relative; }
.taskbar__search-icon { width: 16px; height: 16px; fill: #d6d6d6; flex: 0 0 auto; }
.taskbar__search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: 13px;
}
.taskbar__search-input::placeholder { color: #cfcfcf; }

.taskbar__search-results {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin-bottom: 8px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px;
  background: rgba(32, 34, 38, .98);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .45);
  z-index: 1100;
}
.taskbar__search-results[hidden] { display: none; }
.searchres__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.searchres__item:hover { background: rgba(255, 255, 255, .12); }
.searchres__icon { width: 20px; height: 20px; flex: 0 0 auto; }
.searchres__icon svg { width: 20px; height: 20px; }
.searchres__name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchres__empty { padding: 10px; color: #9a9aa2; font-size: 13px; }

/* App icon glyphs */
.taskbar__app {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  color: #fff;
}
.taskbar__app--edge {
  background: conic-gradient(from 200deg, #35c1f0, #1271c4, #0a4ea8, #36c1ee);
}

/* Upload form sits inline with the other taskbar icons */
.taskbar__upload, #upload-form { display: flex; align-items: stretch; }
.taskbar__file-input { display: none; }

/* Mobile: shrink the search box so the +/upload and other icons stay reachable
   (there's no right-click menu on touch). */
@media (max-width: 640px) {
  .taskbar__search {
    width: auto;
    flex: 1 1 70px;
    min-width: 0;
    max-width: 150px;
    margin: 5px 4px;
    padding: 0 8px;
  }
  .taskbar__start,
  .taskbar__icon,
  .taskbar__tray-btn { min-width: 36px; padding: 0 5px; }
  .taskbar__tray-btn { min-width: 30px; }

  /* Drop the clock, volume and hidden-icons tray on mobile; keep the
     notifications bell so upload status stays visible. */
  .taskbar__clock { display: none; }
  .taskbar__tray-btn:not(.taskbar__tray-btn--notif) { display: none; }
}

/* System tray */
.taskbar__tray {
  display: flex;
  align-items: stretch;
  padding-right: 6px;
}
.taskbar__tray-btn svg { width: 18px; height: 18px; }

.taskbar__clock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 0 10px;
  line-height: 1.25;
  cursor: default;
}
.taskbar__time, .taskbar__date { font-size: 12px; }

/* ===================================================================== */
/* Windows 10 style "Other user" sign-in screen                          */
/* ===================================================================== */
.winlock {
  position: fixed;
  inset: 0;
  overflow: hidden;
  color: #fff;
  user-select: none;
}

/* Wallpaper: Windows 10 "hero" style — deep blue with a light beam */
.winlock__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(70% 90% at 72% 38%, rgba(120, 190, 255, .55) 0%, transparent 42%),
    radial-gradient(120% 120% at 78% 30%, rgba(40, 130, 230, .35) 0%, transparent 55%),
    linear-gradient(160deg, #061226 0%, #0a2347 45%, #061a39 100%);
  background-color: #061226;
}

.winlock__bg::after {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(38% 38% at 70% 36%, rgba(255, 255, 255, .08), transparent 70%);
  animation: bloom-drift 24s ease-in-out infinite alternate;
}

@keyframes bloom-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(1.5%, -1.5%, 0) scale(1.05); }
}

/* ---- Center login panel --------------------------------------------- */
.winlock__center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.winlogin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: min(340px, 86vw);
  text-align: center;
  animation: flash-in .3s ease;
}

/* Static generic avatar (no user is logged in yet) */
.winlogin__avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .18);
}

.winlogin__avatar--generic { background: rgba(120, 124, 138, .55); }
.winlogin__avatar--generic svg { width: 74px; height: 74px; fill: #eef0f4; }

/* ---- Form ----------------------------------------------------------- */
.winlogin__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.winlogin__field {
  position: relative;
  width: min(300px, 82vw);
}

.winlogin__input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 2px; /* Windows 10 has near-square inputs */
  outline: none;
  transition: border-color .15s, background .15s;
}

.winlogin__input::placeholder { color: rgba(255, 255, 255, .85); }
.winlogin__input:focus {
  border-color: #fff;
  background: rgba(255, 255, 255, .24);
}

.winlogin__field--pwd .winlogin__input { padding-right: 46px; }

.winlogin__go {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 34px;
  height: calc(100% - 8px);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s;
}

.winlogin__go:hover { background: rgba(255, 255, 255, .22); }

/* ---- Sign-in options / Google --------------------------------------- */
.winlogin__options {
  margin-top: 6px;
  font-size: 13px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: .9;
  text-decoration: underline transparent;
  transition: text-decoration-color .15s;
}
.winlogin__options:hover { text-decoration-color: rgba(255, 255, 255, .8); }

.winlogin__google { margin-top: 4px; }

.winbtn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  background: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.winbtn-google:hover { background: #f1f3f5; }
.winbtn-google::before {
  content: "G";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-weight: 800;
  color: #fff;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0);
  font-size: 11px;
}

/* ---- System tray (bottom-right, decorative) ------------------------- */
.winlock__tray {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
}

.wintray-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: .92;
  transition: background .15s;
}
.wintray-btn:hover { background: rgba(255, 255, 255, .14); }
.wintray-btn svg { width: 20px; height: 20px; fill: currentColor; }
