:root {
  --bg:#f5f7fb; --surface:#fff; --line:#dfe5ee; --text:#172033;
  --muted:#68758a; --primary:#185abd; --primary-dark:#11478f;
  --danger:#c62828; --success:#17633d; --shadow:0 6px 24px rgba(22,34,51,.06);
  --radius:18px;
}
*{box-sizing:border-box}
html{font-family:"Pretendard","Noto Sans KR","Malgun Gothic",sans-serif;color:var(--text);background:var(--bg)}
body{margin:0;min-height:100vh}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.5}
[hidden]{display:none!important}

.topbar{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}
.topbar-inner{max-width:1440px;min-height:72px;margin:auto;padding:0 24px;display:flex;align-items:center;gap:28px}
.brand{display:flex;align-items:center;gap:12px;margin-right:auto}
.brand strong{display:block;font-size:18px}.brand small{display:block;margin-top:2px;color:var(--muted)}
.brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#e8f1ff;color:var(--primary);font-weight:900}
.brand-mark.large{width:52px;height:52px;font-size:22px}
.topnav{display:flex;align-items:center;gap:6px}
.topnav a{padding:10px 12px;border-radius:10px;color:#334055;font-size:14px;font-weight:700}
.topnav a:hover{background:#f0f4fa}.topnav .primary-link{color:var(--primary)}
.mobile-nav{display:none}

.page-shell{max-width:1440px;margin:auto;padding:34px 24px 70px}
.page-heading{margin-bottom:26px;display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.page-heading.compact{align-items:center}
.page-heading h1{margin:4px 0 7px;font-size:clamp(28px,3vw,42px);letter-spacing:-.04em}
.page-heading p{margin:0;color:var(--muted)}
.eyebrow{color:var(--primary)!important;font-size:12px;font-weight:900;letter-spacing:.14em}

.panel,.metric-card,.external-link-card{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.panel{margin-bottom:22px;padding:24px}
.panel-header{margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.panel-header h2,.external-link-card h2{margin:0;font-size:20px}
.panel-header p,.external-link-card p{margin:5px 0 0;color:var(--muted);font-size:14px}

.metric-grid{margin-bottom:22px;display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.metric-card{padding:22px;transition:.15s}
.metric-card:hover{transform:translateY(-2px);border-color:#b9c8dd}
.metric-card span{color:var(--muted);font-weight:700}
.metric-card strong{display:block;margin:12px 0 5px;font-size:34px;letter-spacing:-.04em}
.metric-card small{color:var(--muted)}.metric-card.danger strong{color:var(--danger)}
.external-link-card{padding:24px;display:flex;align-items:center;justify-content:space-between;gap:20px}

.button-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.button{min-height:42px;padding:10px 16px;border:1px solid transparent;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;white-space:nowrap}
.button.primary{background:var(--primary);color:#fff}.button.primary:hover{background:var(--primary-dark)}
.button.secondary{border-color:#d9e3f0;background:#edf3fb;color:#263752}
.button.ghost{border-color:var(--line);background:#fff;color:#44526a}
.button.danger-outline{border-color:#efbaba;background:#fff;color:var(--danger)}
.button.small{min-height:36px;padding:7px 12px;font-size:13px}.button.wide{width:100%}

.alert{margin-bottom:18px;padding:14px 16px;border-radius:12px;font-weight:700}
.alert.error{border:1px solid #f2c1c1;background:#fff0f0;color:#861e1e}
.alert.success{border:1px solid #bce2cb;background:#ebf8f0;color:#125837}
label{display:grid;gap:7px;color:#303b4f;font-size:14px;font-weight:700}
label>span b{color:var(--danger)}
input,select,textarea{width:100%;padding:11px 12px;border:1px solid #ccd5e2;border-radius:11px;outline:0;background:#fff;color:var(--text)}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(24,90,189,.12)}
textarea{line-height:1.65;resize:vertical}.stack-form{display:grid;gap:16px}

.filter-grid{display:grid;grid-template-columns:2fr repeat(5,1fr) auto;align-items:end;gap:14px}
.filter-grid .span-2{grid-column:span 2}.filter-actions{display:flex;gap:8px}

.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:13px}
table{width:100%;min-width:850px;border-collapse:collapse}
th,td{padding:13px 14px;border-bottom:1px solid #edf0f5;text-align:left;vertical-align:middle;font-size:14px}
th{background:#f7f9fc;color:#536079;font-size:12px;letter-spacing:.04em}
tbody tr:hover{background:#fbfcfe}tbody tr:last-child td{border-bottom:0}
td>a:first-child{color:var(--primary);font-weight:800}.title-link{color:var(--text)!important;font-weight:800}
.badge,.status{padding:5px 9px;border-radius:999px;display:inline-flex;align-items:center;font-size:12px;font-weight:900;line-height:1}
.badge.urgent{margin-right:5px;background:#ffedf1;color:#a2132c}
.status-requested{background:#fff3d8;color:#7b4f00}.status-received{background:#e8f1ff;color:#174d91}
.status-processing{background:#f1eaff;color:#5a309b}.status-completed{background:#e8f7ef;color:#17633d}
.status-rejected,.status-canceled{background:#eef0f3;color:#6b7280}
.empty-state{padding:52px 20px;text-align:center;color:var(--muted)}
.empty-state strong{display:block;color:var(--text);font-size:18px}.empty-state p{margin:8px 0 0}
.empty-inline{padding:14px;border-radius:11px;background:#f7f9fc;color:var(--muted)}

.request-form{padding:0;overflow:hidden}.form-section{padding:26px;border-bottom:1px solid var(--line)}
.section-title{margin-bottom:20px;display:flex;align-items:flex-start;gap:12px}
.section-title>span,.section-title-main>span{width:30px;height:30px;flex:0 0 auto;border-radius:9px;display:grid;place-items:center;background:#e8f1ff;color:var(--primary);font-weight:900}
.section-title h2{margin:0;font-size:18px}.section-title p{margin:4px 0 0;color:var(--muted);font-size:13px}
.section-title.with-action{justify-content:space-between}.section-title-main{display:flex;gap:12px}
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.form-grid .span-2{grid-column:span 2}
.form-actions{padding:22px 26px;display:flex;justify-content:flex-end;gap:10px;background:#f9fbfd}
.item-rows{display:grid;gap:10px}.item-row{display:grid;grid-template-columns:2fr 1.2fr .7fr .6fr 1.5fr 38px;gap:8px}
.icon-button{width:38px;height:42px;border:1px solid #e7bfc3;border-radius:10px;background:#fff5f5;color:var(--danger);font-size:22px}
.helper{margin:10px 0 0;color:var(--muted);font-size:12px}
.file-drop{padding:22px;border:1px dashed #aebbd0;border-radius:13px;background:#fafcff}
.file-drop strong{color:var(--primary)}.file-drop span{color:var(--muted);font-size:12px}

.detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 390px;align-items:start;gap:22px}
.detail-header{margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;gap:20px}.detail-header small{color:var(--muted)}
.detail-list{margin:0;border:1px solid var(--line);border-radius:13px;display:grid;grid-template-columns:repeat(2,1fr);overflow:hidden}
.detail-list>div{min-height:48px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:110px 1fr}
.detail-list>div:nth-child(odd){border-right:1px solid var(--line)}
.detail-list dt{padding:13px;background:#f7f9fc;color:var(--muted);font-size:13px;font-weight:800}
.detail-list dd{margin:0;padding:13px;font-weight:700}
.content-block{margin-top:28px}.content-block h2{margin:0 0 12px;font-size:18px}
.preline{white-space:pre-wrap;line-height:1.75;word-break:break-word}
.result-box{padding:16px;border:1px solid #cfdef3;border-radius:12px;background:#f3f8ff}
.attachment-list{display:grid;gap:8px}.attachment-list a{padding:12px 14px;border:1px solid var(--line);border-radius:11px;display:flex;justify-content:space-between;gap:20px}
.attachment-list a:hover{border-color:#a8bad4;background:#fbfdff}.attachment-list small{color:var(--muted)}
.inline-upload{margin-top:12px;display:flex;align-items:end;gap:10px}.inline-upload input{flex:1}
.sticky-panel{position:sticky;top:94px}
.timeline{margin:0;padding:0;display:grid;gap:18px;list-style:none}.timeline li{display:grid;grid-template-columns:16px 1fr;gap:10px}
.timeline-dot{width:10px;height:10px;margin-top:5px;border-radius:50%;background:var(--primary);box-shadow:0 0 0 4px #e8f1ff}
.timeline strong{font-size:14px}.timeline p{margin:5px 0;color:#4b586d;font-size:13px}.timeline small{color:var(--muted);font-size:12px}


@media(max-width:1100px){
  .metric-grid{grid-template-columns:repeat(2,1fr)}
  .filter-grid{grid-template-columns:repeat(3,1fr)}
  .detail-grid{grid-template-columns:1fr}.sticky-panel{position:static}
}
@media(max-width:760px){
  body{padding-bottom:64px}.topbar-inner{min-height:62px;padding:0 16px}
  .brand small,.topnav{display:none}
  .mobile-nav{position:fixed;z-index:60;right:0;bottom:0;left:0;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);background:#fff;box-shadow:0 -8px 24px rgba(0,0,0,.06)}
  .mobile-nav a{padding:14px 6px;text-align:center;color:#42516a;font-size:12px;font-weight:800}
  .page-shell{padding:24px 14px 34px}.page-heading{align-items:flex-start;flex-direction:column}
  .page-heading .button-row,.page-heading>.button{width:100%}.page-heading .button-row .button,.page-heading>.button{flex:1}
  .metric-grid{grid-template-columns:repeat(2,1fr);gap:10px}.metric-card{padding:17px}.metric-card strong{font-size:28px}
  .panel{padding:17px;border-radius:15px}.external-link-card{align-items:stretch;flex-direction:column}
  .filter-grid{grid-template-columns:1fr 1fr}.filter-grid .span-2,.filter-actions{grid-column:span 2}.filter-actions .button{flex:1}
  .desktop-table{display:none}.mobile-request-list{display:grid;gap:10px}
  .request-card{padding:14px;border:1px solid var(--line);border-radius:12px;background:#fff}
  .request-card-top{margin-bottom:9px;display:flex;align-items:center;justify-content:space-between;color:var(--primary);font-size:12px;font-weight:800}
  .request-card strong{display:block;margin-bottom:7px}.request-card p{margin:0 0 6px;color:var(--muted);font-size:13px}.request-card small{color:var(--muted)}
  .form-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}.form-section{padding:18px}.form-actions{padding:16px 18px}
  .item-row{padding:12px;border:1px solid var(--line);border-radius:12px;grid-template-columns:1fr 1fr 38px}
  .item-row input[name="item_name"],.item-row input[name="item_note"]{grid-column:span 2}.item-row .remove-item{grid-column:3;grid-row:1}
  .detail-list{grid-template-columns:1fr}.detail-list>div:nth-child(odd){border-right:0}
  .detail-header,.attachment-list a,.inline-upload{align-items:stretch;flex-direction:column}
}

/* 2026-07 하남 요청관리 상태 단순화·완료목록·이미지 미리보기 */
.metric-card.success strong{color:var(--success)}
.metric-card.muted strong{color:#6b7280}
.status-processing{background:#e8f1ff;color:#174d91}
.status-completed{background:#e8f7ef;color:#17633d}
.status-canceled{background:#eef0f3;color:#6b7280}
.status-received,.status-rejected{display:none}

.view-tabs{margin:0 0 18px;display:flex;gap:8px}
.view-tabs a{padding:10px 16px;border:1px solid var(--line);border-radius:11px;background:#fff;color:#536079;font-size:14px;font-weight:800}
.view-tabs a.active{border-color:var(--primary);background:#eaf2ff;color:var(--primary)}
.completed-filter{grid-template-columns:2fr repeat(4,1fr) auto}

.content-title-row{margin-bottom:12px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.content-title-row h2{margin-bottom:4px}
.section-note{margin:0;color:var(--muted);font-size:13px}
.image-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.image-preview-card{min-width:0;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:#fff;box-shadow:0 3px 12px rgba(22,34,51,.05)}
.image-preview-card:hover{border-color:#9db3d2;transform:translateY(-1px)}
.image-preview-card img{width:100%;height:180px;display:block;object-fit:cover;background:#f1f4f8}
.image-preview-card span{padding:10px 12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334055;font-size:12px;font-weight:800}
.image-preview-card.workflow{border-color:#b8d9c8}
.workflow-image-block{padding-top:22px;border-top:1px dashed var(--line)}
.workflow-image-input small{color:var(--muted);font-size:12px;font-weight:400}
.history-detail{white-space:pre-wrap;word-break:break-word;line-height:1.65}

@media(max-width:900px){
  .image-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
  .completed-filter{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:760px){
  .mobile-nav{grid-template-columns:repeat(4,1fr)}
  .view-tabs a{flex:1;text-align:center}
  .image-gallery{grid-template-columns:1fr 1fr;gap:8px}
  .image-preview-card img{height:140px}
  .completed-filter{grid-template-columns:1fr 1fr}
}
@media(max-width:430px){
  .image-gallery{grid-template-columns:1fr}
  .image-preview-card img{height:220px}
}

.notice{margin:-8px 0 22px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:14px;font-weight:800}
.success-notice{border-color:#bce2cb;background:#ebf8f0;color:#125837}
.dashboard-actions{justify-content:flex-end}
@media(max-width:760px){
  .dashboard-actions{justify-content:stretch}
  .dashboard-actions .button{flex:1}
}

/* 2026-07-24 대시보드 재구성 및 데스크톱 중복 카드 숨김 */
.mobile-request-list{display:none}

.dashboard-hero{
  margin-bottom:22px;
  padding:30px 32px;
  border:1px solid #d9e5f4;
  border-radius:22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  background:linear-gradient(135deg,#ffffff 0%,#f3f8ff 100%);
  box-shadow:var(--shadow)
}
.dashboard-hero h1{margin:4px 0 8px;font-size:clamp(30px,3vw,44px);letter-spacing:-.045em}
.dashboard-hero p{margin:0;color:var(--muted)}
.dashboard-progress-summary{
  min-width:230px;
  padding:20px 22px;
  border:1px solid #cfe0f6;
  border-radius:17px;
  background:#fff;
  text-align:right
}
.dashboard-progress-summary span{display:block;color:var(--muted);font-size:13px;font-weight:800}
.dashboard-progress-summary strong{display:block;margin:5px 0 3px;color:var(--primary);font-size:38px;line-height:1}
.dashboard-progress-summary small{color:var(--muted);font-size:12px}

.dashboard-menu-grid{margin-bottom:16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.dashboard-menu-card{
  min-height:118px;
  padding:22px;
  border:1px solid var(--line);
  border-radius:18px;
  display:grid;
  grid-template-columns:52px minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  background:#fff;
  box-shadow:var(--shadow);
  transition:transform .15s,border-color .15s,box-shadow .15s
}
.dashboard-menu-card:hover{transform:translateY(-3px);border-color:#a9bdd9;box-shadow:0 12px 28px rgba(22,34,51,.10)}
.dashboard-menu-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;font-size:27px;font-weight:900}
.dashboard-menu-card.register .dashboard-menu-icon{background:#e8f1ff;color:var(--primary)}
.dashboard-menu-card.active .dashboard-menu-icon{background:#efeaff;color:#6240a0}
.dashboard-menu-card.completed .dashboard-menu-icon{background:#e8f7ef;color:var(--success)}
.dashboard-menu-text{min-width:0}
.dashboard-menu-text strong{display:block;margin-bottom:7px;font-size:20px;letter-spacing:-.025em}
.dashboard-menu-text small{display:block;color:var(--muted);font-size:13px;line-height:1.5}
.dashboard-menu-arrow{color:#8a98ab;font-size:34px;line-height:1}
.dashboard-menu-count{min-width:42px;height:42px;padding:0 11px;border-radius:999px;display:grid;place-items:center;background:#f0f4fa;color:#334055;font-size:18px;font-weight:900}
.dashboard-menu-card.completed .dashboard-menu-count{background:#e8f7ef;color:var(--success)}

.dashboard-status-grid{margin-bottom:22px;display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.dashboard-status-grid a{padding:14px 18px;border:1px solid var(--line);border-radius:14px;display:flex;align-items:center;gap:10px;background:#fff}
.dashboard-status-grid a:hover{border-color:#b8c8dc;background:#fbfdff}
.dashboard-status-grid span:not(.status-dot){color:#526078;font-size:14px;font-weight:800}
.dashboard-status-grid strong{margin-left:auto;font-size:22px}
.status-dot{width:10px;height:10px;border-radius:50%}
.status-dot.urgent{background:#d9233f}
.status-dot.requested{background:#d99a14}
.status-dot.processing{background:#326fc6}
.status-dot.canceled{background:#8b95a5}
.dashboard-status-grid a.urgent-summary{border-color:#f0c1c9;background:#fff7f8}
.dashboard-status-grid a.urgent-summary:hover{border-color:#df7c8d;background:#fff1f3}
.dashboard-status-grid a.urgent-summary span:not(.status-dot),
.dashboard-status-grid a.urgent-summary strong{color:#a5162f}
.dashboard-recent-panel{padding:0;overflow:hidden}
.dashboard-recent-panel .panel-header{margin:0;padding:22px 24px;border-bottom:1px solid var(--line)}
.dashboard-recent-panel .table-wrap{border:0;border-radius:0}
.dashboard-external-link{box-shadow:none}

@media(max-width:900px){
  .dashboard-menu-grid{grid-template-columns:1fr}
  .dashboard-menu-card{min-height:98px}
}
@media(max-width:760px){
  .dashboard-hero{padding:22px;align-items:stretch;flex-direction:column}
  .dashboard-progress-summary{min-width:0;text-align:left}
  .dashboard-menu-grid{gap:10px}
  .dashboard-menu-card{padding:17px;grid-template-columns:46px minmax(0,1fr) auto;gap:12px}
  .dashboard-menu-icon{width:46px;height:46px;border-radius:13px;font-size:23px}
  .dashboard-menu-text strong{font-size:18px}
  .dashboard-status-grid{grid-template-columns:1fr 1fr;gap:7px}
  .dashboard-status-grid a{padding:12px 10px;gap:7px}
  .dashboard-status-grid strong{font-size:19px}
  .desktop-table{display:none}
  .mobile-request-list{display:grid;gap:10px;padding:14px}
  .dashboard-recent-panel .mobile-request-list{padding:14px}
}
@media(min-width:761px){
  .desktop-table{display:block}
  .mobile-request-list{display:none!important}
}
@media(max-width:480px){
  .dashboard-status-grid{grid-template-columns:1fr}
  .dashboard-menu-card{grid-template-columns:44px minmax(0,1fr) auto}
}
