/* ============================================================
   신일케미칼 관리자 스타일
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

@font-face {
  font-family: 'GmarketSans';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
  font-weight: normal;
  unicode-range: U+0000-007F;
}
@font-face {
  font-family: 'GmarketSans';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
  font-weight: bold;
  unicode-range: U+0000-007F;
}
@font-face {
  font-family: 'GmarketSans';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansLight.woff') format('woff');
  font-weight: 300;
  unicode-range: U+0000-007F;
}

:root {
  --adm-primary: #1a3a6b;
  --adm-sidebar-w: 240px;
  --adm-border: #e0e0e0;
  --adm-bg: #f4f6fb;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'GmarketSans', 'Noto Sans KR', sans-serif; background: var(--adm-bg); color: #333; font-size: 14px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* 사이드바 */
.adm-sidebar {
  position: fixed; top:0; left:0;
  width: var(--adm-sidebar-w); height: 100vh;
  background: var(--adm-primary);
  overflow-y: auto;
  z-index: 100;
}
.adm-logo { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.adm-logo span { color: #fff; font-size: 16px; font-weight: bold; display: block; }
.adm-logo small { color: rgba(255,255,255,0.5); font-size: 11px; }
.adm-menu { padding: 10px 0; }
.adm-menu-group { padding: 16px 20px 6px; font-size: 11px; color: rgba(255,255,255,0.4); letter-spacing: 1px; text-transform: uppercase; }
.adm-menu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; color: rgba(255,255,255,0.75); font-size: 14px; transition: 0.2s;
}
.adm-menu li a:hover, .adm-menu li a.active { background: rgba(255,255,255,0.1); color: #fff; }
.adm-menu li a .ico { font-size: 16px; }

/* 메인 */
.adm-main { margin-left: var(--adm-sidebar-w); min-height: 100vh; }
.adm-topbar {
  height: 60px; background: #fff; border-bottom: 1px solid var(--adm-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.adm-topbar h2 { font-size: 18px; font-weight: 600; }
.adm-topbar-right { display: flex; align-items: center; gap: 12px; }
.adm-topbar-right a { font-size: 13px; color: #888; }
.adm-topbar-right a:hover { color: var(--adm-primary); }

/* 콘텐츠 */
.adm-content { padding: 30px; }

/* 카드 */
.adm-card {
  background: #fff; border-radius: 8px;
  border: 1px solid var(--adm-border); overflow: hidden; margin-bottom: 24px;
}
.adm-card-header { padding: 16px 20px; border-bottom: 1px solid var(--adm-border); display: flex; justify-content: space-between; align-items: center; }
.adm-card-header h3 { font-size: 16px; font-weight: 600; }
.adm-card-body { padding: 20px; }

/* 대시보드 통계 */
.adm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.adm-stat-card { background: #fff; border-radius: 8px; padding: 20px; border: 1px solid var(--adm-border); }
.adm-stat-card .label { font-size: 12px; color: #888; margin-bottom: 8px; }
.adm-stat-card .value { font-size: 28px; font-weight: bold; color: var(--adm-primary); }

/* 폼 */
.adm-form .form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.adm-form .form-group { flex: 1; min-width: 200px; }
.adm-form .form-group.full { flex: 0 0 100%; }
.adm-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.adm-form label .req { color: #e84c1e; margin-left: 3px; }
.adm-form input[type=text],
.adm-form input[type=date],
.adm-form input[type=datetime-local],
.adm-form input[type=number],
.adm-form input[type=password],
.adm-form select,
.adm-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--adm-border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  height: 40px;
}
.adm-form input:focus, .adm-form select:focus, .adm-form textarea:focus {
  outline: none; border-color: var(--adm-primary); box-shadow: 0 0 0 2px rgba(26,58,107,0.1);
}
.adm-form textarea { min-height: 300px; resize: vertical; }

/* 테이블 */
.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th { padding: 12px 10px; background: #f8f9fa; font-size: 13px; font-weight: 600; text-align: center; border-bottom: 1px solid var(--adm-border); }
.adm-table td { padding: 12px 10px; border-bottom: 1px solid #f0f0f0; font-size: 13px; text-align: center; vertical-align: middle; }
.adm-table td.al { text-align: left; }
.adm-table tr:hover td { background: #fafcff; }
.adm-table .no-data td { text-align: center; padding: 40px; color: #999; }

/* 버튼 */
.adm-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; border-radius: 4px; font-size: 13px; font-weight: 500; cursor: pointer; transition: 0.2s; border: none; }
.adm-btn-primary { background: var(--adm-primary); color: #fff; }
.adm-btn-primary:hover { background: #2e6dbd; }
.adm-btn-danger { background: #dc3545; color: #fff; }
.adm-btn-danger:hover { background: #bb2d3b; }
.adm-btn-outline { border: 1px solid var(--adm-border); background: #fff; color: #333; }
.adm-btn-outline:hover { background: #f5f5f5; }
.adm-btn-sm { padding: 5px 10px; font-size: 12px; }

/* 배지 */
.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-primary { background: #e8f0fb; color: var(--adm-primary); }
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-danger  { background: #fce4e4; color: #c62828; }

/* 페이지네이션 */
.adm-pager { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.adm-pager a { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--adm-border); border-radius: 4px; font-size: 13px; color: #555; }
.adm-pager a:hover, .adm-pager a.active { background: var(--adm-primary); border-color: var(--adm-primary); color: #fff; }

/* 알림 */
.adm-alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.adm-alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.adm-alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
