.template-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.exercise-order-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.exercise-order-btn { width: 40px; height: 40px; padding: 0 !important; flex: none; font-size: 20px; }
.exercise-order-btn:disabled { opacity: .35; cursor: default; }
.template-exercise > .exercise-order-actions { justify-content: flex-end; margin-bottom: 12px; }
.exercise-photo-options { position: fixed; z-index: 1200; overflow-y: auto; overscroll-behavior: contain; background: #1b2015; color: #f5f6e9; border: 1px solid #626c45; border-radius: 8px; box-shadow: 0 10px 28px #0008; box-sizing: border-box; }
.exercise-photo-option { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 76px; box-sizing: border-box; cursor: pointer; border-bottom: 1px solid #363e29; }
.exercise-photo-option:hover, .exercise-photo-option[aria-selected="true"] { background: #354125; }
.exercise-option-image { width: 56px; height: 56px; object-fit: contain; flex: none; border-radius: 6px; background: white; color: #555; text-align: center; }
.exercise-photo-option > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.exercise-photo-option strong { display: block; font-size: 15px; line-height: 1.4; }
.exercise-photo-option small { display: block; color: #bec7a9; margin-top: 4px; font-size: 13px; }
.exercise-option-status { margin: 12px; font-size: 13px; color: #bec7a9; }
.routine-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 20px 0; justify-content: space-between; }
.routine-toolbar .field { flex: 1; max-width: 600px; }
.routine-toolbar select { width: 100%; }
.routine-editor { border-block: 1px solid var(--line); padding: 20px 0; }
.routine-editor .field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin-bottom: 16px; }
.routine-editor textarea { width: 100%; resize: vertical; min-height: 80px; font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; box-sizing: border-box; }
.routine-copy { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.treino-block-head { flex-wrap: wrap; }
.template-layout { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 28px; }
.template-list { border-right: 1px solid var(--line); padding-right: 20px; }
.template-list button { display: block; width: 100%; text-align: left; padding: 16px 12px; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; font: inherit; overflow-wrap: anywhere; }
.template-list button[aria-pressed="true"] { background: var(--volt-soft); border-left: 3px solid var(--volt); }
.template-list strong, .template-list span { display: block; }
.template-list span { margin-top: 6px; color: var(--ink-soft); font-size: 13px; }
.template-fields { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin: 18px 0; }
.template-form .field, .template-apply .field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.template-form input, .template-form select, .template-apply select { width: 100%; min-width: 0; }
.template-exercise { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.template-exercise-picker { display: flex; align-items: end; gap: 12px; }
.template-exercise-picker .field { flex: 1; }
.template-exercise-picker img, .template-no-photo { width: 56px; height: 56px; flex: none; object-fit: contain; border-radius: 8px; background: white; }
.template-no-photo { background: var(--surface-2); }
.template-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.template-status { margin: 16px 0; color: #98dded; line-height: 1.5; }
.template-apply { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
.template-apply-fields { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; margin-top: 18px; }
.template-apply-fields label { flex: 1; min-width: 180px; }
@media(max-width:760px) { .template-layout { grid-template-columns: minmax(0,1fr); } .template-list { border-right: 0; padding-right: 0; max-height: 240px; overflow: auto; border-bottom: 1px solid var(--line); } .template-fields { grid-template-columns: minmax(0,1fr); } }
