 /* =========================================================
     TOKENS
  ========================================================= */
  :root{
    --color-canvas:      #F4F5FB;
    --color-surface:      #FFFFFF;
    --color-surface-sunk: #F8F9FD;
    --color-border:       #E6E8F4;
    --color-border-soft:  #EEF0F9;

    --color-ink:          #191B3A;
    --color-ink-soft:     #565A80;
    --color-ink-faint:    #9297B8;

    --color-accent:       #5B4FF0;
    --color-accent-ink:   #4238C9;
    --color-accent-wash:  #EEEBFF;

    --color-success:      #17A673;
    --color-success-wash: #E5F7F0;

    --color-amber:        #E8940C;
    --color-amber-wash:   #FDF1DD;

    --color-danger:       #E24B4B;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --shadow-card: 0 1px 2px rgba(25, 27, 58, 0.04), 0 8px 24px -12px rgba(25, 27, 58, 0.10);
    --shadow-pop:  0 4px 10px -2px rgba(91, 79, 240, 0.35);
  }


    .xa-settings a{ color:inherit; }

  /* =========================================================
     BLOCK: settings  (root layout)
  ========================================================= */
.xa-settings {
	max-width: 1180px;
	margin: 0 auto;
	padding-top: 50px;
}
  .xa-settings__topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom: 22px;
  }

  .xa-settings__brand{
    display:flex;
    align-items:center;
    gap:12px;
  }

  .xa-settings__brand-mark{
    width:38px;
    height:38px;
    border-radius: var(--radius-md);
    background: linear-gradient(155deg, var(--color-accent), var(--color-accent-ink));
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    box-shadow: var(--shadow-pop);
    flex-shrink:0;
  }

  .xa-settings__brand-mark svg{ width:20px; height:20px; }

  .xa-settings__brand-name{
    font-family: var(--font-display);
    font-weight:800;
    font-size:17px;
    line-height:1.15;
    letter-spacing:-0.01em;
  }

  .xa-settings__brand-tag{
    display:block;
    font-family: var(--font-body);
    font-weight:500;
    font-size:12px;
    color: var(--color-ink-faint);
    margin-top:1px;
  }

  .xa-settings__version{
    font-family: var(--font-mono);
    font-size:12px;
    color: var(--color-ink-soft);
    background: var(--color-surface);
    border:1px solid var(--color-border);
    padding:6px 10px;
    border-radius: 999px;
  }

  .xa-settings__body{
    display:grid;
    grid-template-columns: 240px 1fr;
    gap:20px;
    align-items:start;
  }

  /* =========================================================
     BLOCK: settings-nav
  ========================================================= */
  .xa-settings-nav{
    background: var(--color-surface);
    border:1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding:10px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top:24px;
  }

  .xa-settings-nav__list{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:2px;
  }

  .xa-settings-nav__link{
    display:flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
    font-size:13.5px;
    font-weight:600;
    color: var(--color-ink-soft);
    padding:10px 12px;
    border-radius: var(--radius-sm);
    border-left:3px solid transparent;
    transition: background .15s ease, color .15s ease;
    cursor:pointer;
    background:none;
    border-top:none;
    border-right:none;
    border-bottom:none;
    width:100%;
    text-align:left;
    font-family: inherit;
  }

  .xa-settings-nav__link svg{
    width:16px; height:16px;
    flex-shrink:0;
    opacity:.75;
  }

  .xa-settings-nav__link:hover{
    background: var(--color-surface-sunk);
    color: var(--color-ink);
  }

  .xa-settings-nav__item--active .xa-settings-nav__link{
    background: var(--color-accent-wash);
    color: var(--color-accent-ink);
    border-left-color: var(--color-accent);
  }

  .xa-settings-nav__item--active .xa-settings-nav__link svg{ opacity:1; }

  .xa-settings-nav__divider{
    height:1px;
    background: var(--color-border-soft);
    margin:8px 6px;
  }

  /* =========================================================
     BLOCK: settings-panel
  ========================================================= */
  .xa-settings-panel{
    background: var(--color-surface);
    border:1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow:hidden;
  }

  .xa-settings-panel__head{
    padding: 22px 28px;
    border-bottom:1px solid var(--color-border-soft);
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
  }

  .xa-settings-panel__title{
    font-family: var(--font-display);
    font-size:19px;
    font-weight:700;
    margin:0 0 4px;
    letter-spacing:-0.01em;
  }

  .xa-settings-panel__subtitle{
    margin:0;
    font-size:13px;
    color: var(--color-ink-faint);
  }

  .xa-settings-panel__actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-shrink:0;
  }

  /* top action bar sits under the head, above the groups */
  .xa-settings-panel__actionbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding: 12px 28px;
    background: var(--color-surface-sunk);
    border-bottom:1px solid var(--color-border-soft);
  }

  .xa-settings-panel__state{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    font-weight:600;
    color: var(--color-success);
    background: var(--color-success-wash);
    padding:6px 10px;
    border-radius:999px;
    white-space:nowrap;
  }

  .xa-settings-panel__state-dot{
    width:6px; height:6px;
    border-radius:50%;
    background: var(--color-success);
  }

  /* section = one tab's whole content, only one visible at a time */
  .xa-settings-section{ display:none; }
  .xa-settings-section--active{ display:block; }

  /* group = a labelled cluster of rows */
  .xa-settings-group{
    padding: 6px 28px;
  }

  .xa-settings-group__label{
    font-size:11.5px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.06em;
    color: var(--color-ink-faint);
    margin: 22px 0 4px;
  }

  /* =========================================================
     BLOCK: settings-row  (one field: label/desc + control)
  ========================================================= */
  .xa-settings-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:32px;
    padding: 18px 0;
    border-bottom:1px solid var(--color-border-soft);
  }

  .xa-settings-group__label + .xa-settings-row,
  .xa-settings-row:last-child{ border-bottom:none; }

  .xa-settings-row__info{
    max-width: 480px;
  }

  .xa-settings-row__label{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:14px;
    font-weight:600;
    color: var(--color-ink);
    margin:0 0 4px;
  }

  .xa-settings-row__desc{
    margin:0;
    font-size:12.5px;
    line-height:1.5;
    color: var(--color-ink-faint);
  }

  .xa-settings-row__control{
    flex-shrink:0;
    display:flex;
    align-items:center;
    min-width:180px;
    justify-content:flex-end;
  }

  .xa-settings-row--locked .xa-settings-row__control{
    opacity:.55;
    pointer-events:none;
  }

  .xa-settings-row--locked .xa-settings-row__label{ color: var(--color-ink-soft); }

  /* =========================================================
     BLOCK: badge
  ========================================================= */
  .xa-badge{
    display:inline-flex;
    align-items:center;
    gap:4px;
    font-size:10.5px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.03em;
    padding:3px 7px;
    border-radius:5px;
  }

  .xa-badge--pro{
    background: var(--color-amber-wash);
    color: var(--color-amber);
  }

  .xa-badge--new{
    background: var(--color-accent-wash);
    color: var(--color-accent-ink);
  }

  /* =========================================================
     BLOCK: switch  (on/off toggle)
  ========================================================= */
  .xa-switch{
    display:inline-flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
    user-select:none;
  }

  .xa-switch__input{
    position:absolute;
    opacity:0;
    width:0; height:0;
  }

  .xa-switch__track{
    width:42px;
    height:24px;
    border-radius:999px;
    background: #DDE0F0;
    position:relative;
    transition: background .18s ease;
    flex-shrink:0;
  }

  .xa-switch__thumb{
    position:absolute;
    top:3px; left:3px;
    width:18px; height:18px;
    border-radius:50%;
    background:#fff;
    box-shadow: 0 1px 3px rgba(25,27,58,.25);
    transition: transform .18s ease;
  }

  .xa-switch__input:checked + .xa-switch__track{
    background: var(--color-success);
  }

  .xa-switch__input:checked + .xa-switch__track .xa-switch__thumb{
    transform: translateX(18px);
  }

  .xa-switch__input:focus-visible + .xa-switch__track{
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }

  .xa-switch__state{
    font-size:12.5px;
    font-weight:600;
    color: var(--color-ink-faint);
    min-width:52px;
  }

  .xa-switch__input:checked ~ .xa-switch__state{ color: var(--color-success); }

  /* =========================================================
     BLOCK: field  (text / number / select shell)
  ========================================================= */
  .xa-field{
    display:flex;
    align-items:center;
    border:1px solid var(--color-border);
    background: var(--color-surface-sunk);
    border-radius: var(--radius-sm);
    overflow:hidden;
    min-width:220px;
  }

  .xa-field:focus-within{
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-wash);
    background:#fff;
  }

  .xa-field__prefix{
    padding: 0 10px;
    font-family: var(--font-mono);
    font-size:12.5px;
    color: var(--color-ink-faint);
    border-right:1px solid var(--color-border);
    background: var(--color-border-soft);
    align-self:stretch;
    display:flex;
    align-items:center;
  }

  .xa-field__input{
    border:0;
    background:transparent;
    padding:9px 12px;
    font-family: var(--font-mono);
    font-size:13px;
    color: var(--color-ink);
    width:100%;
    outline:none;
  }

  .xa-field__select{
    border:0;
    background:transparent;
    padding:9px 12px;
    font-family: var(--font-body);
    font-size:13px;
    font-weight:500;
    color: var(--color-ink);
    width:100%;
    outline:none;
    appearance:none;
    -webkit-appearance:none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.xa-w3.xa-org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%239297B8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat:no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
  }

  .xa-field__unit{
    padding:0 12px;
    font-size:12px;
    font-weight:600;
    color: var(--color-ink-faint);
    border-left:1px solid var(--color-border);
    align-self:stretch;
    display:flex;
    align-items:center;
    white-space:nowrap;
  }

  /* =========================================================
     BLOCK: color-field
  ========================================================= */
  .xa-color-field{
    display:flex;
    align-items:center;
    gap:8px;
    border:1px solid var(--color-border);
    background: var(--color-surface-sunk);
    border-radius: var(--radius-sm);
    padding: 5px 10px 5px 5px;
  }

  .xa-color-field:focus-within{
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-wash);
    background:#fff;
  }

  .xa-color-field__swatch{
    -webkit-appearance:none;
    appearance:none;
    width:26px;
    height:26px;
    border:none;
    border-radius: 7px;
    padding:0;
    cursor:pointer;
    box-shadow: inset 0 0 0 1px rgba(25,27,58,.12);
  }

  .xa-color-field__swatch::-webkit-color-swatch-wrapper{ padding:0; }
  .xa-color-field__swatch::-webkit-color-swatch{ border:none; border-radius:7px; }

  .xa-color-field__hex{
    border:0;
    background:transparent;
    outline:none;
    font-family: var(--font-mono);
    font-size:12.5px;
    font-weight:500;
    color: var(--color-ink-soft);
    width:74px;
    text-transform:uppercase;
  }

  .xa-color-field__reset{
    border:0;
    background:none;
    color: var(--color-ink-faint);
    cursor:pointer;
    display:flex;
    padding:4px;
    border-radius:5px;
  }

  .xa-color-field__reset:hover{ background: var(--color-border-soft); color: var(--color-ink); }
  .xa-color-field__reset svg{ width:13px; height:13px; }

  /* =========================================================
     BLOCK: btn
  ========================================================= */
  .xa-btn{
    font-family: var(--font-body);
    font-size:13px;
    font-weight:600;
    padding:8px 16px;
    border-radius: var(--radius-sm);
    border:1px solid transparent;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:6px;
  }

  .xa-btn--ghost{
    background:transparent;
    border-color: var(--color-border);
    color: var(--color-ink-soft);
  }
  .xa-btn--ghost:hover{ background: var(--color-surface); }

  .xa-btn--primary{
    background: var(--color-accent);
    color:#fff;
    box-shadow: var(--shadow-pop);
  }
  .xa-btn--primary:hover{ background: var(--color-accent-ink); }
  .xa-btn--primary svg{ width:14px; height:14px; }

  /* =========================================================
     BLOCK: promo  (dashboard premium banner)
  ========================================================= */
  .xa-promo{
    margin: 20px 28px 28px;
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    background: linear-gradient(120deg, var(--color-accent-ink), var(--color-accent) 65%);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    overflow:hidden;
    position:relative;
  }

  .xa-promo__ring{
    position:absolute;
    width:220px; height:220px;
    border-radius:50%;
    border:1px solid rgba(255,255,255,.18);
    right:-60px; top:-90px;
  }

  .xa-promo__ring--outer{
    width:320px; height:320px;
    right:-110px; top:-140px;
    border-color: rgba(255,255,255,.10);
  }

  .xa-promo__body{ position:relative; max-width:520px; }

  .xa-promo__eyebrow{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.06em;
    background: rgba(255,255,255,.16);
    padding:4px 10px;
    border-radius:999px;
    margin-bottom:12px;
  }

.xa-promo__title {
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 800;
	margin: 0 0 6px;
	letter-spacing: -0.01em;
	color: #fff;
}
  .xa-promo__desc{
    margin:0 0 18px;
    font-size:13px;
    line-height:1.6;
    color: rgba(255,255,255,.85);
  }

  .xa-promo__cta{
    background:#fff;
    color: var(--color-accent-ink);
    font-weight:700;
    font-size:13.5px;
    border:none;
    padding:11px 20px;
    border-radius: var(--radius-sm);
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:8px;
  }

  .xa-promo__cta svg{ width:14px; height:14px; }

  .xa-promo__art{
    position:relative;
    flex-shrink:0;
    width:120px; height:120px;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .xa-promo__art-badge{
    width:88px; height:88px;
    border-radius: 22px;
    background: rgba(255,255,255,.14);
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.22);
  }

  .xa-promo__art-badge svg{ width:40px; height:40px; color:#fff; }

  /* =========================================================
     BLOCK: stat-grid (dashboard summary cards)
  ========================================================= */
  .xa-stat-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:14px;
    padding: 22px 28px 6px;
  }

  .xa-stat-card{
    border:1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding:16px 18px;
    background: var(--color-surface-sunk);
  }

  .xa-stat-card__value{
    font-family: var(--font-display);
    font-size:24px;
    font-weight:800;
    margin:0 0 2px;
  }

  .xa-stat-card__label{
    margin:0;
    font-size:12.5px;
    color: var(--color-ink-faint);
    font-weight:600;
  }

  .xa-stat-card--accent .xa-stat-card__value{ color: var(--color-accent-ink); }
  .xa-stat-card--success .xa-stat-card__value{ color: var(--color-success); }

  /* =========================================================
     Responsive
  ========================================================= */

  @media (min-width: 992px){
    .xa-settings-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
    }
  }
  @media (max-width: 820px){
    .xa-settings__body{ grid-template-columns: 1fr; }
    .xa-settings-nav{ position:static; }
    .xa-settings-nav__list{ flex-direction:row; overflow-x:auto; }
    .xa-settings-nav__link{ border-left:none; border-bottom:3px solid transparent; white-space:nowrap; }
    .xa-settings-nav__item--active .xa-settings-nav__link{ border-left-color:transparent; border-bottom-color: var(--color-accent); }
    .xa-settings-row{ flex-direction:column; gap:12px; }
    .xa-settings-row__control{ justify-content:flex-start; width:100%; }
    .xa-stat-grid{ grid-template-columns: 1fr; }
    .xa-promo{ flex-direction:column; align-items:flex-start; }
    .xa-settings-panel__actionbar{ flex-direction:column; align-items:stretch; }
  }