:root {
    --tm-orange:      #f97316;
    --tm-orange-light:#fff7ed;
    --tm-orange-dim:  #fed7aa;
    --tm-dark:        #1c1917;
    --tm-muted:       #78716c;
    --tm-border:      #e7e5e4;
    --tm-bg:          #fafaf9;
    --tm-white:       #ffffff;
    --tm-step-size:   36px;
    --tm-radius:      12px;
}

* { font-family: 'DM Sans', sans-serif; }

/* ── Modal shell ── */
.tm-modal .modal-content {
    border: none;
    border-radius: var(--tm-radius);
    box-shadow: 0 24px 60px rgba(0,0,0,.14);
    overflow: hidden;
}
.tm-modal .modal-header {
    background: var(--tm-white);
    border-bottom: 1px solid var(--tm-border);
    padding: 1.1rem 1.5rem;
}
.tm-modal .modal-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--tm-dark);
    letter-spacing: -.01em;
}
.tm-modal .modal-body   { padding: 0; background: var(--tm-bg); }
.tm-modal .modal-footer {
    background: var(--tm-white);
    border-top: 1px solid var(--tm-border);
    padding: .9rem 1.5rem;
}

/* ── Custom stepper header ── */
.tm-stepper-header {
    display: flex;
    align-items: center;
    padding: 1.4rem 1.8rem 0;
    background: var(--tm-white);
    border-bottom: 1px solid var(--tm-border);
}
.tm-step {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .6rem;
    flex: 1;
    padding-bottom: 1.1rem;
    position: relative;
    cursor: default;
    justify-content: center;
    gap: .6rem; flex: 1;
    padding-bottom: 1.1rem;
    position: relative;
    cursor: default;
}
/* connector line */
.tm-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0; top: 18px;
    width: calc(100% - 120px);
    height: 2px;
    background: var(--tm-border);
    transition: background .35s;
}
.tm-step.done:not(:last-child)::after { background: var(--tm-orange); }

.tm-step-circle {
    width: var(--tm-step-size);
    height: var(--tm-step-size);
    border-radius: 50%;
    background: var(--tm-bg);
    border: 2px solid var(--tm-border);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700;
    color: var(--tm-muted);
    flex-shrink: 0;
    transition: all .3s;
}
.tm-step.active .tm-step-circle {
    background: var(--tm-orange);
    border-color: var(--tm-orange);
    color: #fff;
    box-shadow: 0 0 0 4px var(--tm-orange-dim);
}
.tm-step.done .tm-step-circle {
    background: var(--tm-orange);
    border-color: var(--tm-orange);
    color: #fff;
}
.tm-step-label { line-height: 1.2; }
.tm-step-label strong {
    display: block; font-size: .82rem; font-weight: 600;
    color: var(--tm-dark);
}
.tm-step-label span {
    font-size: .73rem; color: var(--tm-muted);
}
.tm-step.active .tm-step-label strong { color: var(--tm-orange); }

/* ── Step content panes ── */
.tm-step-body {
    padding: 1.6rem 1.8rem;
    min-height: 300px;
    display: none;
}
.tm-step-body.active { display: block; }

/* ── Section label ── */
.tm-section-label {
    font-size: .7rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--tm-muted);
    margin-bottom: .8rem;
}

/* ── Objective cards ── */
.objective-group-title {
    font-size: .72rem; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: var(--tm-muted);
    margin-bottom: .7rem; margin-top: 1.2rem;
}
.objective-group-title:first-child { margin-top: 0; }

.obj-option { display: none; }
.obj-label {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .9rem;
    border: 1.5px solid var(--tm-border);
    border-radius: 8px;
    background: var(--tm-white);
    cursor: pointer;
    transition: all .2s;
    margin-bottom: .45rem;
    font-size: .85rem;
    color: var(--tm-dark);
    font-weight: 500;
}
.obj-label:hover { border-color: var(--tm-orange-dim); background: var(--tm-orange-light); }
.obj-label .obj-icon {
    width: 30px; height: 30px; border-radius: 7px;
    background: var(--tm-bg);
    display: flex; align-items: center; justify-content: center;
    color: var(--tm-muted); font-size: .85rem;
    flex-shrink: 0;
    transition: all .2s;
}
.obj-option:checked + .obj-label {
    border-color: var(--tm-orange);
    background: var(--tm-orange-light);
    color: var(--tm-orange);
}
.obj-option:checked + .obj-label .obj-icon {
    background: var(--tm-orange);
    color: #fff;
}

/* ── Name inputs ── */
.tm-name-group {
    background: var(--tm-white);
    border: 1.5px solid var(--tm-border);
    border-radius: 10px;
    overflow: hidden;
}
.tm-name-row {
    display: flex;
    align-items: center;
    padding: .7rem 1rem;
    gap: .75rem;
    border-bottom: 1px solid var(--tm-border);
}
.tm-name-row:last-child { border-bottom: none; }
.tm-name-row .row-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--tm-orange-light);
    color: var(--tm-orange);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; flex-shrink: 0;
}
.tm-name-row label {
    font-size: .78rem; font-weight: 600; color: var(--tm-muted);
    width: 70px; flex-shrink: 0;
    margin: 0;
}
.tm-name-row input.form-control {
    border: none; box-shadow: none; font-size: .88rem;
    padding: 0; background: transparent;
    color: var(--tm-dark);
}
.tm-name-row input.form-control:focus { box-shadow: none; outline: none; background: transparent; }
.tm-name-row input.form-control::placeholder { color: #c4b5b0; }

/* indent child rows */
.tm-name-row.indent { padding-left: 2.8rem; }
.tm-name-row.indent2 { padding-left: 4.5rem; }
.tm-name-row .indent-line {
    width: 2px; height: 20px; background: var(--tm-border); flex-shrink: 0;
}

/* ── Finalize summary ── */
.tm-summary-card {
    background: var(--tm-white);
    border: 1.5px solid var(--tm-border);
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    margin-bottom: .8rem;
}
.tm-summary-card h6 {
    font-size: .72rem; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: var(--tm-muted);
    margin-bottom: .7rem;
}
.tm-summary-row {
    display: flex; justify-content: space-between;
    font-size: .84rem; padding: .25rem 0;
    border-bottom: 1px solid var(--tm-border);
}
.tm-summary-row:last-child { border-bottom: none; }
.tm-summary-row .key { color: var(--tm-muted); }
.tm-summary-row .val { font-weight: 600; color: var(--tm-dark); }

.tm-ready-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #f0fdf4; color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: .3rem .75rem;
    font-size: .78rem; font-weight: 600;
}

/* ── Footer buttons ── */
.btn-tm-primary {
    background: var(--tm-orange);
    color: #fff; border: none;
    border-radius: 8px;
    padding: .5rem 1.3rem;
    font-size: .86rem; font-weight: 600;
    transition: background .2s, transform .1s;
}
.btn-tm-primary:hover { background: #ea6c0a; color:#fff; }
.btn-tm-primary:active { transform: scale(.97); }

.btn-tm-ghost {
    background: transparent; color: var(--tm-muted);
    border: 1.5px solid var(--tm-border);
    border-radius: 8px;
    padding: .5rem 1.1rem;
    font-size: .86rem; font-weight: 500;
    transition: all .2s;
}
.btn-tm-ghost:hover { border-color: var(--tm-orange-dim); color: var(--tm-orange); }

.step-counter {
    font-size: .78rem; color: var(--tm-muted);
    font-weight: 500;
}

/* ── Alert strip ── */
.tm-alert {
    display: none;
    padding: .55rem 1rem;
    font-size: .82rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}
.tm-alert.show { display: flex; align-items: center; gap: .5rem; }
.tm-alert.danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ── Demo trigger button ── */
.demo-bg {
    min-height: 100vh;
    background: #f5f5f4;
    display: flex; align-items: center; justify-content: center;
}