/* Sovereign Stippie - 2012 Utilitarian Developer Workbench Theme */
/* Pure function, zero decorative fluff, zero transitions, zero animations */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: none !important;
  animation: none !important;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #ECECEC;
  color: #1A1A1A;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Master Container */
.workbench {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ECECEC;
}

/* Top System Toolbar */
.top-toolbar {
  height: 40px;
  background: linear-gradient(to bottom, #ECECEC 0%, #D8D8D8 100%);
  border-bottom: 1px solid #A8A8A8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  flex-shrink: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title {
  font-weight: 700;
  font-size: 12px;
  color: #222222;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.brand-version {
  font-size: 10px;
  color: #666666;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* Segmented Tab Navigation */
.segmented-tabs {
  display: inline-flex;
  border: 1px solid #888888;
  border-radius: 3px;
  overflow: hidden;
  background: #DFDFDF;
}

.seg-btn {
  background: linear-gradient(to bottom, #FFFFFF 0%, #E2E2E2 100%);
  border: none;
  border-right: 1px solid #999999;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.seg-btn:last-child {
  border-right: none;
}

.seg-btn:hover {
  background: linear-gradient(to bottom, #FFFFFF 0%, #ECECEC 100%);
}

.seg-btn:active,
.seg-btn.active {
  background: #505A65;
  color: #FFFFFF;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Right Toolbar Actions */
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-indicator {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid #AAAAAA;
  background: #E4E4E4;
  color: #333333;
}

.auth-indicator.authenticated {
  background: #E6F4EA;
  border-color: #34A853;
  color: #137333;
}

.auth-indicator.locked {
  background: #FCE8E6;
  border-color: #EA4335;
  color: #C5221F;
}

/* Workspace Viewport */
.workspace-body {
  flex: 1;
  padding: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #E5E5E5;
}

.tab-pane {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

.tab-pane.active {
  display: flex;
}

/* Utilitarian Box Panels */
.u-box {
  background: #FFFFFF;
  border: 1px solid #AFAFAF;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.box-header {
  height: 28px;
  background: linear-gradient(to bottom, #F6F6F6 0%, #E6E6E6 100%);
  border-bottom: 1px solid #BEBEBE;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  flex-shrink: 0;
}

.box-header h4 {
  font-size: 11px;
  font-weight: 700;
  color: #333333;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.box-content {
  padding: 8px;
  flex: 1;
  overflow-y: auto;
}

.scroll-box {
  overflow-y: auto;
}

/* 2-Column Grid Layout for Timeline */
.utility-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 8px;
  height: 100%;
}

/* Focus HUD */
.hud-box {
  height: 100%;
}

.timer-display {
  background: #141618;
  border: 1px solid #000000;
  border-radius: 3px;
  padding: 14px 10px;
  text-align: center;
  margin-bottom: 8px;
}

.timer-digits {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 38px;
  font-weight: 700;
  color: #10B981;
  letter-spacing: 1px;
}

.timer-topic {
  color: #9CA3AF;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.hud-controls .btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.weather-box {
  margin-top: 10px;
  background: #F4F4F4;
  border: 1px solid #CCCCCC;
  border-radius: 2px;
  padding: 6px 8px;
  font-size: 11px;
  color: #333333;
}

/* Tables */
.u-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  background: #FFFFFF;
}

.u-table th {
  background: #F0F0F0;
  border-bottom: 1px solid #B8B8B8;
  border-right: 1px solid #D8D8D8;
  padding: 5px 6px;
  text-align: left;
  font-weight: 700;
  color: #444444;
  text-transform: uppercase;
  font-size: 10px;
}

.u-table th:last-child {
  border-right: none;
}

.u-table td {
  border-bottom: 1px solid #E0E0E0;
  border-right: 1px solid #EEEEEE;
  padding: 4px 6px;
  color: #222222;
  vertical-align: middle;
}

.u-table td:last-child {
  border-right: none;
}

.u-table tbody tr:nth-child(even) td {
  background: #F9F9F9;
}

.u-table tbody tr:hover td {
  background: #EDF3FB;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid #AAAAAA;
  background: #EEEEEE;
  color: #444444;
}

.badge-study { background: #FEF3C7; border-color: #F59E0B; color: #92400E; }
.badge-focus { background: #E0E7FF; border-color: #6366F1; color: #3730A3; }
.badge-exam { background: #FEE2E2; border-color: #EF4444; color: #991B1B; }
.badge-general { background: #E5E7EB; border-color: #9CA3AF; color: #374151; }

/* Buttons */
.u-btn {
  background: linear-gradient(to bottom, #FFFFFF 0%, #E6E6E6 100%);
  border: 1px solid #999999;
  border-radius: 2px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.u-btn:hover {
  background: linear-gradient(to bottom, #FFFFFF 0%, #EDEDED 100%);
  border-color: #777777;
}

.u-btn:active {
  background: #D8D8D8;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.u-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #E8E8E8;
}

.u-btn.primary {
  background: linear-gradient(to bottom, #3B82F6 0%, #2563EB 100%);
  border-color: #1D4ED8;
  color: #FFFFFF;
}

.u-btn.primary:hover {
  background: linear-gradient(to bottom, #60A5FA 0%, #1D4ED8 100%);
}

.u-btn.success {
  background: linear-gradient(to bottom, #22C55E 0%, #16A34A 100%);
  border-color: #15803D;
  color: #FFFFFF;
}

.u-btn.danger {
  background: linear-gradient(to bottom, #EF4444 0%, #DC2626 100%);
  border-color: #B91C1C;
  color: #FFFFFF;
}

.mini-btn {
  padding: 2px 6px;
  font-size: 10px;
}

.large-btn {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
}

/* Form Inputs */
.u-input, .u-select, .u-textarea {
  background: #FFFFFF;
  border: 1px solid #999999;
  border-radius: 2px;
  padding: 3px 6px;
  font-size: 11px;
  color: #111111;
  outline: none;
}

.u-input:focus, .u-select:focus, .u-textarea:focus {
  border-color: #2563EB;
}

.mono-input {
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.mini-input {
  width: 70px;
  text-align: center;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}

.form-row label {
  font-weight: 600;
  font-size: 11px;
  color: #333333;
}

/* Model Hub Styles */
.model-hub-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.model-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tier-cards {
  display: flex;
  gap: 8px;
}

.tier-card {
  background: #FFFFFF;
  border: 1px solid #AAAAAA;
  border-radius: 2px;
  padding: 6px 10px;
  width: 250px;
}

.tier-label {
  font-size: 10px;
  font-weight: 700;
  color: #666666;
  text-transform: uppercase;
}

.tier-model {
  font-size: 12px;
  font-weight: 700;
  color: #111111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tier-pricing {
  font-size: 10px;
  color: #4B5563;
  font-family: ui-monospace, Menlo, monospace;
}

.catalog-controls {
  display: flex;
  gap: 6px;
}

.catalog-box {
  flex: 1;
}

.test-bench-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.test-output-box {
  background: #F4F4F4;
  border: 1px solid #CCCCCC;
  border-radius: 2px;
  padding: 6px;
  height: 100px;
  overflow-y: auto;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  white-space: pre-wrap;
}

/* Configuration Deck */
.config-deck-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #AFAFAF;
  border-radius: 3px;
  overflow: hidden;
}

.config-nav-header {
  height: 32px;
  background: linear-gradient(to bottom, #F6F6F6 0%, #E6E6E6 100%);
  border-bottom: 1px solid #BEBEBE;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.config-nav-header h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.config-sections {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
}

.config-group {
  border: 1px solid #CCCCCC;
  border-radius: 2px;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: #FAFAFA;
}

.config-group legend {
  font-weight: 700;
  font-size: 11px;
  color: #333333;
  padding: 0 4px;
  text-transform: uppercase;
}

.config-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.config-row label {
  width: 200px;
  font-weight: 600;
  font-size: 11px;
}

.config-row .hint {
  color: #666666;
  font-size: 10px;
  margin-left: 6px;
}

/* Study Velocity Cards */
.study-dashboard {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.study-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.study-card {
  background: #FFFFFF;
  border: 1px solid #AAAAAA;
  border-radius: 2px;
  padding: 8px 12px;
}

.card-label {
  font-size: 10px;
  font-weight: 700;
  color: #666666;
  text-transform: uppercase;
}

.card-val {
  font-size: 22px;
  font-weight: 700;
  color: #111111;
  font-family: ui-monospace, Menlo, monospace;
}

.progress-track {
  height: 5px;
  background: #E5E7EB;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-fill {
  height: 100%;
  background: #2563EB;
}

/* Chat Deck */
.chat-deck {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #AFAFAF;
  border-radius: 3px;
  overflow: hidden;
}

.chat-log {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  background: #FAFAFA;
}

.chat-msg {
  margin-bottom: 6px;
  line-height: 1.4;
}

.chat-msg .sender {
  font-weight: 700;
  margin-right: 4px;
}

.chat-msg.user .sender { color: #2563EB; }
.chat-msg.stippie .sender { color: #059669; }
.chat-msg.system .sender { color: #6B7280; }

.chat-input-bar {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: #F0F0F0;
  border-top: 1px solid #CCCCCC;
}

.chat-input-bar input {
  flex: 1;
}

/* Status Bar */
.bottom-statusbar {
  height: 24px;
  background: #DDDDDD;
  border-top: 1px solid #AFAFAF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 11px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: #333333;
  flex-shrink: 0;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sb-divider {
  color: #999999;
}

/* Modals & Overlays */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.utility-dialog {
  background: #FFFFFF;
  border: 1px solid #777777;
  border-radius: 3px;
  width: 440px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.dialog-header {
  height: 30px;
  background: linear-gradient(to bottom, #F4F4F4 0%, #E0E0E0 100%);
  border-bottom: 1px solid #B0B0B0;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.dialog-header h3 {
  font-size: 11px;
  font-weight: 700;
  color: #222222;
  text-transform: uppercase;
}

.dialog-body {
  padding: 12px;
}

.u-alert {
  padding: 6px 8px;
  border-radius: 2px;
  margin-top: 8px;
  font-size: 11px;
  display: none;
}

.u-alert.error { background: #FEE2E2; border: 1px solid #EF4444; color: #991B1B; }
.u-alert.success { background: #DCFCE7; border: 1px solid #22C55E; color: #166534; }
.u-alert.info { background: #DBEAFE; border: 1px solid #3B82F6; color: #1E40AF; }

.muted {
  color: #666666;
  font-size: 11px;
}

.danger-text {
  color: #DC2626;
}
