/* 현선 ERP — Django 관리자/로그인 민트 테마 (erp.css 와 같은 팔레트) */
:root, html[data-theme="dark"], html[data-theme="light"] {
  --primary: #2FB07F; --secondary: #E6F7EF; --accent: #2FB07F;
  --primary-fg: #fff;
  --body-fg: #1F3D33; --body-bg: #E6F7EF;
  --body-quiet-color: #6B8A7E; --body-loud-color: #12352B;
  --header-color: #fff; --header-branding-color: #fff; --header-bg: #2FB07F; --header-link-color: #fff;
  --breadcrumbs-fg: #4B6A5F; --breadcrumbs-link-fg: #1F7A58; --breadcrumbs-bg: transparent;
  --link-fg: #1F7A58; --link-hover-color: #249A6E; --link-selected-fg: #1F7A58;
  --hairline-color: #DCEBE4; --border-color: #C3D9CF;
  --error-fg: #C0452F;
  --message-success-bg: #DDF3E8; --message-warning-bg: #FCEFD3; --message-error-bg: #F8DFD8;
  --darkest-bg: #12352B; --darker-bg: #2FB07F; --selected-bg: #F1FAF6; --selected-row: #FCEFD3;
  --button-fg: #fff; --button-bg: #2FB07F; --button-hover-bg: #249A6E;
  --default-button-bg: #249A6E; --default-button-hover-bg: #1F7A58;
  --close-button-bg: #6B8A7E; --close-button-hover-bg: #4F6D61;
  --delete-button-bg: #E5604D; --delete-button-hover-bg: #C0452F;
  --object-tools-fg: #fff; --object-tools-bg: #6B8A7E; --object-tools-hover-bg: #4F6D61;
  color-scheme: light;
}
body, input, select, textarea, button { font-family: "Pretendard", -apple-system, "Malgun Gothic", sans-serif; }

/* 헤더 */
#header { padding: 14px 28px; border-radius: 0 0 22px 22px; box-shadow: 0 2px 10px rgba(47, 176, 127, .18); }
#site-name a { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: 0; }
#site-name .mark { width: 32px; height: 32px; border-radius: 10px; background: #fff; color: #2FB07F; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
#user-tools { font-size: 13px; }
#user-tools a { border-bottom: 0; opacity: .95; }
#user-tools a:hover { opacity: 1; text-decoration: underline; }
div.breadcrumbs { padding: 12px 28px; font-size: 13px; }

/* 본문 카드 */
#content { padding: 22px 28px; }
.module, #changelist .paginator, #changelist-filter, .results, fieldset.module, .inline-group {
  border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(47, 176, 127, .08);
}
.module { background: #fff; border: 0; }
.module h2, .module caption, .inline-group h2 { background: #F1FAF6; color: #12352B; font-weight: 600; font-size: 14px; padding: 12px 16px; text-transform: none; }
.module h2 a, .module caption a { color: #1F7A58; }
#changelist .results { background: #fff; }
#result_list thead th, table thead th { background: #F1FAF6; color: #4B6A5F; border-bottom: 1px solid #DCEBE4; font-weight: 600; }
thead th a:link, thead th a:visited { color: #4B6A5F; }
tr:nth-child(even), tr:nth-child(odd) { background: #fff; }
tbody tr:hover td, tbody tr:hover th { background: #F4FBF8; }
td, th { border-bottom: 1px solid #EDF5F1; }
#changelist-filter { background: #fff; border: 0; }
#changelist-filter h2 { background: #F1FAF6; }
#changelist-filter h3 { color: #4B6A5F; }
#changelist-filter li.selected a { color: #1F7A58; font-weight: 600; }
.paginator { background: #fff; border: 0; padding: 12px 16px; }
#toolbar { background: #fff; border: 0; border-radius: 16px; padding: 12px 16px; box-shadow: 0 2px 10px rgba(47, 176, 127, .08); }
.actions { background: #F1FAF6; border-radius: 12px; }

/* 입력 / 버튼 */
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], input[type=tel],
input[type=date], input[type=time], textarea, select, .vTextField {
  border: 1px solid #C3D9CF; border-radius: 10px; padding: 7px 10px; background: #fff; color: #1F3D33;
}
input:focus, textarea:focus, select:focus { border-color: #2FB07F; outline: 0; box-shadow: 0 0 0 3px rgba(47, 176, 127, .18); }
.button, input[type=submit], input[type=button], .submit-row input, a.button {
  border-radius: 12px; padding: 9px 16px; font-weight: 600; border: 0;
}
.button.default, input[type=submit].default, .submit-row input.default { background: #2FB07F; }
.button.default:hover, input[type=submit].default:hover { background: #249A6E; }
.submit-row { background: #fff; border: 0; border-radius: 16px; box-shadow: 0 2px 10px rgba(47, 176, 127, .08); }
.object-tools a { border-radius: 99px; padding: 6px 16px; }
.object-tools a:link, .object-tools a:visited { background: #6B8A7E; }
.object-tools a.addlink { background: #2FB07F; }
fieldset { border-radius: 16px; }
ul.messagelist li { border-radius: 12px; margin: 0 0 8px; }

/* 대시보드(앱 목록) */
.dashboard #content { width: auto; }
#content-related { border-radius: 16px; background: #fff; }
#content-related .module { box-shadow: none; }
.app-list .module, .dashboard .module { margin-bottom: 18px; }
.dashboard .module table th a, .dashboard .module table td a { font-weight: 500; }

/* 로그인 */
body.login { background: #E6F7EF; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
body.login #container { width: 400px; max-width: 92vw; height: auto; min-height: 0; margin: 0 auto; border: 0; border-radius: 28px; background: #fff; box-shadow: 0 10px 40px rgba(47, 176, 127, .18); overflow: hidden; padding-bottom: 8px; }
body.login #header { border-radius: 0; padding: 30px 20px 22px; justify-content: center; text-align: center; box-shadow: none; }
body.login #site-name { margin: 0; }
body.login #site-name a { font-size: 22px; }
body.login #site-name .mark { width: 40px; height: 40px; font-size: 20px; border-radius: 12px; }
body.login #content { padding: 24px 32px 12px; }
body.login .form-row { padding: 6px 0; }
body.login .form-row label { display: block; margin-bottom: 4px; font-size: 13px; color: #4B6A5F; font-weight: 500; }
body.login .form-row input { width: 100%; box-sizing: border-box; padding: 11px 12px; }
body.login .submit-row { box-shadow: none; padding: 14px 0 4px; }
body.login .submit-row input { width: 100%; padding: 12px; font-size: 15px; background: #2FB07F; }
body.login .submit-row input:hover { background: #249A6E; }
body.login .errornote { border-radius: 12px; }
body.login .password-reset-link a { color: #6B8A7E; font-size: 12px; }

/* 앱 목록 제목(링크) 가독성 */
.module caption a.section, .module caption a.section:link, .module caption a.section:visited { color: #12352B; }
.module caption { text-align: left; }

/* ERP로 돌아가기 + 항목 아이콘 */
.erp-back { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 7px 14px; border-radius: 99px; background: #fff; color: #1F7A58 !important; font-weight: 600; font-size: 13px; text-decoration: none; border: 0 !important; }
.erp-back:hover { background: #E6F7EF; text-decoration: none !important; }
#header { align-items: center; }
#user-tools { margin-left: 16px; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.erp-ico { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 9px; background: #E6F7EF; color: #2FB07F; font-size: 16px; vertical-align: middle; }
.module caption a.section .erp-ico { background: #2FB07F; color: #fff; }
#nav-sidebar .erp-ico { width: 22px; height: 22px; font-size: 13px; margin-right: 8px; border-radius: 7px; }

/* 헤더 로고 글자색 (링크 기본색 덮어쓰기) */
#site-name a, #site-name a:link, #site-name a:visited { color: #fff; text-decoration: none; }
#site-name a .mark { color: #2FB07F; }
