/* ==========================================================================
   SYDNEY TERRACE BRASSWORKS — SYSTEM UI NOSTALGIA STYLESHEET
   Image-Free: Built with Chunky Borders, Inset/Outset Panels & Classic Chrome
   ========================================================================== */

:root {
  /* Classic Desktop System UI Palette */
  --ui-bg: #c0c0c0;
  --ui-face: #d4d0c8;
  --ui-light: #ffffff;
  --ui-shadow-soft: #808080;
  --ui-shadow-deep: #404040;
  --ui-black: #000000;
  
  /* Heritage Brass & System Title Accents */
  --teal-titlebar: #005a70;
  --teal-titlebar-right: #008080;
  --brass-gold: #c59b27;
  --brass-dark: #6e5414;
  --brass-accent: #8b6e22;
  --terminal-bg: #1c201d;
  --terminal-text: #9fe2bf;
  --navy-btn: #000080;
  
  /* Typography */
  --font-system: "Segoe UI", Tahoma, Geneva, Verdana, -apple-system, sans-serif;
  --font-mono: "Lucida Console", "Courier New", Courier, monospace;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  background-color: #004e5a;
  background-image: 
    radial-gradient(#006775 15%, transparent 16%),
    radial-gradient(#00363e 15%, transparent 16%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  min-height: 100vh;
  color: var(--ui-black);
  font-family: var(--font-system);
  -webkit-font-smoothing: subpixel-antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 10px 30px;
}

/* Container */
.desktop-canvas {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ==========================================================================
   CHUNKY SYSTEM WINDOW CHROME
   ========================================================================== */
.window-frame {
  background-color: var(--ui-face);
  border-top: 3px solid var(--ui-light);
  border-left: 3px solid var(--ui-light);
  border-right: 3px solid var(--ui-shadow-deep);
  border-bottom: 3px solid var(--ui-shadow-deep);
  box-shadow: 4px 6px 0px rgba(0, 0, 0, 0.45);
  padding: 3px;
  display: flex;
  flex-direction: column;
}

/* 1. Window Title Bar */
.window-title-bar {
  background: linear-gradient(90deg, var(--teal-titlebar) 0%, var(--teal-titlebar-right) 100%);
  color: #ffffff;
  padding: 3px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.title-bar-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 0.92rem;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.title-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.title-bar-controls {
  display: flex;
  gap: 3px;
  margin-left: 8px;
}

.win-btn {
  width: 18px;
  height: 16px;
  font-family: var(--font-system);
  font-size: 11px;
  line-height: 1;
  font-weight: bold;
  background: var(--ui-face);
  color: var(--ui-black);
  border-top: 2px solid var(--ui-light);
  border-left: 2px solid var(--ui-light);
  border-right: 2px solid var(--ui-shadow-deep);
  border-bottom: 2px solid var(--ui-shadow-deep);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.win-btn:active {
  border-top: 2px solid var(--ui-shadow-deep);
  border-left: 2px solid var(--ui-shadow-deep);
  border-right: 2px solid var(--ui-light);
  border-bottom: 2px solid var(--ui-light);
  padding-top: 1px;
  padding-left: 1px;
}

/* 2. Menu Toolbar Strip */
.menu-toolbar {
  background: var(--ui-face);
  border-bottom: 2px solid var(--ui-shadow-soft);
  padding: 2px 4px 4px;
  font-size: 0.88rem;
}

.menu-bar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 2px 4px;
  border-bottom: 1px solid var(--ui-shadow-soft);
}

.menu-item {
  padding: 2px 8px;
  cursor: pointer;
  user-select: none;
  color: #111111;
  border: 1px solid transparent;
}

.menu-item:hover {
  background-color: var(--teal-titlebar);
  color: #ffffff;
  border: 1px solid var(--ui-shadow-deep);
}

.menu-item.active-menu {
  background-color: #2b4b57;
  color: #ffffff;
  border-top: 1px solid var(--ui-shadow-deep);
  border-left: 1px solid var(--ui-shadow-deep);
  border-right: 1px solid var(--ui-light);
  border-bottom: 1px solid var(--ui-light);
}

.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 5px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-family: var(--font-system);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--ui-face);
  color: #111111;
  border-top: 2px solid var(--ui-light);
  border-left: 2px solid var(--ui-light);
  border-right: 2px solid var(--ui-shadow-deep);
  border-bottom: 2px solid var(--ui-shadow-deep);
  cursor: pointer;
}

.tool-btn:hover {
  background-color: #ded9d0;
}

.tool-btn:active {
  border-top: 2px solid var(--ui-shadow-deep);
  border-left: 2px solid var(--ui-shadow-deep);
  border-right: 2px solid var(--ui-light);
  border-bottom: 2px solid var(--ui-light);
  padding: 4px 7px 2px 9px;
}

.tool-icon {
  width: 14px;
  height: 14px;
}

.tool-separator {
  width: 2px;
  height: 20px;
  background-color: var(--ui-shadow-soft);
  border-right: 1px solid var(--ui-light);
  margin: 0 4px;
}

.social-strip {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.social-label {
  font-size: 0.78rem;
  color: var(--ui-shadow-deep);
  font-weight: bold;
}

.sys-link-pill {
  font-size: 0.78rem;
  color: #0b3d68;
  text-decoration: none;
  background: #eae7df;
  padding: 1px 6px;
  border-top: 1px solid var(--ui-light);
  border-left: 1px solid var(--ui-light);
  border-right: 1px solid var(--ui-shadow-soft);
  border-bottom: 1px solid var(--ui-shadow-soft);
  font-family: var(--font-mono);
}

.sys-link-pill:hover {
  background: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   3. MAIN WORKSPACE / INSET PANELS
   ========================================================================== */
.workspace-inset {
  background: #c8c4bc;
  border-top: 3px solid var(--ui-shadow-deep);
  border-left: 3px solid var(--ui-shadow-deep);
  border-right: 3px solid var(--ui-light);
  border-bottom: 3px solid var(--ui-light);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Common Inset Card */
.inset-card {
  background: var(--ui-face);
  border-top: 2px solid var(--ui-light);
  border-left: 2px solid var(--ui-light);
  border-right: 2px solid var(--ui-shadow-soft);
  border-bottom: 2px solid var(--ui-shadow-soft);
  padding: 12px;
}

.inset-recessed {
  background: #dfdbd3;
  border-top: 2px solid var(--ui-shadow-soft);
  border-left: 2px solid var(--ui-shadow-soft);
  border-right: 2px solid var(--ui-light);
  border-bottom: 2px solid var(--ui-light);
  padding: 10px;
}

/* Hero Dialog */
.hero-dialog {
  border-top: 2px solid var(--ui-light);
  border-left: 2px solid var(--ui-light);
  border-right: 2px solid var(--ui-shadow-deep);
  border-bottom: 2px solid var(--ui-shadow-deep);
}

.dialog-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #3b5059;
  color: #ffffff;
  padding: 6px 10px;
  margin: -12px -12px 12px -12px;
  border-bottom: 2px solid var(--ui-shadow-deep);
}

.glyph-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #111111;
  border: 1px solid var(--brass-gold);
  color: var(--brass-gold);
  font-size: 10px;
}

.dialog-headline {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.dialog-content-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-box {
  background: #fbf5db;
  border: 2px solid #bda255;
  padding: 8px 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #3f3107;
}

.lead-text {
  font-size: 0.98rem;
  line-height: 1.55;
  color: #1a1a1a;
}

.action-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

/* Chunky Buttons */
.sys-btn {
  padding: 6px 14px;
  font-family: var(--font-system);
  font-size: 0.9rem;
  font-weight: bold;
  background-color: var(--ui-face);
  color: #111111;
  border-top: 3px solid var(--ui-light);
  border-left: 3px solid var(--ui-light);
  border-right: 3px solid var(--ui-shadow-deep);
  border-bottom: 3px solid var(--ui-shadow-deep);
  cursor: pointer;
  user-select: none;
}

.sys-btn:hover {
  background-color: #e4e0d7;
}

.sys-btn:active {
  border-top: 3px solid var(--ui-shadow-deep);
  border-left: 3px solid var(--ui-shadow-deep);
  border-right: 3px solid var(--ui-light);
  border-bottom: 3px solid var(--ui-light);
  padding-top: 7px;
  padding-left: 15px;
}

.primary-btn {
  background-color: #0b4e3a;
  color: #ffffff;
  border-top: 3px solid #36a47e;
  border-left: 3px solid #36a47e;
  border-right: 3px solid #04251b;
  border-bottom: 3px solid #04251b;
}

.primary-btn:hover {
  background-color: #10664d;
}

/* ==========================================================================
   4. SERVICES GRID & FIELDSETS
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.inset-group {
  background: var(--ui-face);
  border-top: 2px solid var(--ui-light);
  border-left: 2px solid var(--ui-light);
  border-right: 2px solid var(--ui-shadow-soft);
  border-bottom: 2px solid var(--ui-shadow-soft);
  padding: 10px 12px 14px;
}

.group-legend {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #004d61;
  background: var(--ui-face);
  padding: 2px 6px;
  border-top: 1px solid var(--ui-light);
  border-left: 1px solid var(--ui-light);
  border-right: 1px solid var(--ui-shadow-deep);
  border-bottom: 1px solid var(--ui-shadow-deep);
}

.group-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.tech-icon-box {
  width: 42px;
  height: 42px;
  background: #ebe7de;
  border-top: 2px solid var(--ui-shadow-soft);
  border-left: 2px solid var(--ui-shadow-soft);
  border-right: 2px solid var(--ui-light);
  border-bottom: 2px solid var(--ui-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111111;
  border-bottom: 1px dotted var(--ui-shadow-soft);
  padding-bottom: 4px;
}

.service-desc {
  font-size: 0.88rem;
  line-height: 1.48;
  color: #222222;
}

.sys-spec-list {
  list-style: square;
  padding-left: 18px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #2b2b2b;
}

.compact-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Data Table Panel */
.data-table-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-subheading {
  font-size: 0.98rem;
  font-weight: 700;
  background: #394d54;
  color: #ffffff;
  padding: 5px 8px;
  border-top: 1px solid var(--ui-light);
  border-bottom: 1px solid var(--ui-shadow-deep);
}

.table-scroller {
  overflow-x: auto;
  border-top: 2px solid var(--ui-shadow-deep);
  border-left: 2px solid var(--ui-shadow-deep);
  border-right: 2px solid var(--ui-light);
  border-bottom: 2px solid var(--ui-light);
  background: #ffffff;
}

.system-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.system-table th,
.system-table td {
  padding: 6px 10px;
  border: 1px solid #d4d0c8;
}

.system-table th {
  background: #e2ded5;
  font-weight: 700;
  color: #000000;
  border-bottom: 2px solid #808080;
  white-space: nowrap;
}

.system-table tr:nth-child(even) td {
  background-color: #f7f5f0;
}

.system-table tr:hover td {
  background-color: #eaf1f5;
}

.panel-footer-note {
  font-size: 0.82rem;
  background: #ede9e0;
  padding: 6px 10px;
  border-left: 3px solid var(--brass-gold);
  color: #333333;
}

/* Form Section */
.audit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #111111;
  margin-top: 4px;
}

.sys-input,
.sys-select,
.sys-textarea {
  width: 100%;
  font-family: var(--font-system);
  font-size: 0.86rem;
  padding: 5px 8px;
  background-color: #ffffff;
  color: #000000;
  border-top: 2px solid var(--ui-shadow-deep);
  border-left: 2px solid var(--ui-shadow-deep);
  border-right: 2px solid var(--ui-light);
  border-bottom: 2px solid var(--ui-light);
  border-radius: 0;
  outline: none;
}

.sys-input:focus,
.sys-select:focus,
.sys-textarea:focus {
  background-color: #fffffa;
  outline: 1px dotted #000080;
}

.calc-summary-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 4px solid var(--brass-accent);
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.price-tag {
  font-size: 1.1rem;
  color: #0a4f35;
  font-family: var(--font-mono);
}

.calc-disclaimer {
  font-size: 0.78rem;
  color: #555555;
  font-style: italic;
  margin-top: 4px;
}

.form-buttons-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.form-status-indicator {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #0d4b29;
  font-weight: bold;
  margin-left: auto;
}

/* Workshop Log Grid */
.workshop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .workshop-grid {
    grid-template-columns: 1fr;
  }
}

.micro-header {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 6px;
}

.workshop-text {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #222222;
  margin-bottom: 8px;
}

.terminal-box {
  background-color: var(--terminal-bg);
  color: var(--terminal-text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  padding: 8px 10px;
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  border-right: 2px solid var(--ui-light);
  border-bottom: 2px solid var(--ui-light);
}

.btn-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* Privacy Panel */
.privacy-body-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.55;
  max-height: 260px;
  overflow-y: auto;
}

.policy-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b3d68;
}

.privacy-body-text h4 {
  font-size: 0.88rem;
  margin-top: 4px;
  color: #111111;
}

.policy-date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #666666;
  border-top: 1px solid #c0c0c0;
  padding-top: 4px;
}

/* ==========================================================================
   5. STATUS BAR FOOTER
   ========================================================================== */
.status-bar-footer {
  background: var(--ui-face);
  border-top: 2px solid var(--ui-shadow-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  font-family: var(--font-system);
  font-size: 0.76rem;
  margin-top: 2px;
  user-select: none;
}

.status-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-top: 1px solid var(--ui-shadow-deep);
  border-left: 1px solid var(--ui-shadow-deep);
  border-right: 1px solid var(--ui-light);
  border-bottom: 1px solid var(--ui-light);
  margin: 2px 2px;
  background: #d8d4cc;
}

.status-address {
  flex: 2;
  min-width: 180px;
}

.status-phone {
  flex: 1;
  min-width: 120px;
  font-family: var(--font-mono);
}

.status-region {
  width: 110px;
}

.status-privacy {
  width: 100px;
}

.status-clock {
  width: 120px;
  font-family: var(--font-mono);
  justify-content: flex-end;
}

.status-anchor {
  color: #000080;
  text-decoration: underline;
  cursor: pointer;
}

.online-led {
  width: 8px;
  height: 8px;
  background: #25d366;
  border-radius: 50%;
  border: 1px solid #146c36;
  display: inline-block;
  box-shadow: 0 0 4px #25d366;
}

/* System Alert Notification Box (Toast) */
.sys-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #ffffcc;
  border: 2px solid #000000;
  padding: 10px 14px;
  box-shadow: 3px 3px 0 #000000;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
  z-index: 9999;
  max-width: 320px;
}

/* Print Styling */
@media print {
  html {
    background: none;
  }
  .desktop-canvas {
    max-width: 100%;
  }
  .title-bar-controls,
  .menu-toolbar,
  .action-button-group,
  .form-buttons-strip,
  .btn-stack {
    display: none !important;
  }
  .window-frame {
    border: 1px solid #000;
    box-shadow: none;
  }
  .workspace-inset {
    border: none;
    padding: 0;
  }
}