html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
  font-family: "JetBrains Mono", "Segoe UI", monospace;
  display: flex;
  background: radial-gradient(circle at 50% 50%, #1a022b 0%, #090012 100%);
  color: #ffffff;
}

.aero-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100vh;
  flex-shrink: 0;
  box-sizing: border-box;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(20px);
  border-right: 2px solid rgba(163, 5, 255, 0.4);
  display: flex;
  flex-direction: column;
  padding: 20px 15px;
  position: relative;
  z-index: 50;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.4);
}

.sidebar-brand h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(163, 5, 255, 0.9);
  margin: 0 0 10px 5px;
}

.pad-selection-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(163, 5, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  padding: 8px 12px;
  font-weight: bold;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}
.action-btn:hover, .action-btn.active {
  background: linear-gradient(180deg, #c45eff 0%, #a305ff 100%);
  border-color: #df9eff;
  box-shadow: 0 4px 15px rgba(163, 5, 255, 0.6);
  color: #ffffff;
}

.section-label {
  font-size: 10px;
  font-weight: 800;
  color: #a305ff;
  text-transform: uppercase;
  margin: 8px 0 2px 2px;
  letter-spacing: 1px;
}

.workspace-viewport-wrapper {
  flex: 1;
  height: 100vh;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.canvas-area-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.sheets-toolbar {
  width: 100%;
  height: 46px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 2px solid rgba(163, 5, 255, 0.4);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(163, 5, 255, 0.25);
}

.toolbar-label {
  font-weight: 800;
  color: #a305ff;
  font-size: 12px;
}

.search-field {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(163, 5, 255, 0.5);
  border-radius: 6px;
  color: #fff;
  padding: 6px 12px;
  font-family: inherit;
  outline: none;
}

.toolbar-hint {
  margin-left: auto;
  font-size: 11px;
  color: #c45eff;
}

.base-frame {
  flex: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 230, 255, 0.9) 100%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
  overflow: auto;
  color: #1e293b;
  padding: 16px;
  box-sizing: border-box;
}

.view-panel {
  width: 100%;
  height: 100%;
}

/* Aero Grid Table Styling */
.aero-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.aero-table th {
  background: linear-gradient(180deg, #c45eff 0%, #a305ff 100%);
  color: #fff;
  padding: 10px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.aero-table td {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.75);
}

/* Card Gallery View */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.aero-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 230, 255, 0.85) 100%);
  border: 2px solid rgba(163, 5, 255, 0.4);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}
.aero-card:hover {
  transform: translateY(-2px);
  border-color: #a305ff;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  background: #a305ff;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
}

/* Modal Windows */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  background: linear-gradient(180deg, #1a022b 0%, #090012 100%);
  border: 2px solid #a305ff;
  border-radius: 14px;
  padding: 20px;
  width: 320px;
  box-shadow: 0 10px 30px rgba(163, 5, 255, 0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-title {
  font-size: 14px;
  font-weight: bold;
  color: #a305ff;
}

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

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.control-group label {
  font-size: 11px;
  color: #df9eff;
}
.control-group input,
.control-group select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(163, 5, 255, 0.5);
  border-radius: 6px;
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.cancel-btn {
  border-color: #ef4444;
  color: #fca5a5;
}

.sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.sortable-th:hover {
  filter: brightness(1.1);
  text-decoration: underline;
}

.stats-bar {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(163, 5, 255, 0.5);
  border-radius: 8px;
  color: #e9d5ff;
  font-size: 11px;
  padding: 8px 12px;
}

.row-actions {
  white-space: nowrap;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.card-actions button {
  flex: 1;
  background: rgba(163, 5, 255, 0.1);
  border: 1px solid rgba(163, 5, 255, 0.4);
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 6px;
  cursor: pointer;
}
.card-actions button:hover {
  background: rgba(163, 5, 255, 0.25);
}

.fields-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow: auto;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(163, 5, 255, 0.35);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
}
.field-row button {
  background: none;
  border: none;
  cursor: pointer;
}

.kit-card {
  width: min(520px, 100vw - 32px);
  max-height: 90vh;
  overflow: auto;
}

.kit-intro,
.kit-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}
.kit-intro a,
.kit-note a {
  color: #c45eff;
}

.kit-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(163, 5, 255, 0.35);
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
}
.kit-step strong {
  color: #c45eff;
}

.kit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.kit-code {
  margin: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(163, 5, 255, 0.35);
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px;
  white-space: pre;
  overflow-x: auto;
  user-select: all;
}

.kit-status {
  font-size: 11px;
  color: #c45eff;
}
