* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  margin: 0; background: #f4f5f7; color: #172b4d; line-height: 1.5;
}
header {
  background: #0747a6; color: #fff; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
header h1 { font-size: 20px; margin: 0; }
.status { font-size: 13px; background: rgba(255,255,255,.15); padding: 4px 10px; border-radius: 12px; }
.status.ok { background: rgba(54,179,126,.4); }
.status.warn { background: rgba(255,153,31,.5); }

main { max-width: 860px; margin: 24px auto; padding: 0 16px; }
.card { background: #fff; border-radius: 10px; padding: 20px 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(9,30,66,.12); }
.card h2 { font-size: 16px; margin: 0 0 14px; color: #0747a6; }
.card h2:not(:first-child) { margin-top: 24px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid label, label.block { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; gap: 4px; }
.grid label.wide { grid-column: 1 / -1; }
label.block { margin-top: 12px; }
input, select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid #c1c7d0; border-radius: 6px; font-weight: 400;
}
textarea { resize: vertical; }

.rec-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.timer { font-variant-numeric: tabular-nums; font-size: 15px; color: #42526e; }
.or { color: #7a869a; font-size: 13px; }
.notes-fallback { margin-top: 12px; }
.notes-fallback textarea { width: 100%; margin-top: 8px; }
.notes-fallback summary { cursor: pointer; font-size: 13px; color: #5e6c84; }

.btn {
  font: inherit; font-weight: 600; padding: 10px 18px; border: 1px solid #c1c7d0;
  background: #fff; border-radius: 6px; cursor: pointer; margin-top: 16px;
}
.btn:hover { background: #f4f5f7; }
.btn.primary { background: #0052cc; color: #fff; border-color: #0052cc; }
.btn.primary:hover { background: #0747a6; }
.btn.danger { background: #36b37e; color: #fff; border-color: #36b37e; }
.btn.danger:hover { background: #2a8f64; }
.btn.recording { background: #de350b; color: #fff; border-color: #de350b; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.progress { margin-top: 12px; color: #5e6c84; font-size: 14px; }
.hidden { display: none !important; }

.transcript { white-space: pre-wrap; background: #f4f5f7; padding: 12px; border-radius: 6px; font-size: 13px; max-height: 300px; overflow: auto; }
details summary { cursor: pointer; margin-top: 12px; font-size: 13px; color: #5e6c84; }

.dryrun { font-size: 12px; background: #fff0b3; color: #974f0c; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.pv-item { background: #f4f5f7; border-left: 3px solid #0052cc; padding: 10px 14px; margin: 10px 0; border-radius: 4px; font-size: 14px; }
.label { display: inline-block; background: #deebff; color: #0747a6; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; margin: 2px; }
.approve-row { display: flex; gap: 12px; justify-content: space-between; margin-top: 20px; }
.done-link { font-size: 16px; font-weight: 700; color: #0052cc; }
.req { color: #de350b; font-size: 11px; font-weight: 600; margin-left: 4px; }
.rec-hint { font-size: 12px; color: #5e6c84; background: #fff0b3; padding: 8px 12px; border-radius: 6px; margin: 10px 0; line-height: 1.5; }
.rec-hint b { color: #974f0c; }

/* 헤더 우측 + 내 설정 */
.header-right { display: flex; align-items: center; gap: 12px; }
.btn-settings { font: inherit; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.btn-settings:hover { background: rgba(255,255,255,.25); }

/* 모달 */
.modal { position: fixed; inset: 0; background: rgba(9,30,66,.55); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-box { background: #fff; border-radius: 12px; padding: 24px 28px; width: 480px; max-width: 92vw; box-shadow: 0 8px 30px rgba(9,30,66,.3); }
.modal-box h2 { margin: 0 0 6px; color: #0747a6; font-size: 18px; }
.modal-desc { font-size: 13px; color: #5e6c84; margin: 0 0 16px; }
.modal-hint { font-size: 12px; color: #5e6c84; margin: 6px 0 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.settings-current { font-size: 13px; padding: 10px 12px; border-radius: 6px; background: #f4f5f7; margin-bottom: 16px; }
.settings-current.ok { background: #e3fcef; }
.settings-current.warn { background: #fff0b3; }
.src-env { color: #7a869a; font-size: 11px; }
.src-oauth { color: #36b37e; font-size: 11px; font-weight: 600; }
.login-block { text-align: center; margin: 8px 0 16px; }
.btn-atlassian { display: inline-block; background: #0052cc; color: #fff; font-weight: 600; padding: 12px 22px; border-radius: 6px; text-decoration: none; font-size: 15px; }
.btn-atlassian:hover { background: #0747a6; }
.login-note { display: block; font-size: 12px; color: #5e6c84; margin-top: 8px; }
.token-fallback { margin-top: 8px; border-top: 1px solid #ebecf0; padding-top: 12px; }
.token-fallback summary { cursor: pointer; font-size: 13px; color: #5e6c84; }
