/* STYLE GUIDE SECTIONS */
.sg-section {
  margin-bottom: 48px;
  scroll-margin-top: 24px;
}
.sg-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--app-border);
}
.sg-section-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--app-accent);
}
.sg-section-title {
  font-size: 22px;
  font-weight: 700;
}

/* COVER */
.sg-cover {
  padding: 60px 48px;
  background: linear-gradient(135deg, var(--app-surface), var(--app-bg));
  border-bottom: 1px solid var(--app-border);
  position: relative;
  overflow: hidden;
}
.sg-cover::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.1), transparent 70%);
  border-radius: 50%;
}
.sg-cover-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 20px;
  font-size: 12px;
  color: var(--app-accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.sg-cover-title {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 12px;
  line-height: 1.1;
}
.sg-cover-desc {
  font-size: 16px;
  color: var(--app-text-2);
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.sg-cover-meta {
  display: flex;
  gap: 24px;
}
.sg-cover-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sg-cover-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--app-text-3);
  font-weight: 700;
}
.sg-cover-meta-val {
  font-size: 13px;
  color: var(--app-text-2);
}
.present-sections {
  padding: 40px 48px;
}

/* COLORS */
.color-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--app-text-3);
  margin-bottom: 10px;
}
.color-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.color-chip {
  flex: 1;
  min-width: 80px;
  max-width: 120px;
}
.color-swatch {
  height: 56px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}
.color-name {
  font-size: 12px;
  font-weight: 600;
}
.color-hex {
  font-size: 11px;
  color: var(--app-text-2);
  font-family: monospace;
}
.color-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* TYPOGRAPHY */
.type-samples {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.type-sample {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px;
  background: var(--app-surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--app-border);
}
.type-meta {
  width: 120px;
  flex-shrink: 0;
}
.type-meta-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--app-text-2);
}
.type-meta-detail {
  font-size: 11px;
  color: var(--app-text-3);
  font-family: monospace;
}
.type-preview {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ICONS */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
}
.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--app-surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--app-border);
}
.icon-name {
  font-size: 10px;
  color: var(--app-text-3);
  text-align: center;
}

/* GRID */
.grid-demo {
  padding: 16px;
  background: var(--app-surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--app-border);
  margin-bottom: 12px;
}
.grid-label {
  font-size: 11px;
  color: var(--app-text-3);
  margin-bottom: 8px;
  font-weight: 600;
}
.grid-cols {
  display: flex;
  gap: 8px;
}
.grid-col {
  flex: 1;
  height: 32px;
  background: rgba(108, 99, 255, 0.2);
  border: 1px dashed rgba(108, 99, 255, 0.5);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--app-accent);
  font-weight: 600;
}
.grid-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.grid-info-item {
  font-size: 12px;
  color: var(--app-text-2);
}
.grid-info-item strong {
  color: var(--app-text);
}

/* SPACING */
.spacing-scale {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spacing-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.spacing-bar {
  height: 20px;
  background: linear-gradient(
    90deg,
    var(--app-accent),
    rgba(108, 99, 255, 0.3)
  );
  border-radius: 3px;
  min-width: 4px;
}
.spacing-meta {
  font-size: 12px;
  color: var(--app-text-2);
  white-space: nowrap;
}
.spacing-meta strong {
  color: var(--app-text);
  font-family: monospace;
}

/* TEXTFIELDS */
.textfield-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.textfield-demo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.textfield-demo-label {
  font-size: 11px;
  color: var(--app-text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tf-label {
  font-size: 12px;
  color: var(--app-text-2);
  margin-bottom: 4px;
  display: block;
}
.tf-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  background: transparent;
  outline: none;
  transition: var(--ease);
}
.tf-default {
  border: 1.5px solid var(--app-border);
  color: var(--app-text);
}
.tf-disabled {
  border: 1.5px solid var(--app-border);
  color: var(--app-text-3);
  opacity: 0.5;
  cursor: not-allowed;
}
.tf-helper {
  font-size: 11px;
  color: var(--app-text-3);
}
.tf-error-msg {
  font-size: 11px;
  color: var(--app-accent-2);
}

/* SELECTORS */
.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.selector-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--app-text-3);
  margin-bottom: 4px;
}
.sel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.sel-radio,
.sel-check {
  width: 16px;
  height: 16px;
  border: 2px solid var(--app-border);
  background: transparent;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sel-radio {
  border-radius: 50%;
}
.sel-check {
  border-radius: 3px;
}
.sel-select {
  background: var(--app-surface-2);
  border: 1.5px solid var(--app-border);
  color: var(--app-text);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  width: 100%;
}

/* BUTTONS */
.button-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.button-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.button-row-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--app-text-3);
  width: 80px;
  flex-shrink: 0;
}
.sg-btn {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  transition: var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sg-btn-sm {
  padding: 5px 14px;
  font-size: 12px;
}
.sg-btn-lg {
  padding: 11px 28px;
  font-size: 15px;
}

/* SMALL ELEMENTS */
.small-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.small-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.small-row-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--app-text-3);
  width: 100px;
  flex-shrink: 0;
}
.sg-badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sg-tag {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.progress-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 200px;
}
.progress-label {
  font-size: 11px;
  color: var(--app-text-2);
  display: flex;
  justify-content: space-between;
}
.progress-track {
  height: 6px;
  background: var(--app-surface-3);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
}
.tooltip-demo {
  position: relative;
  display: inline-block;
}
.tooltip-trigger {
  padding: 6px 12px;
  background: var(--app-surface-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--app-border);
  font-size: 12px;
  cursor: default;
}
.tooltip-box {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
}
.tooltip-box::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

/* BIG ELEMENTS */
.big-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.sg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sg-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  border-bottom: 2px solid var(--app-border);
  color: var(--app-text-2);
}
.sg-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--app-border);
}
.sg-table tr:last-child td {
  border-bottom: none;
}
.sg-table tr:hover td {
  background: var(--app-surface-2);
}
.sg-modal-preview {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius);
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
}
.modal-close {
  width: 28px;
  height: 28px;
  background: var(--app-surface-3);
  border: none;
  color: var(--app-text-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.modal-body {
  font-size: 13px;
  color: var(--app-text-2);
  margin-bottom: 20px;
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.sg-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--ease);
}
.sg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--app-border-lt);
}
.card-thumb {
  height: 120px;
  position: relative;
  overflow: hidden;
}
.card-body {
  padding: 16px;
}
.card-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.card-desc {
  font-size: 12px;
  color: var(--app-text-2);
  line-height: 1.5;
  margin-bottom: 14px;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-meta {
  font-size: 11px;
  color: var(--app-text-3);
}

/* COLOR EDITOR */
.color-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.color-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--app-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--app-border);
}
.color-edit-swatch {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  flex-shrink: 0;
  display: flex;
}
.color-edit-swatch input[type="color"] {
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
  padding: 0;
}
.color-edit-name {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--app-text);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  font-family: var(--font);
}
.color-edit-hex {
  width: 85px;
  background: transparent;
  border: none;
  color: var(--app-text-2);
  font-size: 12px;
  font-family: monospace;
  outline: none;
  text-align: right;
}
.add-color-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: 1px dashed var(--app-border);
  color: var(--app-text-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font);
  transition: var(--ease);
  width: 100%;
  justify-content: center;
}
.add-color-btn:hover {
  border-color: var(--app-accent);
  color: var(--app-accent);
}

/* TYPO EDITOR */
.typo-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.typo-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
