/* ============================================================
   START95 BOOKMARKS — web.css
   Escritorio estilo Windows 95 completo
   ============================================================ */
:root {
  --w95-face:    #C0C0C0;
  --w95-white:   #FFFFFF;
  --w95-light:   #DFDFDF;
  --w95-mid:     #808080;
  --w95-dark:    #404040;
  --w95-black:   #000000;
  --w95-blue:    #000080;
  --w95-lblue:   #1084D0;
  --w95-sel:     #000080;
  --w95-sel-txt: #FFFFFF;
  --w95-text:    #000000;
  --w95-red:     #C00000;
  --desktop-bg:  #008080; /* teal clásico de Windows 95 */
  --taskbar-h:   32px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 11px;
  color: var(--w95-text);
  overflow: hidden;
  background: var(--desktop-bg);
  cursor: default;
}

/* ──────────────────────────────── SPLASH SCREEN ────── */
#splash {
  position: fixed; inset: 0;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px; z-index: 9999;
}
.splash-logo { display: flex; align-items: center; gap: 20px; }
.splash-win-logo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  width: 56px; height: 56px;
}
.splash-win-logo .q { border-radius: 2px; }
.splash-title { color: #fff; font-size: 36px; font-weight: bold; }
.splash-title span { font-style: italic; }
.splash-sub  { color: #808080; font-size: 14px; margin-top: 4px; }
.splash-bar-track { width: 320px; height: 20px; border: 2px solid #404040; background: #000; }
.splash-bar-fill  { height: 100%; background: var(--w95-blue); width: 0; transition: width 0.1s; }
.splash-msg { color: #808080; font-size: 12px; }

/* ──────────────────────────────── COLORES WIN-LOGO ─── */
.q.red    { background: #FF4444; }
.q.green  { background: #44CC44; }
.q.blue   { background: #4444FF; }
.q.yellow { background: #FFCC00; }

/* ──────────────────────────────── ESCRITORIO ────────── */
#desktop {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--taskbar-h);
  overflow: hidden;
}

/* ──────────────────────────────── TASKBAR ──────────── */
#taskbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--taskbar-h);
  background: var(--w95-face);
  border-top: 2px solid var(--w95-white);
  box-shadow: inset 0 1px 0 var(--w95-light);
  display: flex; align-items: center;
  gap: 4px; padding: 0 4px;
  z-index: 100;
}

#taskbar-start {
  display: flex; align-items: center; gap: 4px;
  background: var(--w95-face);
  border-top:   2px solid var(--w95-white);
  border-left:  2px solid var(--w95-white);
  border-right: 2px solid var(--w95-black);
  border-bottom:2px solid var(--w95-black);
  box-shadow: inset 1px 1px 0 var(--w95-light), inset -1px -1px 0 var(--w95-mid);
  padding: 2px 8px;
  font-weight: bold; font-size: 12px;
  cursor: pointer; user-select: none;
  height: 24px;
}
#taskbar-start:active { border-color: var(--w95-black) var(--w95-white) var(--w95-white) var(--w95-black); }

.win-logo-tiny {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  width: 14px; height: 14px; flex-shrink: 0;
}

#taskbar-items { display: flex; gap: 2px; flex: 1; }
.task-item {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 8px; height: 24px;
  background: var(--w95-face);
  font-size: 11px; cursor: pointer; user-select: none;
  border-top: 2px solid; border-left: 2px solid;
  border-right: 2px solid; border-bottom: 2px solid;
}
.task-item.active {
  border-color: var(--w95-mid) var(--w95-white) var(--w95-white) var(--w95-mid);
  box-shadow: inset 1px 1px 0 var(--w95-dark);
}
.task-item:not(.active) {
  border-color: var(--w95-white) var(--w95-black) var(--w95-black) var(--w95-white);
  box-shadow: inset 1px 1px 0 var(--w95-light), inset -1px -1px 0 var(--w95-mid);
}

#taskbar-tray {
  display: flex; align-items: center; gap: 6px;
  padding: 0 8px;
  height: 24px;
  border-top:   2px solid var(--w95-mid);
  border-left:  2px solid var(--w95-mid);
  border-right: 2px solid var(--w95-white);
  border-bottom:2px solid var(--w95-white);
  box-shadow: inset 1px 1px 0 var(--w95-dark);
}

.tray-item { cursor: pointer; font-size: 14px; }
.tray-item:hover { filter: brightness(1.2); }

#taskbar-clock { font-size: 11px; white-space: nowrap; }

/* ──────────────────────────────── VENTANAS WIN95 ───── */
.win95-window {
  background: var(--w95-face);
  border-top:   2px solid var(--w95-white);
  border-left:  2px solid var(--w95-white);
  border-right: 2px solid var(--w95-black);
  border-bottom:2px solid var(--w95-black);
  box-shadow: inset 1px 1px 0 var(--w95-light), inset -1px -1px 0 var(--w95-mid);
  display: flex; flex-direction: column;
}

.win95-titlebar {
  background: linear-gradient(to right, var(--w95-blue), var(--w95-lblue));
  color: var(--w95-white);
  font-size: 11px; font-weight: bold;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 2px 4px; height: 22px;
  user-select: none; flex-shrink: 0;
}
.titlebar-left { display: flex; align-items: center; gap: 4px; }
.titlebar-btns { display: flex; gap: 2px; }

.tb-btn {
  width: 16px; height: 14px;
  background: var(--w95-face);
  color: var(--w95-text);
  font-size: 9px; font-family: Arial, sans-serif;
  border-top:   1px solid var(--w95-white);
  border-left:  1px solid var(--w95-white);
  border-right: 1px solid var(--w95-black);
  border-bottom:1px solid var(--w95-black);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.tb-btn:active { border-color: var(--w95-black) var(--w95-white) var(--w95-white) var(--w95-black); }
.tb-btn.close:hover { background: var(--w95-red); color: white; }

.win95-window-body { padding: 12px; flex: 1; overflow-y: auto; }

/* ──────────────────────────────── VENTANA MARCADORES ─ */
.desktop-window {
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
}

#bm-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px;
  border-bottom: 2px solid var(--w95-mid);
  gap: 8px; flex-shrink: 0;
  flex-wrap: wrap;
}
.toolbar-group { display: flex; align-items: center; gap: 2px; }
.toolbar-group.right { margin-left: auto; }
.toolbar-sep { width: 1px; height: 20px; background: var(--w95-mid); margin: 0 4px; }

.toolbar-btn {
  display: flex; align-items: center; gap: 3px;
  font-family: Arial, sans-serif; font-size: 11px;
  background: var(--w95-face); color: var(--w95-text);
  border: 1px solid transparent;
  padding: 3px 6px; cursor: pointer;
}
.toolbar-btn:hover {
  border-top:   1px solid var(--w95-white);
  border-left:  1px solid var(--w95-white);
  border-right: 1px solid var(--w95-black);
  border-bottom:1px solid var(--w95-black);
}
.toolbar-btn:active {
  border-color: var(--w95-black) var(--w95-white) var(--w95-white) var(--w95-black);
}

/* ──────────────────────────────── LAYOUT DOS PANELES ─ */
#bm-layout {
  display: flex; flex: 1;
  overflow: hidden;
  min-height: 0;
}

#folder-tree-panel {
  width: 200px; min-width: 120px; max-width: 400px;
  border-right: 2px solid var(--w95-mid);
  display: flex; flex-direction: column;
  flex-shrink: 0; overflow: hidden;
}

#content-panel {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

.panel-header {
  font-size: 11px; font-weight: bold;
  padding: 3px 8px;
  background: var(--w95-light);
  border-bottom: 1px solid var(--w95-mid);
  flex-shrink: 0;
}

#folder-tree {
  flex: 1; overflow-y: auto; padding: 4px 0;
}

#bm-list {
  flex: 1; overflow-y: auto; padding: 4px 0;
}

/* ──────────────────────────────── ÁRBOL DE CARPETAS ── */
.tree-item {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 8px; cursor: pointer;
  user-select: none; white-space: nowrap;
}
.tree-item:hover { background: var(--w95-light); }
.tree-item.selected { background: var(--w95-sel); color: var(--w95-sel-txt); }
.tree-indent { width: 12px; flex-shrink: 0; }
.tree-arrow {
  width: 12px; text-align: center;
  font-size: 8px; flex-shrink: 0; color: var(--w95-dark);
}
.tree-item.selected .tree-arrow { color: var(--w95-sel-txt); }

/* ──────────────────────────────── LISTA DE MARCADORES  */
.bm-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px; cursor: pointer;
  border-bottom: 1px solid var(--w95-light);
}
.bm-item:hover { background: #EEF0FF; }
.bm-item.selected { background: var(--w95-sel); color: var(--w95-sel-txt); }

.bm-favicon {
  width: 16px; height: 16px; flex-shrink: 0;
  image-rendering: pixelated;
}

.bm-info { flex: 1; min-width: 0; }
.bm-name { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-url  { font-size: 10px; color: var(--w95-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-item.selected .bm-url { color: var(--w95-light); }

.bm-separator { height: 2px; border-top: 1px solid var(--w95-mid); border-bottom: 1px solid var(--w95-white); margin: 3px 12px; }
.bm-folder-item { font-weight: bold; }

#bm-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex: 1; padding: 40px; color: var(--w95-mid);
  text-align: center; gap: 8px;
}
.empty-icon { font-size: 40px; }

/* ──────────────────────────────── STATUS BAR ────────── */
#status-bar {
  display: flex; align-items: center;
  height: 22px;
  border-top: 2px solid var(--w95-mid);
  padding: 0 6px; gap: 0; flex-shrink: 0;
}
.status-item {
  padding: 0 8px; font-size: 11px;
  border-top:   2px solid var(--w95-mid);
  border-left:  2px solid var(--w95-mid);
  border-right: 2px solid var(--w95-white);
  border-bottom:2px solid var(--w95-white);
  height: 18px; display: flex; align-items: center;
}
.status-sep { width: 4px; }

/* ──────────────────────────────── VENTANA CUENTA ───── */
.side-window {
  position: absolute; top: 10px; right: 10px;
  width: 260px;
}
.user-card { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.user-avatar-big { font-size: 40px; }
.acc-name { font-size: 13px; font-weight: bold; margin-bottom: 2px; }
.acc-email { font-size: 11px; color: var(--w95-mid); }
.full-w { width: 100%; margin-bottom: 6px; }

/* ──────────────────────────────── AUTH SCREEN ───────── */
#auth-screen {
  position: fixed; inset: 0;
  background: var(--desktop-bg);
  display: flex; align-items: center; justify-content: center;
}
.auth-window { width: 360px; }
.auth-tabs {
  display: flex; gap: 0; padding: 6px 6px 0;
  background: var(--w95-face);
}
.auth-tab {
  font-family: Arial, sans-serif; font-size: 11px;
  background: var(--w95-light); color: var(--w95-text);
  border-top:   2px solid var(--w95-white);
  border-left:  2px solid var(--w95-white);
  border-right: 2px solid var(--w95-mid);
  border-bottom: 2px solid var(--w95-face);
  padding: 3px 12px 5px;
  cursor: pointer; margin-right: 2px;
}
.auth-tab.active {
  background: var(--w95-face); font-weight: bold;
  position: relative; z-index: 1; top: 1px;
}
.auth-body { padding: 16px; }
.auth-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.auth-msg {
  padding: 4px 8px; font-size: 11px;
  border: 1px solid; margin-top: 8px;
}
.auth-msg.error   { background: #FFF0F0; color: var(--w95-red); border-color: var(--w95-red); }
.auth-msg.success { background: #F0FFF0; color: #006400; border-color: #006400; }

/* ──────────────────────────────── MODAL ─────────────── */
#modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
}
.modal-win { width: 360px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ──────────────────────────────── MENÚ CONTEXTUAL ──── */
.win95-ctx-menu {
  position: fixed;
  background: var(--w95-face);
  border-top:   2px solid var(--w95-white);
  border-left:  2px solid var(--w95-white);
  border-right: 2px solid var(--w95-black);
  border-bottom:2px solid var(--w95-black);
  box-shadow: 3px 3px 0 var(--w95-black);
  z-index: 600; min-width: 160px; padding: 2px 0;
}
.ctx-item {
  padding: 4px 24px; font-size: 11px;
  cursor: pointer; white-space: nowrap;
}
.ctx-item:hover { background: var(--w95-sel); color: var(--w95-sel-txt); }
.ctx-item.danger:hover { background: var(--w95-red); color: white; }
.ctx-sep { height: 6px; border-top: 1px solid var(--w95-mid); border-bottom: 1px solid var(--w95-white); margin: 2px 4px; }

/* ──────────────────────────────── FORMS ─────────────── */
.field-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.field-row label { width: 90px; flex-shrink: 0; font-size: 11px; }

.win95-input, .win95-select {
  flex: 1; font-family: Arial, sans-serif; font-size: 11px;
  background: var(--w95-white);
  border-top:   2px solid var(--w95-mid);
  border-left:  2px solid var(--w95-mid);
  border-right: 2px solid var(--w95-light);
  border-bottom:2px solid var(--w95-light);
  padding: 2px 5px; color: var(--w95-text);
}
.win95-input:focus, .win95-select:focus {
  outline: none;
  border-color: var(--w95-black) var(--w95-light) var(--w95-light) var(--w95-black);
}
#search-box { width: 200px; flex: none; }

/* ──────────────────────────────── BOTONES ───────────── */
.win95-btn {
  font-family: Arial, sans-serif; font-size: 11px;
  background: var(--w95-face); color: var(--w95-text);
  border-top:   2px solid var(--w95-white);
  border-left:  2px solid var(--w95-white);
  border-right: 2px solid var(--w95-black);
  border-bottom:2px solid var(--w95-black);
  box-shadow: inset 1px 1px 0 var(--w95-light), inset -1px -1px 0 var(--w95-mid);
  padding: 3px 14px; cursor: pointer; min-width: 75px;
}
.win95-btn:active {
  border-color: var(--w95-black) var(--w95-white) var(--w95-white) var(--w95-black);
  box-shadow: inset -1px -1px 0 var(--w95-light), inset 1px 1px 0 var(--w95-mid);
}
.win95-btn.primary { font-weight: bold; }
.win95-btn.danger  { color: var(--w95-red); }
.win95-btn.link-btn { border-color: transparent; box-shadow: none; color: var(--w95-blue); text-decoration: underline; min-width: auto; }

/* ── FILAS DE MARCADORES (web.js usa .bm-row) ───────── */
.bm-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px; cursor: pointer;
  border-bottom: 1px solid var(--w95-light);
  min-width: 0;
}
.bm-row:hover { background: #EEF0FF; }
.bm-row.selected { background: var(--w95-sel); color: var(--w95-sel-txt); }

.bm-folder-icon { font-size: 16px; flex-shrink: 0; }
.bm-count {
  margin-left: auto; font-size: 10px; color: var(--w95-mid);
  white-space: nowrap; flex-shrink: 0;
}

/* ── DRAG & DROP ─────────────────────────────────────── */
.bm-row.dragging  { opacity: 0.4; }
.bm-row.drag-over {
  background: var(--w95-sel);
  outline: 2px dashed var(--w95-blue);
  outline-offset: -2px;
}

.separator-h { height: 6px; border-top: 1px solid var(--w95-mid); border-bottom: 1px solid var(--w95-white); margin: 8px 0; }
.hidden { display: none !important; }
.hint { font-size: 10px; color: var(--w95-mid); margin: 4px 0; line-height: 1.5; }
.danger-zone { margin-top: 8px; }

/* Scrollbars Win95 */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: var(--w95-face); border: 1px solid var(--w95-mid); }
::-webkit-scrollbar-thumb {
  background: var(--w95-face);
  border-top:   1px solid var(--w95-white);
  border-left:  1px solid var(--w95-white);
  border-right: 1px solid var(--w95-black);
  border-bottom:1px solid var(--w95-black);
  min-height: 20px;
}
::-webkit-scrollbar-button {
  background: var(--w95-face);
  border-top:   1px solid var(--w95-white);
  border-left:  1px solid var(--w95-white);
  border-right: 1px solid var(--w95-black);
  border-bottom:1px solid var(--w95-black);
  height: 16px;
}
