@charset "utf-8";
/* 
BM Food 현대적 통합 스타일시트
- 모바일 퍼스트 반응형 디자인
- 브랜드 아이덴티티 반영
- 최신 CSS3/Grid/Flexbox 활용
- 그누보드 호환성 유지
*/

/* ========================================
   브랜드 컬러 시스템 & CSS 변수
======================================== */
:root {
  /* Primary Brand Colors */
  --primary-green: #2E8B57;      /* 신선함 - 주요 브랜드 컬러 */
  --secondary-blue: #1E90FF;     /* 신뢰감 - 보조 브랜드 컬러 */
  --accent-orange: #FF8C00;      /* 활력 - 포인트 컬러 */
  
  /* Extended Color Palette */
  --green-light: #90EE90;        /* 연한 그린 - 성공 메시지 */
  --green-dark: #228B22;         /* 진한 그린 - 호버 효과 */
  --blue-light: #87CEEB;         /* 연한 블루 - 정보 표시 */
  --blue-dark: #4169E1;          /* 진한 블루 - 링크 */
  --orange-light: #FFB366;       /* 연한 오렌지 - 알림 */
  --orange-dark: #FF7F00;        /* 진한 오렌지 - 강조 */
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --gray-50: #F8F9FA;            /* 배경 */
  --gray-100: #E9ECEF;           /* 테두리 */
  --gray-200: #DEE2E6;           /* 구분선 */
  --gray-300: #CED4DA;           /* 비활성 */
  --gray-400: #6C757D;           /* 보조 텍스트 */
  --gray-500: #495057;           /* 일반 텍스트 */
  --gray-600: #343A40;           /* 진한 텍스트 */
  --gray-700: #212529;           /* 제목 */
  --black: #000000;
  
  /* Semantic Colors */
  --success: var(--green-light);
  --warning: var(--orange-light);
  --danger: #DC3545;
  --info: var(--blue-light);
  
  /* Typography */
  --font-family-primary: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  
  /* Font Sizes - Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.9rem + 1.75vw, 3rem);
  
  /* Spacing Scale */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Layout */
  --container-max-width: 1200px;
  --container-padding: var(--space-4);
  --header-height: 80px;
  --footer-height: auto;
}

/* ========================================
   CSS Reset & Base Styles (현대적)
======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-600);
  background-color: var(--gray-50);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* HTML5 Elements */
article, aside, details, figcaption, figure, 
footer, header, hgroup, main, menu, nav, section {
  display: block;
}

/* Typography Reset */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-700);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
  word-break: keep-all;
  word-wrap: break-word;
}

/* Lists */
ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: revert;
  padding-left: var(--space-6);
}

/* Links */
a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--green-dark);
  text-decoration: underline;
}

/* Form Elements */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
  border: none;
  background: transparent;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
}

input,
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background-color: var(--white);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgb(46 139 87 / 0.1);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

/* ========================================
   Layout Components (CSS Grid 기반)
======================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: var(--space-4);
}

/* ========================================
   Header & Navigation (모던 디자인)
======================================== */

/* 그누보드 호환 - #hd */
#hd {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

#hd_wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Logo */
#logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

#logo a {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--primary-green);
  text-decoration: none;
}

#logo a:hover {
  color: var(--green-dark);
  text-decoration: none;
}

/* Search */
#hd_sch {
  display: flex;
  align-items: center;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: var(--space-2);
  margin: 0 var(--space-4);
  transition: border-color var(--transition-fast);
}

#hd_sch:focus-within {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgb(46 139 87 / 0.1);
}

#hd_sch #sch_stx {
  border: none;
  background: transparent;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  flex: 1;
}

#hd_sch #sch_submit {
  background: var(--primary-green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

#hd_sch #sch_submit:hover {
  background: var(--green-dark);
}

/* Top Navigation Bar */
#tnb {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
}

#tnb li {
  margin: 0;
}

#tnb a {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-500);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

#tnb a:hover {
  background: var(--gray-100);
  color: var(--primary-green);
  text-decoration: none;
}

/* Main Navigation */
#gnb {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

#gnb_1dul {
  display: flex;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  list-style: none;
}

.gnb_1dli {
  position: relative;
  flex: 1;
}

.gnb_1da {
  display: block;
  padding: var(--space-4) var(--space-6);
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
  transition: all var(--transition-fast);
  border-bottom: 3px solid transparent;
}

.gnb_1da:hover,
.gnb_1dli_on .gnb_1da {
  color: var(--primary-green);
  border-bottom-color: var(--primary-green);
  text-decoration: none;
}

/* Dropdown Menu */
.gnb_2dul {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
  z-index: 100;
}

.gnb_1dli:hover .gnb_2dul,
.gnb_1dli_over .gnb_2dul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.gnb_2da {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
  transition: all var(--transition-fast);
}

.gnb_2da:hover {
  background: var(--gray-50);
  color: var(--primary-green);
  text-decoration: none;
}

/* Mobile Navigation Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: var(--text-xl);
  color: var(--gray-600);
  cursor: pointer;
  padding: var(--space-2);
}

/* ========================================
   Main Content Layout
======================================== */

/* Wrapper */
#wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  max-width: var(--container-max-width);
  margin: var(--space-8) auto;
  padding: 0 var(--container-padding);
  min-height: calc(100vh - var(--header-height) - 200px);
}

/* Container */
#container {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow);
}

#container_title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 3px solid var(--primary-green);
}

/* Aside */
#aside {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  height: fit-content;
}

/* Two Column Layout */
@media (min-width: 1024px) {
  #wrapper {
    grid-template-columns: 1fr 300px;
  }
}

/* ========================================
   Components (카드 기반 디자인)
======================================== */

/* Card Components */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--gray-100);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.card-body {
  margin-bottom: var(--space-4);
}

.card-footer {
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-100);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-blue) 100%);
  color: var(--white);
  padding: var(--space-20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="80" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: var(--text-lg);
  opacity: 0.9;
  margin-bottom: var(--space-8);
}

/* ========================================
   Tables (현대적 테이블 디자인)
======================================== */

/* 그누보드 호환 테이블 */
.tbl_wrap {
  overflow-x: auto;
  margin: var(--space-6) 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.tbl_wrap table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.tbl_wrap caption {
  padding: var(--space-4);
  font-weight: 700;
  text-align: left;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

/* Table Headers */
.tbl_head01 thead th,
.tbl_head02 thead th {
  padding: var(--space-4);
  background: var(--primary-green);
  color: var(--white);
  font-weight: 600;
  text-align: center;
  border: none;
  font-size: var(--text-sm);
}

.tbl_head01 thead th:first-child,
.tbl_head02 thead th:first-child {
  border-radius: var(--radius) 0 0 0;
}

.tbl_head01 thead th:last-child,
.tbl_head02 thead th:last-child {
  border-radius: 0 var(--radius) 0 0;
}

/* Table Body */
.tbl_head01 td,
.tbl_head02 td,
.tbl_head01 tbody th,
.tbl_head02 tbody th {
  padding: var(--space-4);
  border-bottom: 1px solid var(--gray-100);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.tbl_head01 tbody tr:hover,
.tbl_head02 tbody tr:hover {
  background: var(--gray-50);
}

/* Table Footer */
.tbl_head01 tfoot th,
.tbl_head01 tfoot td,
.tbl_head02 tfoot th,
.tbl_head02 tfoot td {
  padding: var(--space-4);
  background: var(--gray-100);
  border-top: 2px solid var(--gray-200);
  font-weight: 600;
  text-align: center;
}

/* Form Tables */
.tbl_frm01 {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: var(--space-6) 0;
}

.tbl_frm01 table {
  width: 100%;
}

.tbl_frm01 th {
  background: var(--gray-50);
  padding: var(--space-4);
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
  width: 150px;
  text-align: left;
}

.tbl_frm01 td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--gray-100);
}

.tbl_frm01 .frm_input,
.tbl_frm01 textarea {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: var(--space-3);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
}

.tbl_frm01 .frm_input:focus,
.tbl_frm01 textarea:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgb(46 139 87 / 0.1);
}

/* Required Fields */
.required {
  position: relative;
}

.required::after {
  content: '*';
  color: var(--danger);
  margin-left: var(--space-1);
  font-weight: bold;
}

/* Empty States */
.empty_table,
.empty_list {
  padding: var(--space-20) !important;
  text-align: center;
  color: var(--gray-400);
  font-size: var(--text-lg);
}

.empty_table::before,
.empty_list::before {
  content: '📁';
  display: block;
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

/* ========================================
   Buttons (현대적 버튼 시스템)
======================================== */

/* Base Button */
.btn,
.btn01,
.btn02,
.btn_b01,
.btn_b02,
.btn_admin,
.btn_submit,
.btn_cancel,
.btn_frmline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  min-height: 44px; /* Touch target */
}

/* Primary Button */
.btn_submit,
.btn02,
.btn_b02 {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

.btn_submit:hover,
.btn02:hover,
.btn_b02:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* Secondary Button */
.btn01,
.btn_b01,
.btn_cancel {
  background: var(--white);
  color: var(--gray-600);
  border-color: var(--gray-300);
}

.btn01:hover,
.btn_b01:hover,
.btn_cancel:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-700);
  text-decoration: none;
}

/* Admin Button */
.btn_admin {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.btn_admin:hover {
  background: #c82333;
  border-color: #c82333;
  text-decoration: none;
}

/* Outline Button */
.btn_frmline {
  background: transparent;
  color: var(--primary-green);
  border-color: var(--primary-green);
}

.btn_frmline:hover {
  background: var(--primary-green);
  color: var(--white);
  text-decoration: none;
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  min-height: 36px;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  min-height: 52px;
}

/* Button Groups */
.btn_confirm {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  margin: var(--space-8) 0;
}

/* ========================================
   Pagination (현대적 페이지네이션)
======================================== */

.pg_wrap {
  display: flex;
  justify-content: center;
  margin: var(--space-8) 0;
}

.pg {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.pg_page,
.pg_current,
.qa_page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pg_page,
.qa_page {
  background: var(--white);
  color: var(--gray-600);
  border: 2px solid var(--gray-200);
}

.pg_page:hover,
.qa_page:hover {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
  text-decoration: none;
}

.pg_current {
  background: var(--primary-green);
  color: var(--white);
  border: 2px solid var(--primary-green);
  font-weight: 700;
}

.pg_start,
.pg_prev,
.pg_end,
.pg_next {
  background: var(--gray-100);
  color: var(--gray-500);
  border: 2px solid var(--gray-200);
}

.pg_start:hover,
.pg_prev:hover,
.pg_end:hover,
.pg_next:hover {
  background: var(--gray-200);
  text-decoration: none;
}

/* ========================================
   Footer (모던 푸터)
======================================== */

#ft {
  background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-600) 100%);
  color: var(--white);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-20);
}

#ft_catch {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  text-align: center;
}

#ft_company {
  font-size: var(--text-sm);
  line-height: 1.8;
  opacity: 0.9;
}

#ft_company a {
  color: var(--accent-orange);
}

#ft_copy {
  background: var(--gray-700);
  padding: var(--space-4) 0;
  margin-top: var(--space-8);
  text-align: center;
  font-size: var(--text-xs);
  opacity: 0.8;
}

#ft_totop {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  background: var(--primary-green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-lg);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

#ft_totop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#ft_totop:hover {
  background: var(--green-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* ========================================
   Utility Classes
======================================== */

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Color Utilities */
.text-primary { color: var(--primary-green); }
.text-secondary { color: var(--secondary-blue); }
.text-accent { color: var(--accent-orange); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.bg-primary { background-color: var(--primary-green); }
.bg-secondary { background-color: var(--secondary-blue); }
.bg-accent { background-color: var(--accent-orange); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-4 { margin: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.ml-4 { margin-left: var(--space-4); }
.mr-4 { margin-right: var(--space-4); }

.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.pt-4 { padding-top: var(--space-4); }
.pb-4 { padding-bottom: var(--space-4); }
.pl-4 { padding-left: var(--space-4); }
.pr-4 { padding-right: var(--space-4); }

/* Border Utilities */
.border { border: 1px solid var(--gray-200); }
.border-primary { border-color: var(--primary-green); }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow Utilities */
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ========================================
   Mobile Responsive (모바일 퍼스트)
======================================== */

@media (max-width: 768px) {
  /* Typography */
  :root {
    --container-padding: var(--space-4);
  }
  
  /* Header */
  #hd_wrapper {
    padding: 0 var(--space-4);
  }
  
  #hd_sch {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  #gnb_1dul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }
  
  #gnb_1dul.active {
    display: flex;
  }
  
  .gnb_1da {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
  }
  
  /* Layout */
  #wrapper {
    grid-template-columns: 1fr;
    margin: var(--space-4) auto;
  }
  
  #container {
    padding: var(--space-4);
  }
  
  /* Tables */
  .tbl_wrap {
    font-size: var(--text-sm);
  }
  
  .tbl_frm01 th {
    width: 100px;
    font-size: var(--text-sm);
  }
  
  /* Buttons */
  .btn_confirm {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .btn,
  .btn01,
  .btn02,
  .btn_b01,
  .btn_b02,
  .btn_admin,
  .btn_submit,
  .btn_cancel,
  .btn_frmline {
    width: 100%;
    justify-content: center;
  }
  
  /* Pagination */
  .pg {
    flex-wrap: wrap;
    gap: var(--space-1);
  }
  
  .pg_page,
  .pg_current,
  .qa_page {
    min-width: 36px;
    height: 36px;
    font-size: var(--text-xs);
  }
}

@media (max-width: 480px) {
  #container_title {
    font-size: var(--text-xl);
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .card {
    padding: var(--space-4);
  }
}

/* ========================================
   Accessibility & Focus States
======================================== */

/* Focus Styles */
*:focus {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only,
.sound_only,
.msg_sound_only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip Links */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-green);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: 9999;
}

.skip-link:focus {
  top: 6px;
}

/* ========================================
   Print Styles
======================================== */

@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
  
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  
  .no-print,
  #ft_totop,
  nav,
  .pagination {
    display: none !important;
  }
  
  @page {
    margin: 0.5in;
  }
  
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2,
  h3 {
    page-break-after: avoid;
  }
}

/* ========================================
   Animation & Transitions
======================================== */

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Slide In Animation */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Hover Animations */
.hover-scale {
  transition: transform var(--transition-normal);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-shadow {
  transition: box-shadow var(--transition-normal);
}

.hover-shadow:hover {
  box-shadow: var(--shadow-xl);
}

/* ========================================
   Component Specific Styles
======================================== */

/* Search Results Highlighting */
.sch_word {
  background: var(--accent-orange);
  color: var(--white);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* Comment Count */
.cnt_cmt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--accent-orange);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-left: var(--space-2);
}

/* Status Indicators */
.txt_active { color: var(--success); font-weight: 600; }
.txt_done { color: var(--danger); font-weight: 600; }
.txt_expired { color: var(--gray-400); }
.txt_rdy { color: var(--warning); font-weight: 600; }

/* Loading States */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-radius: 50%;
  border-top-color: var(--primary-green);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   Dark Mode Support (Future Enhancement)
======================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --white: #1a1a1a;
    --gray-50: #2d2d2d;
    --gray-100: #3d3d3d;
    --gray-200: #4d4d4d;
    --gray-300: #6d6d6d;
    --gray-400: #8d8d8d;
    --gray-500: #a0a0a0;
    --gray-600: #c0c0c0;
    --gray-700: #e0e0e0;
    --black: #ffffff;
  }
}

/* ========================================
   Browser Specific Fixes
======================================== */

/* Safari */
@supports (-webkit-appearance: none) {
  input[type="search"] {
    -webkit-appearance: none;
  }
}

/* Firefox */
@-moz-document url-prefix() {
  select {
    text-indent: 0.01px;
    text-overflow: '';
  }
}

/* Internet Explorer 11 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .grid {
    display: -ms-grid;
  }
}

/* ========================================
   High Contrast Mode
======================================== */

@media (prefers-contrast: high) {
  :root {
    --primary-green: #006400;
    --secondary-blue: #0000CD;
    --accent-orange: #FF4500;
  }
  
  .card,
  .btn,
  input,
  textarea,
  select {
    border-width: 3px;
  }
}

/* ========================================
   Reduced Motion
======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   Custom Scrollbar
======================================== */

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-green);
  border-radius: var(--radius);
  border: 2px solid var(--gray-100);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-dark);
}

/* Firefox Scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-green) var(--gray-100);
}

/* ========================================
   End of BM Food Modern CSS
======================================== */