.oste-admin-wrap {
  --oste-brand-yellow: #f6b500;
  --oste-brand-ink: #111111;
  --oste-brand-muted: #5a5f66;
  --oste-card-border: #e2e4e7;
  --oste-card-bg: #ffffff;
  --oste-card-shadow: 0 8px 24px rgba(17, 17, 17, 0.08);
  --oste-focus: 0 0 0 3px rgba(246, 181, 0, 0.35);
}

.oste-admin-wrap .widefat {
  border: 1px solid var(--oste-card-border);
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.oste-admin-wrap .form-table {
  border: 1px solid var(--oste-card-border);
  border-radius: 10px;
  padding: 10px 16px;
  background: #ffffff;
}

.oste-admin-wrap h1 {
  color: var(--oste-brand-ink);
  letter-spacing: 0.2px;
  background: #fff8e0;
  border: 1px solid #f2d58c;
  border-radius: 10px;
  padding: 12px 16px;
  display: inline-block;
}

.oste-admin-wrap h2 {
  color: var(--oste-brand-ink);
}

.oste-admin-wrap table.widefat thead th {
  background: #fff8e0 !important;
  color: var(--oste-brand-ink) !important;
  border-bottom: 1px solid #f2d58c;
}

.oste-admin-wrap table.widefat thead th small {
  color: var(--oste-brand-muted);
}

.oste-admin-wrap table.widefat tbody tr:nth-child(odd) {
  background: #fffdf5;
}

.oste-admin-wrap table.widefat tbody tr:hover {
  background: #fff4cc;
}

.oste-admin-wrap .form-table th {
  color: var(--oste-brand-ink);
}

.oste-admin-wrap .form-table td {
  color: var(--oste-brand-muted);
}

.oste-admin-wrap .button-primary {
  box-shadow: 0 8px 16px rgba(17, 17, 17, 0.1);
}

.oste-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 24px;
}

.oste-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.oste-toggle-slider {
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 999px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
}

.oste-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.oste-toggle input:checked + .oste-toggle-slider {
  background: var(--oste-brand-yellow);
}

.oste-toggle input:checked + .oste-toggle-slider::before {
  transform: translateX(20px);
}

.oste-toggle input:focus + .oste-toggle-slider {
  box-shadow: var(--oste-focus);
}

/* WooCommerce order detail has stronger label rules; force toggle layout there */
#woocommerce-order-data .form-field label.oste-toggle {
  display: inline-flex !important;
  width: 44px;
  min-width: 44px;
  margin: 0 8px 0 0 !important;
  vertical-align: middle;
}

#woocommerce-order-data .form-field label.oste-toggle .oste-toggle-slider {
  display: block;
}

.oste-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.oste-actions-toggle-setting {
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--oste-card-border);
  border-radius: 10px;
}

.oste-actions-toggle-label {
  display: flex;
  width: 100%;
  gap: 12px;
  cursor: pointer;
}

.oste-actions-toggle-label .oste-toggle {
  flex: 0 0 44px;
}

.oste-actions-toggle-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.oste-actions-toggle-hint {
  margin-left: 3px;
  color: var(--oste-brand-muted);
}

.oste-admin-wrap .oste-status-accordions {
  margin-top: 24px;
}

.oste-admin-wrap .oste-status-accordion {
  border: 1px solid var(--oste-card-border);
  border-radius: 10px;
  background: var(--oste-card-bg);
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--oste-card-shadow);
}

.oste-admin-wrap .oste-status-accordion__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, #fff8e0 0%, #ffffff 60%);
  border: 0;
  padding: 16px 20px;
  font-size: 15px;
  cursor: pointer;
}

.oste-admin-wrap .oste-status-accordion__header:focus {
  outline: none;
  box-shadow: var(--oste-focus);
}

.oste-admin-wrap .oste-status-accordion.is-open .oste-status-accordion__header {
  background: #ffffff;
  border-bottom: 1px solid var(--oste-card-border);
}

.oste-admin-wrap .oste-status-accordion__label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.oste-admin-wrap .oste-status-accordion__title {
  font-weight: 700;
  color: var(--oste-brand-ink);
  letter-spacing: 0.2px;
}

.oste-admin-wrap .oste-status-accordion__slug {
  color: var(--oste-brand-muted);
  font-size: 12px;
  background: #fff4cc;
  border: 1px solid #f2d58c;
  border-radius: 999px;
  padding: 2px 8px;
}

.oste-admin-wrap .oste-status-accordion__type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 999px;
  padding: 2px 8px;
}

.oste-admin-wrap .oste-status-accordion__enabled {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 999px;
  padding: 2px 8px;
}

.oste-admin-wrap .oste-status-accordion__enabled.is-enabled {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.oste-admin-wrap .oste-status-accordion__enabled.is-disabled {
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
}

.oste-admin-wrap .oste-status-accordion__type.is-core {
  color: #1f2937;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
}

.oste-admin-wrap .oste-status-accordion__type.is-custom {
  color: var(--oste-brand-ink);
  background: var(--oste-brand-yellow);
  border: 1px solid #d49a00;
}

.oste-admin-wrap .oste-status-accordion__hint {
  margin-left: 8px;
  display: inline-block;
  color: var(--oste-brand-muted);
}

.oste-admin-wrap .oste-status-accordion__body {
  padding: 20px 22px 10px;
  background: #ffffff;
}

.oste-admin-wrap .oste-status-accordion__body table.form-table {
  margin-top: 0;
}

.oste-admin-wrap .oste-status-accordion__indicator {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--oste-brand-yellow);
  color: var(--oste-brand-ink);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(246, 181, 0, 0.35);
}

.oste-admin-wrap .oste-status-accordion__indicator::before {
  content: '+';
  font-size: 16px;
}

.oste-admin-wrap .oste-status-accordion.is-open .oste-status-accordion__indicator::before {
  content: '-';
}

.oste-admin-wrap .oste-status-accordion .form-table th {
  width: 260px;
}

.oste-admin-wrap .oste-status-accordion .description {
  color: var(--oste-brand-muted);
}

.oste-method-icon-control {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.oste-method-icon-preview {
  max-width: 40px;
  height: auto;
  margin-top: 6px;
}

.oste-admin-wrap .oste-workflow-analysis {
  margin: 20px 0;
  padding: 16px 20px;
  border: 1px solid #dcdcde;
  border-left: 4px solid var(--oste-brand-yellow);
  border-radius: 6px;
  background: #fff;
}

.oste-admin-wrap .oste-workflow-analysis h2 {
  margin-top: 0;
}

.oste-admin-wrap .oste-workflow-analysis ul {
  margin-bottom: 0;
}

.oste-admin-wrap .oste-workflow-presets {
  margin: 20px 0 28px;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  background: #fff;
}

.oste-admin-wrap .oste-workflow-presets > summary {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.oste-admin-wrap .oste-workflow-presets__body {
  padding: 0 18px 18px;
  border-top: 1px solid #f0f0f1;
}

.oste-admin-wrap .oste-workflow-presets__body > label {
  display: inline-block;
  margin-right: 8px;
}

.oste-admin-wrap .oste-preset-map {
  margin-top: 16px;
}

.oste-admin-wrap .oste-preset-map table {
  max-width: 900px;
}

.oste-admin-wrap .oste-preset-map th:first-child {
  width: 40%;
}

.oste-admin-wrap .oste-preset-status {
  width: 100%;
  max-width: 420px;
}

.oste-admin-wrap .oste-preset-submit {
  margin: 16px 0 0;
}

.oste-admin-wrap .oste-status-behavior-options label {
  display: block;
  margin-bottom: 5px;
  white-space: nowrap;
}

.oste-admin-wrap .oste-status-behavior-options .description {
  white-space: normal;
}

.oste-admin-wrap .oste-custom-status-table select,
.oste-admin-wrap .oste-base-status-table select {
  max-width: 220px;
}

.oste-telegram-statuses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  max-width: 1000px;
  margin-top: 12px;
}

.oste-telegram-status {
  padding: 12px;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  background: #fff;
}

.oste-telegram-status > label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.oste-telegram-status details {
  margin-top: 10px;
}

.oste-telegram-status summary {
  margin-bottom: 8px;
  cursor: pointer;
  color: #2271b1;
  font-weight: 600;
}
