/* =====================================================================
   닥터링크 관리자/마이페이지 레이아웃 – st_renewal.css(공용 컴포넌트) 위에 덧씌움
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 15px; line-height: 1.5; color: #1f2633; background: var(--st-bg); word-break: keep-all; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.material-symbols-outlined { font-size: 20px; line-height: 1; vertical-align: middle; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.material-symbols-outlined.sm { font-size: 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--st-blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: #8a94a6; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.t-right { text-align: right; }
.t-center { text-align: center; }

/* ---------------- 상단바 ---------------- */
.adm-top { position: sticky; top: 0; z-index: 50; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--st-line); }
.adm-logo { display: flex; align-items: baseline; gap: 6px; text-decoration: none; min-width: 196px; }
.adm-logo b { font-size: 20px; font-weight: 800; color: var(--st-navy); letter-spacing: -.5px; }
.adm-logo em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--st-mint); letter-spacing: 1px; }
.adm-burger { display: none; width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.adm-search { flex: 1; max-width: 420px; position: relative; }
.adm-search .material-symbols-outlined { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8a94a6; }
.adm-search input { width: 100%; height: 40px; border: 1px solid var(--st-line); border-radius: 20px; padding: 0 14px 0 40px; background: var(--st-bg); }
.adm-search input:focus { background: #fff; border-color: #b9c2cf; outline: none; }
.adm-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.adm-user .who { font-size: 14px; text-align: right; line-height: 1.3; }
.adm-user .who small { display: block; font-size: 12px; color: #8a94a6; }

/* ---------------- 사이드바 ---------------- */
.adm-wrap { display: flex; min-height: calc(100vh - 64px - 48px); }
.adm-aside { width: 220px; flex: 0 0 220px; background: #fff; border-right: 1px solid var(--st-line); padding: 16px 12px; display: flex; flex-direction: column; }
.adm-aside ul { display: flex; flex-direction: column; gap: 2px; }
.adm-aside a { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 8px; color: #44506a; text-decoration: none; font-weight: 500; }
.adm-aside a:hover { background: #f1f4f8; }
.adm-aside a.on { background: var(--st-navy); color: #fff; }
.adm-aside a .cnt { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--st-orange); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.adm-aside-foot { margin-top: auto; padding: 16px 14px 4px; font-size: 12px; color: #a3abb9; }
.adm-dim { position: fixed; inset: 0; background: rgba(15, 25, 45, .45); z-index: 60; }

/* ---------------- 본문 ---------------- */
.adm-main { flex: 1; min-width: 0; padding: 28px 32px 48px; }
.adm-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.adm-page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
.adm-page-head p { margin-top: 4px; color: #6b7280; font-size: 14px; }
.adm-page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-foot { height: 48px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #a3abb9; border-top: 1px solid var(--st-line); background: #fff; }
.adm-section-title { font-size: 17px; font-weight: 700; margin: 28px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.adm-section-title a { font-size: 14px; font-weight: 500; color: var(--st-blue); text-decoration: none; }
.adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.adm-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.req-box > h3 .more { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--st-blue); text-decoration: none; }
.st-btn.danger { color: var(--st-red); border-color: #f3c3c5; }
.st-btn.danger:hover { background: #fde9ea; }
.st-btn.block { width: 100%; justify-content: center; }
button.st-btn { font-family: inherit; }

/* 알림 메시지 */
.st-flash { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.st-flash p { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.st-flash p.success { background: #e9f8ef; border-color: #bfe6cf; color: #1d6b3e; }
.st-flash p.error { background: #fdecec; border-color: #f5c2c4; color: #a3242a; }
.st-flash p.info { background: #eef4fd; border-color: #c9dcf8; color: #1f4f96; }
.st-flash span:not(.material-symbols-outlined) { flex: 1; }
.st-flash-close { border: 0; background: none; cursor: pointer; opacity: .6; padding: 0; }

/* ---------------- 필터 / 툴바 ---------------- */
.st-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--st-line); border-radius: 12px; margin-bottom: 14px; }
.st-filter select, .st-filter input[type=text], .st-filter input[type=search], .st-filter input[type=date], .st-filter input[type=month] { height: 40px; border: 1px solid #d5dbe4; border-radius: 8px; padding: 0 10px; background: #fff; min-width: 0; }
.st-filter input[type=text], .st-filter input[type=search] { flex: 1; min-width: 160px; }
.st-filter .sep { color: #a3abb9; }
.st-filter label.chk { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: #44506a; }
.st-filter .st-btn { height: 40px; }
.st-view-toggle { display: inline-flex; border: 1px solid var(--st-line); border-radius: 8px; overflow: hidden; background: #fff; }
.st-view-toggle button { border: 0; background: none; width: 40px; height: 36px; cursor: pointer; color: #8a94a6; }
.st-view-toggle button.on { background: #eef2f8; color: var(--st-navy); }
.st-count { font-size: 14px; color: #6b7280; }
.st-count b { color: #1f2633; }

/* ---------------- 데이터 테이블 ---------------- */
.st-table-wrap { background: #fff; border: 1px solid var(--st-line); border-radius: 12px; overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th { background: #f8fafc; color: #5b6575; font-weight: 600; font-size: 13px; padding: 11px 12px; border-bottom: 1px solid var(--st-line); text-align: left; white-space: nowrap; }
.st-table td { padding: 12px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.st-table tr:last-child td { border-bottom: 0; }
.st-table tbody tr:hover td { background: #fafcff; }
.st-table .tit a { color: #1f2633; text-decoration: none; font-weight: 600; }
.st-table .tit a:hover { color: var(--st-blue); text-decoration: underline; }
.st-table .tit .sub { display: block; font-size: 12px; color: #8a94a6; margin-top: 2px; font-weight: 400; }
.st-table .tag-new { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--st-red); border-radius: 4px; padding: 0 5px; margin-right: 4px; vertical-align: 1px; }
.st-table .reply { font-size: 12px; color: var(--st-blue); margin-left: 4px; }
.st-table tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--st-red); }
.st-table tr.row-done td { color: #6b7280; }
.st-table .empty td { text-align: center; padding: 48px 12px; color: #8a94a6; }
.due-input { height: 32px; border: 1px solid transparent; border-radius: 6px; padding: 0 6px; background: transparent; font-size: 13px; width: 132px; cursor: pointer; }
.due-input:hover, .due-input:focus { border-color: #d5dbe4; background: #fff; outline: none; }
.due-input.saved { border-color: var(--st-green); }
.due-input.late { color: var(--st-red); font-weight: 600; }

/* 카드 뷰 보조 */
.req-card .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.req-card .who { font-size: 13px; color: #6b7280; }
.req-list .req-card.overdue { border-left: 3px solid var(--st-red); }
[data-view="table"] .js-card-view, [data-view="card"] .js-table-view { display: none; }

/* 페이징 */
.st-paging { display: flex; justify-content: center; gap: 4px; margin: 20px 0 0; flex-wrap: wrap; }
.st-paging a, .st-paging strong { min-width: 36px; height: 36px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; text-decoration: none; font-size: 14px; color: #44506a; }
.st-paging a:hover { background: #eef1f5; }
.st-paging strong { background: var(--st-navy); color: #fff; }

/* ---------------- 폼 ---------------- */
.st-form { background: #fff; border: 1px solid var(--st-line); border-radius: 12px; padding: 24px; }
.st-form fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.st-form legend { font-size: 16px; font-weight: 700; margin-bottom: 14px; padding: 0; }
.st-form .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin-bottom: 22px; }
.st-form .grid .full { grid-column: 1 / -1; }
.st-form label.lb, .st-form .lb { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #2b3445; }
.st-form .lb .req { color: var(--st-red); margin-left: 2px; }
.st-form input[type=text], .st-form input[type=password], .st-form input[type=email], .st-form input[type=url], .st-form input[type=tel],
.st-form input[type=date], .st-form input[type=number], .st-form input[type=time], .st-form select, .st-form textarea,
.st-input { width: 100%; height: 42px; border: 1px solid #d5dbe4; border-radius: 8px; padding: 0 12px; background: #fff; font-size: 15px; }
.st-form textarea, textarea.st-input { height: auto; min-height: 120px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.st-form input:focus, .st-form select:focus, .st-form textarea:focus, .st-input:focus,
.req-form input:focus, .req-form textarea:focus, .req-form select:focus { border-color: var(--st-blue); outline: none; box-shadow: 0 0 0 3px rgba(47, 128, 237, .12); }
.st-form .hint { font-size: 13px; color: #6b7280; margin-top: 5px; }
.st-form .radios { display: flex; gap: 14px; flex-wrap: wrap; min-height: 42px; align-items: center; }
.st-form .radios label { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.st-form .actions, .st-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.st-actions.between { justify-content: space-between; }
.req-form select { height: 44px; }
.req-form label .req, .st-form .req { color: var(--st-red); margin-left: 2px; font-style: normal; }
.req-form .three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* ---------------- 상세: 액션 바 / 작성 탭 ---------------- */
.req-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.req-head .client { font-size: 14px; color: #6b7280; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.req-head h2 { font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -.3px; }
.req-head .ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.req-head .ctl select { height: 36px; border: 1px solid #d5dbe4; border-radius: 8px; padding: 0 8px; background: #fff; font-size: 14px; }
.compose-tabs { display: inline-flex; background: #f1f4f8; border-radius: 10px; padding: 4px; gap: 2px; margin-bottom: 10px; }
.compose-tabs label { padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; color: #5b6575; }
.compose-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.compose-tabs input:checked + span { color: #1f2633; font-weight: 600; }
.compose-tabs label:has(input:checked) { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
[data-public-only][hidden] { display: none !important; }
.compose.internal textarea { background: #fffbea; border-color: #f2dc8b; }
.compose textarea { width: 100%; min-height: 110px; border: 1px solid #d5dbe4; border-radius: 8px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.compose .bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.compose .bar .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.compose input[type=file] { font-size: 13px; max-width: 100%; }
.req-timeline li.internal .msg { background: #fffbea; border: 1px dashed #f2dc8b; border-radius: 8px; padding: 8px 10px; }
.req-timeline li.system:after { background: #cfd6e1; }
.req-timeline .who b { color: #2b3445; font-weight: 600; }
.req-timeline .who .tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; background: #f2dc8b; color: #6b5300; margin-left: 4px; }
.req-timeline .msg .status-line { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #44506a; }
.req-timeline .req-files { margin-top: 6px; }
.req-timeline .msg p { margin: 0 0 .4em; }
.req-info dd a { color: var(--st-blue); word-break: break-all; }
.req-info dd input[type=date], .req-info dd select { width: 100%; height: 36px; border: 1px solid #d5dbe4; border-radius: 8px; padding: 0 8px; background: #fff; font-size: 14px; }
.req-memo { font-size: 14px; line-height: 1.6; color: #44506a; background: var(--st-bg); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; max-height: 240px; overflow: auto; }

/* 공수 */
.mm-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.mm-list th { text-align: left; color: #8a94a6; font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--st-line); }
.mm-list td { padding: 8px 4px; border-bottom: 1px solid #f0f2f6; vertical-align: top; }
.mm-list .cm { color: #6b7280; white-space: pre-wrap; word-break: break-all; }
.mm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mm-form .full { grid-column: 1 / -1; }
.mm-form input, .mm-form select, .mm-form textarea { width: 100%; height: 36px; border: 1px solid #d5dbe4; border-radius: 8px; padding: 0 8px; font-size: 14px; background: #fff; }
.mm-form textarea { height: 64px; padding: 8px; resize: vertical; }
.mm-total { font-size: 14px; color: #44506a; }
.mm-total b { font-size: 18px; color: var(--st-navy); }

/* ---------------- 대시보드 / 리포트 ---------------- */
.req-summary a { transition: .15s; }
.req-summary a:hover { border-color: #b9c2cf; }
.req-summary .danger strong { color: var(--st-red); }
.req-summary small { display: block; font-size: 12px; color: #8a94a6; margin-top: 2px; }
.stat-bars li { display: grid; grid-template-columns: 120px 1fr 64px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.stat-bars .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-bars .bar { height: 10px; border-radius: 5px; background: #eef1f5; overflow: hidden; }
.stat-bars .bar i { display: block; height: 100%; border-radius: 5px; background: var(--st-blue); }
.stat-bars .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.month-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 160px; padding-top: 10px; }
.month-chart .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 12px; color: #8a94a6; text-decoration: none; }
.month-chart .col i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 0 0; background: #c9dcf8; min-height: 2px; }
.month-chart .col.on i { background: var(--st-navy); }
.month-chart .col b { font-size: 11px; color: #44506a; font-weight: 600; }

/* 공지 / 게시판 본문 */
.board-view .head { padding-bottom: 14px; border-bottom: 1px solid var(--st-line); margin-bottom: 18px; }
.board-view .head h2 { font-size: 20px; font-weight: 700; }
.board-view .head .meta { font-size: 13px; color: #8a94a6; margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.board-view .req-body { min-height: 120px; }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #f1f4f8; color: #44506a; white-space: nowrap; }
.chip.mint { background: #e3f6f4; color: #11786e; }
.chip.navy { background: #e6ecf6; color: var(--st-navy); }

/* ---------------- 로그인 ---------------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #f6f8fb 0%, #e9eef7 100%); }
.login-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--st-line); border-radius: 16px; padding: 40px 36px 32px; box-shadow: 0 10px 40px rgba(20, 40, 80, .08); }
.login-card .brand { text-align: center; margin-bottom: 28px; }
.login-card .brand b { display: block; font-size: 28px; font-weight: 800; color: var(--st-navy); letter-spacing: -1px; }
.login-card .brand span { font-size: 14px; color: #6b7280; }
.login-card .field { margin-bottom: 14px; }
.login-card label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.login-card input { width: 100%; height: 48px; border: 1px solid #d5dbe4; border-radius: 10px; padding: 0 14px; font-size: 16px; }
.login-card input:focus { border-color: var(--st-blue); outline: none; box-shadow: 0 0 0 3px rgba(47, 128, 237, .12); }
.login-card .st-btn { width: 100%; height: 50px; justify-content: center; font-size: 16px; font-weight: 600; margin-top: 8px; }
.login-card .help { margin-top: 20px; font-size: 13px; color: #8a94a6; text-align: center; line-height: 1.6; }

/* ---------------- 반응형 ---------------- */
@media (max-width: 1100px) {
	.adm-grid.g3 { grid-template-columns: 1fr 1fr; }
	.adm-main { padding: 24px 20px 40px; }
}
@media (max-width: 900px) {
	.adm-top { padding: 0 12px; gap: 8px; }
	.adm-burger { display: inline-flex; align-items: center; justify-content: center; }
	.adm-logo { min-width: 0; }
	.adm-search { display: none; }
	.hide-sm { display: none; }
	.adm-aside { position: fixed; top: 0; bottom: 0; left: 0; z-index: 70; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 24px rgba(0, 0, 0, .12); }
	body.drawer-open .adm-aside { transform: none; }
	body.drawer-open { overflow: hidden; }
	.adm-main { padding: 20px 14px 40px; }
	.adm-page-head h1 { font-size: 21px; }
	.adm-grid, .adm-grid.g3 { grid-template-columns: 1fr; }
	.st-form { padding: 18px; }
	.st-form .grid, .mm-form, .req-form .three { grid-template-columns: 1fr; }
	/* 모바일은 카드 뷰 고정 */
	[data-view] .js-table-view { display: none !important; }
	[data-view] .js-card-view { display: flex !important; }
	.st-view-toggle { display: none; }
	.st-filter > * { flex: 1 1 100%; }
	.st-filter .st-btn { justify-content: center; }
	.stat-bars li { grid-template-columns: 90px 1fr 52px; }
	.req-head .ctl { width: 100%; }
	.req-head .ctl > * { flex: 1; }
}
@media print {
	.adm-top, .adm-aside, .adm-foot, .compose, .st-filter, .actions { display: none !important; }
	.adm-main { padding: 0; }
}
