
:root { --container-w: 96vw; --accent: #2b6cb0;}
*{box-sizing:border-box}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;margin:0;background:#fafafa;color:#222}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
.topbar{display:flex;align-items:center;gap:24px;padding:10px 16px;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.08);position:sticky;top:0;z-index:10}
.topbar .logo{font-size:18px;margin-right:8px}
.topbar .menu a{margin-right:16px}
.topbar .userbox{margin-left:auto}
.container{width:var(--container-w);margin:16px auto}
.table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #e5e7eb;font-size:12px}
.table th,.table td{border:1px solid #e5e7eb;padding:6px 8px;text-align:left;vertical-align:top}
.table th{position:sticky;top:50px;background:#f8f8f8;z-index:5}
.table th a{color:#222;text-decoration:none;display:block;font-weight:600}
.table th a:hover{background:#e8e8e8;color:var(--accent)}
.table tbody tr{transition:background-color 0.2s ease}
.table tbody tr:hover{background-color:#e0f2fe;cursor:pointer}
.table .account-name{font-weight:700 !important;color:#1e40af;text-decoration:none}
.table .account-name:hover{color:#1d4ed8;text-decoration:underline}
.actions a{margin-right:8px}
.controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.btn{display:inline-block;padding:6px 10px;border:1px solid #ddd;background:#fff;border-radius:6px;cursor:pointer}
.btn.primary{background:#2563eb;color:#fff;border-color:#2563eb}
.btn.danger{background:#dc2626;color:#fff;border-color:#dc2626}
.search-row{display:flex;gap:6px;flex-wrap:wrap}
.search-row input[type=text],.search-row input:not([type]),.search-row select{padding:6px 8px}
.search-row input[type=text],.search-row input:not([type]){width:180px}
.search-row select{min-width:120px}
.form{background:#fff;padding:16px;border:1px solid #eee;border-radius:8px}
.form .row{display:grid;grid-template-columns:180px 1fr;gap:10px;margin-bottom:10px}
.form .address-row{display:grid;grid-template-columns:180px 1fr;gap:10px;margin-bottom:10px}
.form .address-fields{display:flex;gap:8px;flex-wrap:wrap}
.form .address-fields input{flex:1;min-width:120px}
.form .address-fields input:first-child{flex:2;min-width:200px}
.form .two-col{display:grid;grid-template-columns:180px 1fr;gap:10px;margin-bottom:10px}
.form .two-col .fields{display:flex;gap:8px;flex-wrap:wrap}
.form .two-col .fields input{flex:1;min-width:150px}
.form .three-col{display:grid;grid-template-columns:180px 1fr;gap:10px;margin-bottom:10px}
.form .three-col .fields{display:flex;gap:8px;flex-wrap:wrap}
.form .three-col .fields input{flex:1;min-width:120px}
.form .description-row{display:grid;grid-template-columns:180px 1fr;gap:10px;margin-bottom:10px}
.form .description-row textarea{min-height:80px}
.badge{display:inline-block;padding:2px 6px;border-radius:10px;font-size:12px;background:#eee}
.files{margin-top:10px}
.file-item{display:flex;justify-content:space-between;border:1px solid #eee;border-radius:8px;padding:6px 8px;margin-bottom:6px;background:#fcfcfc}
.subgrid{margin-top:12px}
.subgrid h3{margin:10px 0 6px}
.subgrid .table td{font-size:14px}
.note{font-size:13px;color:#666}

/* 모바일: 라벨 컬럼이 180px 고정이라 좁은 화면에서 데이터 영역이 지나치게
   눌리므로, 라벨을 위로 올리고 데이터를 아래에 전체 폭으로 배치한다. */
@media (max-width:640px){
  .form .row,
  .form .address-row,
  .form .two-col,
  .form .three-col,
  .form .description-row{grid-template-columns:1fr;gap:4px}
}
