/* Classic PC Desktop Workspace Stylesheet */

:root {
  --retro-bg: #008080; /* Classic Windows 95/98 Teal */
  --retro-card: #ffffff;
  --retro-text: #000000;
  --retro-border: #000000;
  --retro-blue: #3a86c8;
  --retro-navy: #000080;
  --retro-pink: #ff70a6;
  --retro-orange: #ff595e;
  --retro-yellow: #ffca3a;
  --retro-green: #8ac926;
  --retro-grey: #dfdfdf;
  --retro-shadow: 4px 4px 0px #000000;
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--retro-bg);
  font-family: var(--font-display);
  color: var(--retro-text);
  user-select: none;
}

/* Desktop screen container */
.desktop-screen {
  width: 100vw;
  height: calc(100vh - 40px); /* 40px for bottom taskbar */
  position: relative;
  overflow: hidden;
  padding: 20px;
}

/* Shortcuts Layout */
.desktop-shortcuts {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 15px;
  height: 100%;
  max-width: 320px;
}

.desktop-icon {
  width: 85px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  color: #ffffff;
  text-shadow: 1px 1px 1px #000000, 2px 2px 2px #000000;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background 0.1s;
}

.desktop-icon:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.desktop-icon.selected {
  background-color: var(--retro-navy);
  border-color: #ffffff;
  color: #ffffff;
  text-shadow: none;
}

.icon-visual {
  font-size: 2.2rem;
  margin-bottom: 4px;
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.5));
}

.icon-label {
  word-break: break-word;
  line-height: 1.2;
}

.shortcut-divider {
  width: 60px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
  margin: 5px 0;
  align-self: center;
}

/* Floating Window Layouts */
.system-window {
  position: absolute;
  min-width: 250px;
  z-index: 10;
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.4);
}

.system-window.maximized {
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 40px) !important;
}

/* Bottom Taskbar */
.taskbar {
  height: 40px;
  background-color: var(--retro-grey);
  border-top: 3px solid #ffffff;
  box-shadow: 0 -2px 0px #000000;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 9999;
}

.start-btn-container {
  position: relative;
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--retro-grey);
  border: 2px solid var(--retro-border);
  box-shadow: 1px 1px 0px #ffffff inset, 1px 1px 0px rgba(0, 0, 0, 0.5);
  padding: 4px 10px;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.95rem;
  border-radius: 2px;
}

.start-btn:active, .start-btn.active {
  box-shadow: 1px 1px 0px #000000 inset;
  transform: translate(1px, 1px);
}

.start-icon {
  font-size: 1.1rem;
}

/* Start Menu Popover */
.start-menu {
  position: absolute;
  bottom: 35px;
  left: 0;
  width: 230px;
  background-color: var(--retro-grey);
  border: 3px solid var(--retro-border);
  box-shadow: var(--retro-shadow);
  display: flex;
  z-index: 10000;
}

.start-sidebar {
  background: var(--retro-navy);
  color: #ffffff;
  width: 38px;
  padding: 15px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sidebar-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

.start-menu-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  background: var(--retro-grey);
}

.start-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  text-decoration: none;
  color: #000000;
  font-weight: 800;
  font-size: 0.9rem;
}

.start-item:hover {
  background-color: var(--retro-navy);
  color: #ffffff;
}

.start-item-icon {
  font-size: 1.25rem;
}

.start-divider {
  border: 0;
  border-top: 2px solid #808080;
  border-bottom: 2px solid #ffffff;
  margin: 6px 0;
}

/* Running Taskbar Buttons */
.task-buttons {
  display: flex;
  gap: 6px;
  flex: 1;
  margin: 0 15px;
  height: 100%;
  align-items: center;
  overflow-x: auto;
}

.task-btn {
  background-color: var(--retro-grey);
  border: 2px solid var(--retro-border);
  box-shadow: 1px 1px 0px #ffffff inset;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 2px;
  max-width: 140px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 28px;
}

.task-btn.active {
  background-color: #fffdf2;
  box-shadow: 1px 1px 0px #000000 inset;
}

/* System clock tray */
.system-tray {
  background-color: var(--retro-grey);
  border: 2px solid var(--retro-border);
  box-shadow: 1px 1px 0px #ffffff inset;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.85rem;
  height: 28px;
}

.tray-icon {
  font-size: 0.95rem;
}

.tray-user {
  font-size: 0.78rem;
  background: #ffffff;
  border: 2px solid var(--retro-border);
  padding: 1px 6px;
  max-width: 130px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.tray-clock {
  font-family: var(--font-mono);
}

/* Custom Context Menu */
.context-menu {
  position: absolute;
  background-color: var(--retro-grey);
  border: 2px solid var(--retro-border);
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
  z-index: 20000;
  min-width: 155px;
  display: flex;
  flex-direction: column;
  padding: 3px 0;
}

.context-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  color: #000000;
  text-decoration: none;
}

.context-item:hover {
  background-color: var(--retro-navy);
  color: #ffffff;
}

.context-divider {
  border: 0;
  border-top: 2px solid #808080;
  border-bottom: 2px solid #ffffff;
  margin: 4px 0;
}

/* Items inside folder windows listbox styling */
.items-list {
  background: #ffffff;
  border: 3px solid var(--retro-border);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
}

.item-row:hover {
  background-color: #f1f5f9;
}

.item-row.selected {
  background-color: var(--retro-navy);
  color: #ffffff;
}

.item-row.selected .item-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

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

.item-title {
  font-weight: 800;
}

.item-subtitle {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: #475569;
}

.item-delete-btn {
  background: var(--retro-orange);
  border: 2px solid #000000;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  padding: 2px 6px;
  color: #000;
}

.item-delete-btn:active {
  transform: translate(1px, 1px);
}

/* Modals overlays & Dialogs */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30000;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}

.auth-modal-card {
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5) !important;
}

/* Hide helper utilities */
.hidden {
  display: none !important;
}

/* Dashboard logs actions list */
.actions-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  background: #ffffff;
  border: 3px solid var(--retro-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #dfdfdf;
  font-size: 0.85rem;
}

.action-details {
  display: flex;
  flex-direction: column;
}

.action-desc {
  font-weight: bold;
}

.action-time {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  opacity: 0.75;
}

.local-badge {
  font-size: 0.72rem;
  background: var(--retro-navy);
  color: #fff;
  padding: 1px 4px;
  border-radius: 2px;
  margin-left: 5px;
  font-weight: normal;
}

