
    :root {
      --card-bg: #ffffff;
      --surface: #f8f9fa;
      --surface-2: #e9ecef;
      --primary: #000;
      --primary-d: #2d1f0a;
      --primary-light: #faf5ee;
      --muted: #6c757d;
      --border: #edf0f2;
      --shadow-soft: 0 6px 22px rgba(0, 0, 0, 0.06);
      --radius-lg: 18px;
      --radius-md: 14px;
      --danger: #c0392b;
      --danger-bg: #fdf2f2;
      --success: #1a6e38;
      --success-bg: #eaf7ee;
      --warn: #8a6d1a;
      --warn-bg: #fdf6e3;
    }
    :root[data-theme="dark"] {
      --card-bg: #1c2027;
      --surface: #14171c;
      --surface-2: #20242c;
      --primary: #f0ede6;
      --primary-d: #ffffff;
      --primary-light: rgba(201, 168, 114, .16);
      --muted: #a7adb8;
      --border: #30353f;
      --shadow-soft: 0 6px 22px rgba(0, 0, 0, .35);
      --danger: #ff8a80;
      --danger-bg: rgba(192, 57, 43, .18);
      --success: #6fcf97;
      --success-bg: rgba(26, 110, 56, .18);
      --warn: #e8c468;
      --warn-bg: rgba(138, 109, 26, .18);
    }

    /* Literal (non-variable) colors from the rules above, patched for dark mode. */
    [data-theme="dark"] .profile-list,
    [data-theme="dark"] .top-profile { background: var(--card-bg); }
    [data-theme="dark"] .trn-cohort-row { background: var(--surface-2); }
    [data-theme="dark"] .trn-branch-filter { background: var(--surface-2); }
    [data-theme="dark"] .trn-card-price,
    [data-theme="dark"] .trn-summary-box .trn-summary-price { color: var(--primary); }
    [data-theme="dark"] .trn-pill-ACTIVE,
    [data-theme="dark"] .trn-pill-COMPLETED {
      background: rgba(37, 81, 168, .22); color: #9dc0ee; border-color: rgba(37, 81, 168, .4);
    }
    [data-theme="dark"] .trn-pill-BELOW_MINIMUM {
      background: rgba(255, 255, 255, .06); color: #a7adb8; border-color: var(--border);
    }
    [data-theme="dark"] .btn-trn-outline,
    [data-theme="dark"] .btn-apply-code,
    [data-theme="dark"] .btn-cancel { background: var(--card-bg); color: var(--primary); }
    [data-theme="dark"] .trn-reg-line,
    [data-theme="dark"] .trn-summary-box,
    [data-theme="dark"] .form-group label,
    [data-theme="dark"] .btn-cancel { color: var(--primary); }
    [data-theme="dark"] .form-group input[type="text"],
    [data-theme="dark"] .form-group input[type="email"] {
      background: var(--surface-2); color: var(--primary); border-color: var(--border);
    }
    [data-theme="dark"] .form-group input:focus { background: var(--card-bg); }
    [data-theme="dark"] .modal-box { background: var(--card-bg); }
    [data-theme="dark"] .modal-close:hover { color: var(--primary); }
[data-theme="dark"] .btn-trn-primary { color: #000; }
[data-theme="dark"] .btn-save { color: #000; }


    body {
      background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%) !important;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    .section { background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%); }

    .dashboard-shell { margin-top: 7em; padding-bottom: 60px; }
    .mobile-nav-tools { display: inline-flex; align-items: center; gap: 8px; }
    .profile-dropdown { margin-left: 10px; }
    .profile-toggle { padding: 0; background: transparent; border: none; }
    .profile-toggle .w-icon-dropdown-toggle { display: none; }

    .profile-list {
      left: auto; right: 0;
      min-width: 220px; padding: 8px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #ffffff;
      box-shadow: var(--shadow-soft);
    }
    .profile-list .dropdown-link { border-radius: 8px; margin-bottom: 2px; }
    .profile-list .dropdown-link:last-child { margin-bottom: 0; }

    .top-profile {
      display: inline-flex; align-items: center; gap: 8px;
      margin-left: 10px; padding: 6px 10px;
      border-radius: 999px; border: 1px solid var(--border);
      background: #fff;
    }
    .top-profile-avatar {
      width: 30px; height: 30px; border-radius: 50%;
      background: linear-gradient(135deg, #91621c, #c18a37);
      color: #fff; display: inline-flex; align-items: center;
      justify-content: center; font-size: 12px; font-weight: 700;
    }
    .top-profile-name { font-size: 12px; color: var(--primary); font-weight: 600; line-height: 1; }
    .top-profile-link { font-size: 11px; color: var(--muted); text-decoration: none; line-height: 1; }

    /* ── Page shell ── */
    .trn-shell { max-width: 980px; margin: 0 auto; padding: 0 clamp(12px, 2.5vw, 24px); }
    .trn-header { text-align: center; padding: 34px 12px 24px; }
    .trn-header .p-regular { color: var(--muted); margin-top: 8px; }

    /* ── Section headers ── */
    .trn-section-title {
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      margin: 32px 0 16px; flex-wrap: wrap;
    }
    .trn-section-title h2 { margin: 0; font-size: 19px; color: var(--primary); }
    .trn-section-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

    /* ── Training cards ── */
    .trn-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 16px;
    }

    .trn-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-soft);
      padding: 20px 22px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      cursor: pointer;
      transition: transform .16s, box-shadow .16s, border-color .16s;
    }
    .trn-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.09); border-color: #d8c9a3; }
    .trn-card.is-active { border-color: var(--primary); box-shadow: 0 10px 28px rgba(0,0,0,.12); }

    .trn-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
    .trn-card-name { font-size: 16px; font-weight: 700; color: var(--primary); line-height: 1.3; }
    .trn-card-category {
      font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
      padding: 3px 9px; border-radius: 999px;
      background: var(--primary-light); color: #9d8248; border: 1px solid rgba(140,94,26,.22);
      white-space: nowrap;
    }
    .trn-card-desc { font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1; }
    .trn-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
    .trn-card-price { font-weight: 800; font-size: 16px; color: #0f0f0f; font-family: 'IBM Plex Mono', monospace; }
    .trn-card-cert { font-size: 11px; color: var(--success); font-weight: 600; }
    .trn-card-modules { font-size: 11.5px; color: var(--muted); margin-top: -4px; }

    /* ── Cohorts panel ── */
    .trn-cohorts-panel {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-soft);
      overflow: hidden;
      margin-top: 8px;
    }
    .trn-cohorts-header {
      padding: 16px 22px;
      border-bottom: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    }
    .trn-cohorts-header h3 { margin: 0; font-size: 15px; color: var(--primary); }
    .trn-branch-filter {
      height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
      background: #fff; font-size: 12.5px; color: var(--primary); cursor: pointer;
    }
    .trn-cohorts-list { padding: 8px 22px 20px; display: flex; flex-direction: column; gap: 10px; }

    .trn-cohort-row {
      display: flex; align-items: center; justify-content: space-between; gap: 14px;
      flex-wrap: wrap;
      padding: 14px 16px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #fcfbf9;
    }
    .trn-cohort-info { display: flex; flex-direction: column; gap: 3px; }
    .trn-cohort-name { font-weight: 700; font-size: 14px; color: var(--primary); }
    .trn-cohort-meta { font-size: 12px; color: var(--muted); }
    .trn-cohort-actions { display: flex; align-items: center; gap: 10px; }

    /* ── Status pills (shared: cohort + registration status) ── */
    .trn-pill {
      display: inline-block; font-size: 10px; font-weight: 700;
      padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em;
      white-space: nowrap; border: 1px solid transparent;
    }
    .trn-pill-OPEN, .trn-pill-CONFIRMED, .trn-pill-VERIFIED { background: var(--success-bg); color: var(--success); border-color: #c2e8ce; }
    .trn-pill-FULL, .trn-pill-WAITLISTED, .trn-pill-PENDING, .trn-pill-PENDING_PAYMENT, .trn-pill-DRAFT { background: var(--warn-bg); color: var(--warn); border-color: #f0e0ab; }
    .trn-pill-CANCELLED, .trn-pill-EXPIRED, .trn-pill-FAILED { background: var(--danger-bg); color: var(--danger); border-color: #f0c9c3; }
    .trn-pill-ACTIVE, .trn-pill-COMPLETED { background: #eef2fb; color: #2551a8; border-color: #cddaf2; }
    .trn-pill-BELOW_MINIMUM { background: #f5f5f5; color: #888; border-color: #ddd; }

    /* ── Buttons ── */
    .btn-trn {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 9px 18px; border-radius: 999px;
      font-size: 13px; font-weight: 700; cursor: pointer;
      border: none; transition: transform .16s, opacity .16s;
      white-space: nowrap;
    }
    .btn-trn:hover { transform: translateY(-1px); }
    .btn-trn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
    .btn-trn-primary { background: var(--primary); color: #fff; }
    .btn-trn-secondary { background: #9d8248; color: #fff; }
    .btn-trn-outline { background: #fff; border: 1.5px solid var(--border); color: var(--primary); }

    .empty-state { text-align: center; color: var(--muted); padding: 32px 20px; font-size: 13.5px; }

    /* ── "Your Registration" panel ── */
    .trn-reg-panel {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-soft);
      padding: 22px;
      margin-top: 8px;
    }
    .trn-reg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
    .trn-reg-code { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 15px; letter-spacing: .04em; color: var(--primary); }
    .trn-reg-line { font-size: 13px; color: #374151; margin: 4px 0; }
    .trn-reg-line strong { color: var(--primary); }
    .trn-reg-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

    /* ── Identity verification form ── */
    .trn-id-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
    .trn-id-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

    /* ── Check status panel ── */
    .trn-lookup-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
    .trn-lookup-row .form-group { flex: 1; min-width: 160px; }
    .trn-lookup-result {
      margin-top: 16px; padding: 16px; border-radius: 12px;
      background: var(--primary-light); border: 1px solid rgba(140,94,26,.16);
      display: none;
    }
    .trn-lookup-result.is-visible { display: block; }

    /* ── Form basics (shared with modal) ── */
    .form-group { display: flex; flex-direction: column; gap: 5px; }
    .form-group label { font-size: 12.5px; font-weight: 600; color: #374151; letter-spacing: .01em; }
    .form-group input[type="text"], .form-group input[type="email"] {
      height: 42px; padding: 0 12px; border: 1.5px solid #d1d8cf; border-radius: 10px;
      font-size: 14px; color: #111; background: #fafafa; outline: none;
      transition: border-color .16s, box-shadow .16s, background .16s; width: 100%; box-sizing: border-box;
    }
    .form-group input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(140,94,26,.1); }
    .form-hint { font-size: 11.5px; color: var(--muted); }
    .form-error { font-size: 12px; color: var(--danger); display: none; }
    .form-error.is-visible { display: block; }
    .form-success { font-size: 12px; color: var(--success); display: none; }
    .form-success.is-visible { display: block; }

    /* ── Modal (register) ── */
    .modal-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,.48); z-index: 9999;
      align-items: center; justify-content: center; padding: 16px;
      backdrop-filter: blur(2px);
    }
    .modal-overlay.open { display: flex; }
    .modal-box {
      background: #fff; border-radius: var(--radius-lg);
      width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
      padding: 30px 28px 26px; box-shadow: 0 28px 72px rgba(0,0,0,.2);
      position: relative; border: 1px solid rgba(0,0,0,.05);
    }
    .modal-close {
      position: absolute; top: 16px; right: 18px; width: 30px; height: 30px;
      display: flex; align-items: center; justify-content: center;
      background: var(--surface); border: none; border-radius: 50%;
      font-size: 18px; color: var(--muted); cursor: pointer; transition: background .16s, color .16s;
    }
    .modal-close:hover { background: var(--surface-2); color: #111; }
    .modal-header { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
    .modal-title { font-size: 18px; font-weight: 700; color: var(--primary); margin: 0; }
    .modal-subtitle { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

    .trn-summary-box {
      background: var(--primary-light); border: 1px solid rgba(140,94,26,.16);
      border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-size: 13px; color: #374151;
    }
    .trn-summary-box .trn-summary-price { font-weight: 800; font-size: 17px; color: #0f0f0f; font-family: 'IBM Plex Mono', monospace; }

    .trn-discount-row { display: flex; gap: 8px; }
    .trn-discount-row input { flex: 1; }
    .btn-apply-code {
      height: 42px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--border);
      background: #fff; font-size: 13px; font-weight: 700; color: var(--primary); cursor: pointer; white-space: nowrap;
    }
    .btn-apply-code:hover { background: var(--surface); }

    .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
    .btn-cancel {
      min-height: 42px; padding: 9px 22px; border-radius: 999px; border: 1.5px solid var(--border);
      background: #fff; color: #374151; font-size: 14px; font-weight: 600; cursor: pointer;
      transition: background .16s, border-color .16s;
    }
    .btn-cancel:hover { background: var(--surface); border-color: #c8cfc4; }
    .btn-save {
      min-height: 42px; padding: 9px 26px; border-radius: 999px; border: none;
      background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
      transition: background .16s, box-shadow .16s, transform .16s;
    }
    .btn-save:hover { background: var(--primary-d); transform: translateY(-1px); }
    .btn-save:disabled { opacity: .55; cursor: not-allowed; transform: none; }

    @media (max-width: 700px) {
      .trn-grid { grid-template-columns: 1fr; }
      .trn-cohort-row { flex-direction: column; align-items: flex-start; }
      .trn-id-row { grid-template-columns: 1fr; }
    }
    @media (max-width: 479px) {
      .top-profile { width: auto; justify-content: center; margin: 0 0 0 8px; padding: 0; border: none; background: transparent; }
      .top-profile-name, .top-profile-link { display: none; }
    }
