.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn.primary,
.btn.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(31, 111, 235, 0.2);
}

.btn.ghost {
  background: transparent;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

.btn.primary:hover,
.btn.btn-primary:hover {
  box-shadow: 0 12px 24px rgba(31, 111, 235, 0.3);
}

.btn.btn-secondary {
  background: transparent;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel {
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.service-selector {
  display: grid;
  gap: 16px;
}

.service-selector .form {
  display: grid;
  gap: 12px;
}

.service-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.role-card h3 {
  font-size: 16px;
}

.role-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.setup-panel p {
  margin: 8px 0 12px;
  color: var(--muted);
}

.ordered-list {
  padding-left: 20px;
  list-style: decimal;
  color: var(--muted);
}

.ordered-list li {
  margin-bottom: 8px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.kpi-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}

.badge {
  display: inline-block;
  background: #eef2ff;
  color: #3b5bcc;
  padding: 4px 10px;
  border-radius: 999px;
  margin-right: 6px;
  font-size: 12px;
}

.form label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
}

.form {
  display: grid;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 6px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.form-help {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 6px 0 0;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.table-form-items textarea,
.table-form-items input {
  min-width: 140px;
}

.form-view-group {
  display: grid;
  gap: 12px;
}

.form-field-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.form-field-row:last-child {
  border-bottom: none;
}

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.page-subtitle {
  margin-bottom: 20px;
  color: var(--muted);
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius);
}

.workflow-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.workflow-loading,
.workflow-empty {
  padding: 16px;
  color: var(--muted);
}

.workflow-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.workflow-node-header h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.workflow-node-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.workflow-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workflow-action-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workflow-action-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
}

.workflow-action-type {
  font-size: 0.75rem;
  padding: 2px 8px;
  background: #e2e8f0;
  border-radius: 999px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.workflow-action-destination {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.workflow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workflow-tag {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
}

.action-palette form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.hidden {
  display: none;
}

.alert {
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
}

.gx-formula {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 16px;
  background: var(--surface);
}

.gx-formula.is-readonly {
  opacity: 0.75;
}

.gx-formula-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gx-formula-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.gx-formula-msg {
  color: var(--muted);
}

.gx-formula-block label {
  font-weight: 600;
  color: var(--muted);
}

.gx-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.gx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gx-formula-empty {
  font-size: 0.85rem;
  color: var(--muted);
}

.gx-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: #f8fafc;
  font-size: 0.8rem;
  cursor: pointer;
}

.gx-chip--readonly {
  background: #eef2ff;
  cursor: default;
}

.gx-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gx-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 0.85rem;
}

.gx-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.gx-badge--success {
  background: #dcfce7;
  color: #166534;
}

.gx-badge--error {
  background: #fee2e2;
  color: #991b1b;
}

.gx-badge--warning {
  background: #fef3c7;
  color: #92400e;
}

.gx-warning {
  color: #b91c1c;
}

.gx-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.gx-modal-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  width: min(520px, 90vw);
  display: grid;
  gap: 12px;
}

.gx-modal-row {
  display: grid;
  gap: 6px;
}

.gx-input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.gx-modal-result {
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 10px;
  font-size: 0.9rem;
}

.gx-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.landing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-card.featured {
  border-color: #c7d2fe;
  box-shadow: 0 18px 28px rgba(37, 99, 235, 0.2);
}

.landing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
  border-color: rgba(148, 163, 184, 0.4);
}

.landing-list,
.landing-checklist {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.landing-checklist li {
  position: relative;
  padding-left: 24px;
}

.landing-checklist li::before {
  content: \"✓\";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.timeline li {
  margin-bottom: 10px;
}

.list {
  padding-left: 16px;
  list-style: disc;
}

.ticket-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}

.ticket-form-card h4 {
  margin: 0 0 10px;
}

.ticket-dynamic-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--text);
}

.ticket-form-row input,
.ticket-form-row select,
.ticket-form-row textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 400;
}

.ticket-form-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
}

.ticket-form-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-form-status {
  color: var(--muted);
  font-size: 13px;
}
