





.tu-btn-primary {
  background-color: var(--tu-color-action-primary, transparent);
  background-image: var(--cr-cta-grad, none);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--r-lg);
  box-shadow: 0 10px 22px rgba(168,85,247,.35);
  font-weight: 700;
  min-height: var(--tu-size-hit);
}
.tu-btn-primary:active { transform: scale(.97); }
.tu-btn-primary:focus-visible { outline: 2px solid var(--cr-violet); outline-offset: 2px; }
.tu-btn-primary[disabled], .tu-btn-primary.is-disabled {
  cursor: not-allowed; pointer-events: none;
}
.tu-btn-primary[aria-busy="true"] { cursor: progress; }

.tu-btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: none;
  font-weight: 700;
  min-height: var(--tu-size-hit);
}
.tu-btn-secondary:focus-visible { outline: 2px solid var(--cr-violet); outline-offset: 2px; }
.tu-btn-secondary[disabled], .tu-btn-secondary.is-disabled { cursor: not-allowed; pointer-events: none; }

.tu-btn-tertiary {
  background: none;
  border: none;
  color: var(--cr-violet);
  box-shadow: none;
  font-weight: 700;
  min-height: var(--tu-size-hit);
}
.tu-btn-tertiary:focus-visible { outline: 2px solid var(--cr-violet); outline-offset: 2px; }
.tu-btn-tertiary[disabled], .tu-btn-tertiary.is-disabled { cursor: not-allowed; pointer-events: none; }

.tu-btn-destructive {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--tu-space-8);
  min-height: var(--tu-size-hit);
  padding: 0 var(--tu-space-16);
  background: var(--tu-color-feedback-error-bg);
  color: var(--tu-color-feedback-error-text);
  border: 1px solid var(--tu-color-feedback-error-border);
  border-radius: var(--r-md);
  font-weight: 700;
  cursor: pointer;
}
.tu-btn-destructive:active { transform: scale(.97); }
.tu-btn-destructive:focus-visible { outline: 2px solid var(--cr-violet); outline-offset: 2px; }
.tu-btn-destructive[disabled], .tu-btn-destructive.is-disabled { cursor: not-allowed; pointer-events: none; }

.tu-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tu-size-hit); height: var(--tu-size-hit);
  background: transparent;
  border: none;
  border-radius: var(--r-full);
  color: var(--text-primary);
  cursor: pointer;
}
.tu-icon-btn:hover { background: var(--bg-elevated); }
.tu-icon-btn:active { transform: scale(.94); }
.tu-icon-btn:focus-visible { outline: 2px solid var(--cr-violet); outline-offset: 2px; }
.tu-icon-btn[disabled], .tu-icon-btn.is-disabled { cursor: not-allowed; pointer-events: none; }
.tu-icon-btn svg { width: var(--tu-size-icon); height: var(--tu-size-icon); }



.tu-sheet-overlay {
  position: fixed; inset: 0; z-index: 2050; background: rgba(26,22,37,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.tu-sheet {
  width: 100%; max-width: 430px; background: var(--bg-surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--sp-3) var(--sp-6) calc(env(safe-area-inset-bottom, var(--sp-1)) + var(--sp-6));
  box-shadow: 0 -12px 40px rgba(30,20,80,.25);
  max-height: 90vh; max-height: 90dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.tu-sheet-grip { width: 40px; height: 4px; border-radius: var(--r-full); background: var(--bg-elevated); margin: 0 auto var(--sp-4); }

.tu-modal-overlay {
  position: fixed; inset: 0; z-index: 2100; background: rgba(20,16,32,.45);
  display: flex; align-items: center; justify-content: center; padding: var(--sp-6);
}
.tu-modal {
  width: 100%; max-width: 360px; background: var(--bg-surface);
  border-radius: var(--r-lg); box-shadow: 0 24px 48px rgba(124,58,237,.25);
}
.tu-modal-head { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-5) var(--sp-5) var(--sp-3); }
.tu-modal-body { padding: 0 var(--sp-5) var(--sp-5); }
.tu-modal-foot { flex-shrink: 0; padding: var(--sp-3) var(--sp-5) calc(var(--sp-5) + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }

.tu-drawer-overlay {
  position: fixed; inset: 0; z-index: 2100; background: rgba(20,16,32,.45);
  display: flex; justify-content: flex-end;
}
.tu-drawer {
  height: 100%; width: min(86vw, 360px); background: var(--bg-surface);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  box-shadow: 0 24px 48px rgba(124,58,237,.25);
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}



.tu-toast {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 600;
  pointer-events: auto;
}
.tu-toast-container {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-4);
  z-index: calc(var(--z-modal) + 9599);
  pointer-events: none;
  width: min(420px, 100%);
}
.tu-toast--success { border-color: rgba(34,197,94,.4); }
.tu-toast--error   { border-color: rgba(239,68,68,.4); }
.tu-toast--warning { border-color: rgba(217,119,6,.4); }
.tu-toast-action-btn {
  margin-left: auto; flex-shrink: 0;
  background: transparent; border: 1px solid currentColor; color: inherit;
  border-radius: var(--r-sm); padding: 4px 10px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.tu-toast-action-btn:hover { background: rgba(0,0,0,.06); }
.tu-toast-close-btn {
  margin-left: auto; flex-shrink: 0;
  background: transparent; border: none; color: inherit; opacity: .6;
  border-radius: var(--r-sm); width: 44px; height: 44px; margin-right: calc(var(--sp-2) * -1);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-body); line-height: 1; cursor: pointer;
}
.tu-toast-close-btn:hover { opacity: 1; background: rgba(0,0,0,.06); }

.tu-segmented-control { display: flex; gap: var(--sp-2); }
.tu-tab {
  -webkit-appearance: none; appearance: none;
  flex: 1; min-height: var(--tu-size-hit); border: 1px solid var(--border); background: var(--bg-surface);
  border-radius: var(--r-md); font-family: inherit; font-size: var(--fs-ui); font-weight: 700;
  color: var(--text-secondary); cursor: pointer;
}
.tu-tab[aria-selected="true"] { background: var(--violet-bright); border-color: var(--violet-bright); color: var(--text-inverse); }
.tu-tab:focus-visible { outline: 2px solid var(--cr-violet); outline-offset: 2px; }

.tu-bottom-nav {
  display: flex; align-items: stretch;
  background: rgba(255,255,255,.94);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(1.8);
  padding-bottom: env(safe-area-inset-bottom, var(--sp-1));
  flex-shrink: 0;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}
.tu-nav-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-1); padding: var(--sp-2) var(--sp-1);
  cursor: pointer; color: var(--text-muted); font-size: var(--fs-caption); font-weight: 700;
  letter-spacing: .01em; position: relative;
  border: none; background: none; font-family: inherit;
}
.tu-nav-tab[aria-current="page"] { color: var(--violet); }
.tu-nav-tab:focus-visible { outline: 2px solid var(--cr-violet); outline-offset: 2px; }






.tu-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.tu-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.tu-badge--draft       { background: rgba(85,85,106,.25); color: var(--text-muted); }
.tu-badge--review      { background: rgba(56,189,248,.15); color: var(--info); }
.tu-badge--approved    { background: rgba(34,197,94,.18); color: var(--success); }
.tu-badge--recruiting  { background: rgba(34,197,94,.15); color: var(--success); }
.tu-badge--in-progress {
  background: rgba(56,189,248,.2); color: var(--info);
  animation: badge-inprogress-pulse 2s ease-in-out infinite;
}
.tu-badge--submit-wait { background: rgba(245,158,11,.15); color: var(--warning); }
.tu-badge--review-wait { background: rgba(245,158,11,.18); color: var(--warning); }
.tu-badge--revision    { background: rgba(239,68,68,.15); color: var(--danger); }
.tu-badge--achieved    { background: rgba(34,197,94,.2); color: var(--success); }
.tu-badge--closed      { background: rgba(85,85,106,.2); color: var(--text-muted); }
.tu-badge--canceled    { background: rgba(239,68,68,.12); color: var(--danger); opacity:.7; }
.tu-badge--frozen      { background: rgba(56,189,248,.1); color: var(--info); opacity:.7; }






.tu-tag {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-full);
  font-size: var(--fs-ui); font-weight: 700; white-space: nowrap;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer; transition: all var(--dur-fast); flex-shrink: 0;
  position: relative;
}


.tu-tag::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: max(100%, 44px); height: max(100%, 44px);
}
.tu-tag--active {
  background: var(--violet); border-color: var(--violet); color: var(--text-inverse);
}



.tu-field,
.tu-textarea,
.tu-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--bg-elevated);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  padding: 13px var(--sp-4);
  outline: none;
  transition: border-color var(--dur-fast);
}
.tu-field:focus, .tu-textarea:focus, .tu-select:focus {
  border-color: var(--cr-violet); box-shadow: 0 0 0 3px rgba(168,85,247,.15);
}
.tu-field::placeholder, .tu-textarea::placeholder { color: var(--text-muted); }
.tu-field-label {
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
  margin-bottom: var(--sp-2); display: block; letter-spacing: .02em;
}
.tu-field-group { display: flex; flex-direction: column; gap: 2px; }


.tu-field-error {
  display: none; margin-top: var(--sp-1); font-size: var(--fs-caption);
  color: var(--danger); line-height: 1.5; font-weight: 700;
}
.tu-field-error.tu-field-error--show { display: block; }



.tu-checkbox-row {
  display: flex; align-items: flex-start; gap: var(--sp-2); cursor: pointer;
}



.tu-switch {
  -webkit-appearance: none; appearance: none;
  position: relative; display: inline-block; flex-shrink: 0;
  width: 44px; height: 24px; padding: 0; border: none; border-radius: var(--r-full);
  background: var(--border); cursor: pointer;
  transition: background var(--dur-base) var(--ease-snap, ease);
}
.tu-switch::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--bg-surface); box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform var(--dur-base) var(--ease-snap, ease);
}
.tu-switch[aria-checked="true"] { background: var(--violet-bright); }
.tu-switch[aria-checked="true"]::before { transform: translateX(20px); }
.tu-switch:disabled, .tu-switch[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  .tu-switch, .tu-switch::before { transition: none; }
}



.tu-upload {
  position: relative; overflow: hidden;
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  text-align: center;
  transition: border-color var(--dur-fast), background var(--dur-fast);
  cursor: pointer;
}
.tu-upload:hover, .tu-upload.tu-upload--drag-over {
  border-color: var(--violet); background: var(--violet-trace);
}
.tu-upload-icon { font-size: 32px; margin-bottom: var(--sp-3); }
.tu-upload-label { font-size: 14px; color: var(--text-secondary); }
.tu-upload-sub { font-size: 12px; color: var(--text-muted); margin-top: var(--sp-1); }



.tu-empty-state { margin: var(--sp-6) var(--sp-5) 0; text-align: left; }
.tu-empty-state-title { margin: 0; font-size: var(--fs-title); font-weight: 700; color: var(--text-primary); line-height: 1.5; }
.tu-empty-state-body { margin: var(--sp-2) 0 0; font-size: var(--fs-body); color: var(--text-secondary); line-height: 1.7; }
.tu-empty-state-cta { margin-top: var(--sp-5); width: 100%; min-height: 48px; }
.tu-empty-state-illust { width: 72px; height: 72px; object-fit: contain; display: block; margin: 0 auto var(--sp-3); }
.tu-empty-state-title-centered { font-size: var(--fs-title); font-weight: 700; color: var(--text-primary); margin-bottom: var(--sp-2); }



.tu-skeleton-wrap { animation: skelFadeIn 0s .15s both; }
.tu-skeleton-line {
  height: 14px; border-radius: var(--r-sm); width: 100%;
  background: linear-gradient(90deg, var(--skel-base) 25%, var(--skel-hl) 50%, var(--skel-base) 75%);
  background-size: 200% 100%; animation: skeleton-wave 1.4s linear infinite;
}
.tu-skeleton-line + .tu-skeleton-line { margin-top: 8px; }
.tu-skeleton-line.tiny { height: 10px; }
.tu-skeleton-circle {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--skel-base); position: relative; overflow: hidden;
}
.tu-skeleton-circle::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 25%, var(--skel-hl) 50%, transparent 75%);
  background-size: 200% 100%; animation: skeleton-wave 1.4s linear infinite;
}
.tu-skeleton-block { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; }
@media (prefers-reduced-motion: reduce) {
  .tu-skeleton-line, .tu-skeleton-circle::after { animation: none; background: var(--skel-base); }
}



.tu-progress {
  margin-top: var(--sp-2); height: 8px; border-radius: var(--r-full);
  background: var(--bg-elevated); overflow: hidden;
}
.tu-progress-fill { display: block; height: 100%; background: var(--cr-violet); border-radius: var(--r-full); }
.tu-progress--warning {
  margin-top: var(--sp-2); height: 6px; border-radius: var(--r-full);
  background: rgba(245,158,11,.20); overflow: hidden;
}
.tu-progress--warning > i {
  display: block; height: 100%; border-radius: var(--r-full);
  background: var(--warning); transition: width .3s ease;
}



.tu-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-surface); border: 1px solid var(--bg-elevated); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: 0 4px 18px rgba(124,58,237,.08);
  cursor: pointer; margin-bottom: var(--sp-4);
  transition: transform 120ms cubic-bezier(.2,0,0,1), box-shadow .2s ease, border-color .2s ease;
}
.tu-card:active { transform: scale(.985); }
@media (prefers-reduced-motion: reduce) {
  .tu-card { transition: border-color .2s ease; }
  .tu-card:active { transform: none; border-color: var(--cr-violet); }
}



.tu-card--hero {
  position: relative;
  background: var(--bg-surface); border: 1px solid var(--bg-elevated); border-radius: var(--r-lg);
  overflow: hidden; cursor: pointer; box-shadow: 0 3px 14px rgba(124,58,237,.06);
  transition: transform .16s ease, box-shadow .2s ease;
}
.tu-card--hero:active { transform: scale(.99); }



.tu-activity-card {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  background: var(--bg-surface); border: 1px solid var(--bg-elevated); border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4); margin-top: var(--sp-4); margin-bottom: var(--sp-2); cursor: pointer;
  transition: transform .16s ease, border-color .2s ease;
}
.tu-activity-card:active { transform: scale(.985); }
.tu-activity-card--done { background: var(--bg-surface); opacity: .55; }



.tu-metric-card { flex: 1; min-width: 0; }
.tu-metric-card-label {
  font-size: var(--fs-caption); font-weight: 700; color: var(--text-muted);
  letter-spacing: .01em; margin-bottom: var(--sp-1); white-space: nowrap;
}
.tu-metric-card-value {
  font-size: var(--fs-body); font-weight: 900; color: var(--text-primary);
  font-variant-numeric: tabular-nums; line-height: 1.25;
}



.tu-list-item {
  position: relative; margin: 0; padding: var(--sp-3) var(--sp-5); cursor: pointer; background: var(--bg-surface);
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none;
  transition: background var(--dur-fast) var(--ease-snap, ease);
}
.tu-list-item:active { background: var(--bg-elevated); }
@media (hover: hover) {
  .tu-list-item:hover { background: var(--bg-elevated); }
}
