/* ============================================================
   GUI Chrome — Shared Windows 3.x / Classic Mac window styles
   Used by base.html for the desktop + window frame layout.
   ============================================================ */

/* --- Font Definitions (bitmap pixel fonts) --- */

@font-face {
  font-family: 'Header-Reg';
  src: url('../fonts/sysfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Header-Bold';
  src: url('../fonts/sysfont.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Body-Reg';
  src: url('../fonts/Web437_Cordata_PPC-21.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Body-Bold';
  src: url('../fonts/Web437_Cordata_PPC-400.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

/* Bitmap fonts are single-weight; remap bold to the bold font file */
.font-bold, b, strong {
  font-family: 'Body-Bold', monospace !important;
  font-weight: normal !important;
}

/* Retro text field */
.gui-field {
  position: relative;
  border: 1px solid #000;
  background: #fff;
  box-sizing: border-box;
  height: 20px;
}

.gui-input {
  display: block;
  width: 100%;
  height: 20px;
  border: none;
  outline: none;
  padding: 0 4px;
  margin: 0;
  font-family: 'Body-Reg', monospace !important;
  font-size: 12px !important;
  line-height: 20px !important;
  background: transparent;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

.gui-input:focus {
  line-height: 20px !important;
  padding: 0 4px !important;
}

/* Mirror layer — Chrome blocks custom fonts on :-webkit-autofill text */
.gui-field-mirror {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  padding: 0 4px;
  font-family: 'Body-Reg', monospace !important;
  font-size: 12px !important;
  line-height: 20px !important;
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
  color: #000;
  background: transparent;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  box-sizing: border-box;
  z-index: 1;
}

.gui-field.show-mirror .gui-field-mirror {
  display: block;
}

.gui-field.show-mirror .gui-input {
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  caret-color: #000;
}

/* Hidden input that receives browser autofill; value is copied to .gui-input */
.gui-input-autofill-helper {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: none;
  padding: 0;
  margin: 0;
  pointer-events: none;
  z-index: -1;
}

.gui-input:-webkit-autofill,
.gui-input:-webkit-autofill:hover,
.gui-input:-webkit-autofill:focus,
.gui-input:-webkit-autofill:active,
.gui-input:autofill {
  animation: gui-autofill-fix 1ms;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  transition: background-color 99999s ease-in-out 0s;
}

@keyframes gui-autofill-fix {
  from { opacity: 1; }
  to   { opacity: 1; }
}

/* --- Global Layout Lock --- */

html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

* {
  box-sizing: border-box;
}

/* Override base.html <main> to allow full-screen desktop */
main.gui-main {
  padding: 0 !important;
  margin: 0 !important;
  flex-grow: 1;
}

main.gui-main > div {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* --- Desktop Background --- */

#desktop-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;

  /* Retro 2px checkerboard drawn as a gradient instead of a tiled PNG.
     Gradients rasterize at the display's true device resolution, so the grid
     stays uniform under fractional OS scaling (125%/150%) where a tiled bitmap
     would resample unevenly. */
  background-color: #fff;
  background-image:
    conic-gradient(#000 90deg, #fff 90deg 180deg, #000 180deg 270deg, #fff 270deg);
  background-repeat: repeat;
  background-position: 0 0;
  /* --retro-tile is set per-display by the snapping script in base.html so the
     tile maps to whole physical pixels at any scale; 4px is the DPR=1 fallback. */
  background-size: var(--retro-tile, 4px) var(--retro-tile, 4px);

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5in;
  padding-top: calc(0.5in + 22px); /* Account for menu bar height */
  margin: 0;
}

/* --- Menu Bar (Classic Mac / Windows 3.x top bar) --- */

.menu-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  background-color: #ffffff;
  border-bottom: 1px solid #000000;
  font-family: 'Header-Reg', monospace;
  font-size: 14px;
  user-select: none;
  z-index: 10000;
}

.menu-item {
  position: relative;
  cursor: pointer;
}

.menu-item:hover {
  background-color: #000;
  color: white;
}

.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  min-width: 150px;
  z-index: 50;
  padding: 2px;
  color: black;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.menu-item:hover .menu-dropdown {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 4px 12px;
  text-decoration: none;
  color: black;
  white-space: nowrap;
}

.dropdown-item:hover {
  background-color: #000;
  color: white;
}

.dropdown-separator {
  border-top: 1px solid #808080;
  margin: 1px 0;
}

/* Right-aligned menu items (username, etc.) */
.menu-spacer {
  flex: 1;
}

/* --- Window Frame --- */

.window-frame {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  background-color: #ffffff;
  border-top: none;
  border-left: none;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  display: flex;
  flex-direction: column;
}

/* --- Classic Mac app window (grey frame + striped titlebar) --- */

.mac-window {
  width: 100%;
  flex: 1;
  min-height: 0;
  background-color: #c0c0c0;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mac-titlebar {
  background-color: #c0c0c0;
  border: none;
  border-bottom: 1px solid #000;
  height: 22px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-btn-close,
.header-btn-minimize {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 1px solid #000;
  background-color: #fff;
  cursor: pointer;
  z-index: 2;
}

.header-btn-close { left: 4px; }
.header-btn-minimize { right: 4px; }

.header-btn-minimize::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 7px;
  height: 7px;
  border: 1px solid #000;
  background-color: #fff;
}

.mac-titlebar-lines {
  position: absolute;
  top: 5px;
  left: 24px;
  right: 24px;
  bottom: 5px;
  background-image: repeating-linear-gradient(to bottom, #000 0, #000 1px, #c0c0c0 1px, #c0c0c0 3px);
  z-index: 0;
}

.mac-titlebar-text {
  position: relative;
  z-index: 1;
  background-color: #c0c0c0;
  padding: 0 8px;
  font-family: 'Header-Bold', monospace;
  font-size: 14px;
  color: #000;
  text-transform: uppercase;
}

.mac-body {
  flex: 1;
  min-height: 0;
  background-color: #fff;
  border-top: 1px solid #fff;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Admin list pages (Employees, Clients) — toolbar stays put; table body scrolls */
.mac-body.cl-list-body {
  overflow: hidden;
}

.cl-list-body .cl-toolbar {
  flex-shrink: 0;
}

.cl-table-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background-color: #fff;
}

.cl-table-head-wrap {
  flex-shrink: 0;
  background-color: #fff;
  border-bottom: 2px solid #000;
}

.cl-table-body-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  background-color: #fff;
}

.cl-table-shell .cl-table {
  table-layout: fixed;
  width: 100%;
}

.cl-table-head-wrap .cl-table th {
  border-bottom: none;
}

/* --- Title Bar --- */

.title-bar {
  background: #000;
  padding: 3px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-family: 'Header-Bold', sans-serif;
  font-weight: normal;
  font-size: 14px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* --- Window Toolbar (optional, below title bar) --- */

.window-toolbar {
  padding: 4px;
  border-bottom: 1px solid #808080;
  display: flex;
  gap: 8px;
  align-items: center;
  background-color: #ffffff;
  flex-shrink: 0;
}

/* Retro toolbar button */
.toolbar-btn {
  height: 18px;
  padding: 0 8px;
  background-color: #c0c0c0;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
  font-family: 'Header-Reg', monospace;
  font-size: 12px;
  line-height: 16px;
  color: #000;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.toolbar-btn:hover {
  background-color: #d0d0d0;
}

.toolbar-btn:active {
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080;
  background-color: #a0a0a0;
}

/* --- Window Content Area --- */

.window-content {
  background-color: #ffffff;
  padding: 0;
  flex-grow: 1;
  border: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Scrollable variant for pages with overflow content */
.window-content-scroll {
  background-color: #ffffff;
  padding: 16px;
  flex-grow: 1;
  border: none;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* --- Status Bar (bottom of window) --- */

.status-bar {
  border-top: 1px solid #dfdfdf;
  padding: 2px 6px;
  font-size: 12px;
  font-family: 'Body-Reg', monospace;
  display: flex;
  gap: 16px;
  color: #404040;
  flex-shrink: 0;
}

/* --- Retro Scrollbar (for window-content-scroll) --- */

.window-content-scroll::-webkit-scrollbar {
  width: 18px;
  height: 18px;
  background: #c0c0c0;
}

.window-content-scroll::-webkit-scrollbar-track {
  background-color: #c0c0c0;
  border-left: 1px solid #000000;
  background-image: radial-gradient(#000 1px, transparent 1px);
  background-size: 6px 6px;
}

.window-content-scroll::-webkit-scrollbar-corner {
  background-color: #c0c0c0;
  border: 1px solid #000000;
}

.window-content-scroll::-webkit-scrollbar-thumb {
  background-color: #c0c0c0;
  border: 1px solid #000;
  background-image: radial-gradient(#000 0.5px, transparent 0.5px);
  background-size: 2px 2px;
  min-height: 20px;
  box-shadow: none;
}

.window-content-scroll::-webkit-scrollbar-button {
  display: block;
  height: 18px;
  width: 18px;
  background-color: #c0c0c0;
  border: 1px solid #000000;
}

.window-content-scroll::-webkit-scrollbar-button:vertical:start:decrement {
  border-bottom: 1px solid #000;
  background-image:
    url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2 L2 8 L10 8 Z' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E"),
    radial-gradient(#000 0.5px, transparent 0.5px);
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
  background-size: auto, 4px 4px;
  display: block;
}

.window-content-scroll::-webkit-scrollbar-button:vertical:end:increment {
  border-top: 1px solid #000;
  background-image:
    url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 10 L2 4 L10 4 Z' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E"),
    radial-gradient(#000 0.5px, transparent 0.5px);
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
  background-size: auto, 4px 4px;
  display: block;
}

.window-content-scroll::-webkit-scrollbar-button:vertical:start:increment,
.window-content-scroll::-webkit-scrollbar-button:vertical:end:decrement {
  display: none;
}

/* --- Retro Dialog (modal window on desktop) --- */

.retro-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.retro-dialog {
  background-color: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  box-shadow: 4px 4px 0 #000000;
  min-width: 300px;
  max-width: 90vw;
}

.retro-dialog .title-bar {
  padding: 2px 4px;
  font-size: 12px;
}

.retro-dialog-body {
  padding: 12px;
  background-color: #c0c0c0;
  font-family: 'Body-Reg', monospace;
  font-size: 14px;
}

.retro-dialog-footer {
  padding: 8px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Retro dialog button */
.retro-btn {
  height: 22px;
  padding: 0 16px;
  background-color: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  font-family: 'Header-Reg', monospace;
  font-size: 12px;
  line-height: 18px;
  color: #000;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.retro-btn:hover {
  background-color: #d0d0d0;
}

.retro-btn:active {
  border-color: #404040 #dfdfdf #dfdfdf #404040;
  background-color: #a0a0a0;
}

.retro-btn-primary {
  border: 3px solid;
  border-color: #000 #000 #000 #000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
}

/* --- Group Box (retro fieldset) --- */

.group-box {
  border: 1px solid #808080;
  box-shadow: 1px 1px 0 #dfdfdf;
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
}

.group-box-label {
  position: absolute;
  top: -8px;
  left: 8px;
  background-color: #ffffff;
  padding: 0 4px;
  font-family: 'Header-Reg', monospace;
  font-size: 12px;
  color: #000;
}

/* --- Messages (inside window content) --- */

.gui-message {
  padding: 6px 8px;
  margin: 4px 4px 0;
  border: 1px solid #000;
  background-color: #ffffcc;
  font-family: 'Body-Reg', monospace;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gui-message-icon {
  font-weight: bold;
  font-size: 14px;
}

/* --- Retro Listbox (classic Mac file-list style) --- */

.retro-listbox {
  border: 2px solid #000;
  background-color: #ffffff;
  overflow-y: scroll;
  overflow-x: hidden;
  user-select: none;
}

.retro-listbox-item {
  padding: 1px 6px;
  font-family: 'Header-Reg', monospace;
  font-size: 12px;
  line-height: 16px;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.retro-listbox-item.selected {
  background-color: #000;
  color: #fff;
}

.retro-listbox.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Retro scrollbar for listbox — matches timesheet spreadsheet scrollbar */
.retro-listbox::-webkit-scrollbar {
  width: 18px;
  height: 18px;
  background: #c0c0c0;
}

.retro-listbox::-webkit-scrollbar-track {
  background-color: #c0c0c0;
  border-left: 1px solid #000;
  background-image: radial-gradient(#000 1px, transparent 1px);
  background-size: 6px 6px;
}

.retro-listbox::-webkit-scrollbar-thumb {
  background-color: #c0c0c0;
  border: 1px solid #000;
  background-image: radial-gradient(#000 0.5px, transparent 0.5px);
  background-size: 2px 2px;
  min-height: 20px;
  box-shadow: none;
}

.retro-listbox::-webkit-scrollbar-button {
  display: block;
  height: 18px;
  width: 18px;
  background-color: #c0c0c0;
  border: 1px solid #000;
}

.retro-listbox::-webkit-scrollbar-button:vertical:start:decrement {
  border-bottom: 1px solid #000;
  background-image:
    url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2 L2 8 L10 8 Z' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E"),
    radial-gradient(#000 0.5px, transparent 0.5px);
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
  background-size: auto, 4px 4px;
}

.retro-listbox::-webkit-scrollbar-button:vertical:end:increment {
  border-top: 1px solid #000;
  background-image:
    url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 10 L2 4 L10 4 Z' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E"),
    radial-gradient(#000 0.5px, transparent 0.5px);
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
  background-size: auto, 4px 4px;
}

.retro-listbox::-webkit-scrollbar-button:vertical:start:increment,
.retro-listbox::-webkit-scrollbar-button:vertical:end:decrement {
  display: none;
}

/* --- Retro Radio Button --- */

.retro-radio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Header-Reg', monospace;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.retro-radio input[type="radio"] {
  margin: 0;
  accent-color: #000;
}

/* --- Retro Checkbox (Classic Mac System 6/7) --- */

.retro-checkbox,
.mac-body input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  min-width: 12px;
  margin: 0;
  padding: 0;
  border: 1px solid #000;
  border-radius: 0;
  background-color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
}

.retro-checkbox:checked,
.mac-body input[type="checkbox"]:checked {
  background-color: #fff;
  /* 1px-tile pixel X — chunky staircase arms, no anti-aliased strokes */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' shape-rendering='crispEdges'%3E%3Cg fill='%23000'%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='2' y='1' width='1' height='1'/%3E%3Crect x='2' y='2' width='1' height='1'/%3E%3Crect x='3' y='2' width='1' height='1'/%3E%3Crect x='3' y='3' width='1' height='1'/%3E%3Crect x='4' y='3' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect x='5' y='4' width='1' height='1'/%3E%3Crect x='5' y='5' width='1' height='1'/%3E%3Crect x='6' y='5' width='1' height='1'/%3E%3Crect x='6' y='6' width='1' height='1'/%3E%3Crect x='7' y='6' width='1' height='1'/%3E%3Crect x='7' y='7' width='1' height='1'/%3E%3Crect x='8' y='7' width='1' height='1'/%3E%3Crect x='8' y='8' width='1' height='1'/%3E%3Crect x='8' y='1' width='1' height='1'/%3E%3Crect x='7' y='1' width='1' height='1'/%3E%3Crect x='7' y='2' width='1' height='1'/%3E%3Crect x='6' y='2' width='1' height='1'/%3E%3Crect x='6' y='3' width='1' height='1'/%3E%3Crect x='5' y='3' width='1' height='1'/%3E%3Crect x='5' y='4' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect x='4' y='5' width='1' height='1'/%3E%3Crect x='3' y='5' width='1' height='1'/%3E%3Crect x='3' y='6' width='1' height='1'/%3E%3Crect x='2' y='6' width='1' height='1'/%3E%3Crect x='2' y='7' width='1' height='1'/%3E%3Crect x='1' y='7' width='1' height='1'/%3E%3Crect x='1' y='8' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.retro-checkbox:focus-visible,
.mac-body input[type="checkbox"]:focus-visible {
  outline: 1px dotted #000;
  outline-offset: 1px;
}

.retro-checkbox:disabled,
.mac-body input[type="checkbox"]:disabled {
  background-color: #c0c0c0;
  cursor: default;
  opacity: 1;
}

.retro-checkbox:disabled:checked,
.mac-body input[type="checkbox"]:disabled:checked {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' shape-rendering='crispEdges'%3E%3Cg fill='%23808080'%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3Crect x='2' y='1' width='1' height='1'/%3E%3Crect x='2' y='2' width='1' height='1'/%3E%3Crect x='3' y='2' width='1' height='1'/%3E%3Crect x='3' y='3' width='1' height='1'/%3E%3Crect x='4' y='3' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect x='5' y='4' width='1' height='1'/%3E%3Crect x='5' y='5' width='1' height='1'/%3E%3Crect x='6' y='5' width='1' height='1'/%3E%3Crect x='6' y='6' width='1' height='1'/%3E%3Crect x='7' y='6' width='1' height='1'/%3E%3Crect x='7' y='7' width='1' height='1'/%3E%3Crect x='8' y='7' width='1' height='1'/%3E%3Crect x='8' y='8' width='1' height='1'/%3E%3Crect x='8' y='1' width='1' height='1'/%3E%3Crect x='7' y='1' width='1' height='1'/%3E%3Crect x='7' y='2' width='1' height='1'/%3E%3Crect x='6' y='2' width='1' height='1'/%3E%3Crect x='6' y='3' width='1' height='1'/%3E%3Crect x='5' y='3' width='1' height='1'/%3E%3Crect x='5' y='4' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect x='4' y='5' width='1' height='1'/%3E%3Crect x='3' y='5' width='1' height='1'/%3E%3Crect x='3' y='6' width='1' height='1'/%3E%3Crect x='2' y='6' width='1' height='1'/%3E%3Crect x='2' y='7' width='1' height='1'/%3E%3Crect x='1' y='7' width='1' height='1'/%3E%3Crect x='1' y='8' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
}

/* --- Sub-hub pages (Admin / Invoices icon grids) --- */

.sub-hub-header {
  padding: 24px 40px 0;
}

.sub-hub-title {
  font-family: 'Header-Bold', monospace;
  font-size: 16px;
}

.desktop-dashboard-shortcut {
  position: absolute;
  top: calc(22px + 0.5in);
  right: 0.5in;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #000;
  padding: 2px;
  border: 1px solid transparent;
  user-select: none;
}

.desktop-dashboard-shortcut-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 32px;
}

.desktop-dashboard-shortcut img {
  height: 32px;
  width: auto;
  display: block;
  image-rendering: pixelated;
}

.desktop-dashboard-shortcut-label {
  font-family: 'Header-Reg', monospace;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  padding: 1px 4px;
  background: #fff;
  border: 1px solid #000;
}

.desktop-dashboard-shortcut:hover .desktop-dashboard-shortcut-icon,
.desktop-dashboard-shortcut:active .desktop-dashboard-shortcut-icon {
  background-color: #000;
}

.desktop-dashboard-shortcut:hover img,
.desktop-dashboard-shortcut:active img {
  filter: invert(1);
}

.desktop-dashboard-shortcut:hover .desktop-dashboard-shortcut-label,
.desktop-dashboard-shortcut:active .desktop-dashboard-shortcut-label {
  background-color: #000;
  color: #fff;
}

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

@keyframes subHubIconEnter {
  from {
    opacity: 0;
    transform: translate(var(--sub-hub-icon-start-x, 0), var(--sub-hub-icon-start-y, 0));
  }
  6% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

.sub-hub-from-dashboard .window-frame {
  animation: subHubWindowEnter 0.2s ease-out;
}

.sub-hub-from-dashboard:not(.sub-hub-icon-animate) .desktop-dashboard-shortcut {
  opacity: 0;
}

.sub-hub-from-dashboard.sub-hub-icon-animate .desktop-dashboard-shortcut {
  animation: subHubIconEnter 2.5s ease-out backwards;
}

/* --- Login page (centered Mac-style window) --- */

#desktop-wrapper.login-desktop {
  padding-top: calc(0.5in + 22px);
}
