/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    width: 100%;
    height: 100vh;
}

@font-face {
    font-family: 'MyFont';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2412-1@1.0/Ownglyph_corncorn-Rg.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}
body {
    font-family:'MyFont', sans-serif;
    font-size: 16px; /* 기본 폰트 크기 */
    line-height: 1.5;
    color: #333;
    background-color: #f9f9f9;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
}
h2{
    font-size: 1rem;
}
.menu-title{
    font-size:1.8rem !important;
}
.menu-title1{
    font-size:1.2rem !important;
}
input[type="search"] {
    padding-right: 0.5em; /* X 버튼과 텍스트 간 여유 공간 */
}
.menu-title2{
    font-size:0.8rem !important;
    color: gray;
}
.navbar{
    max-width: 1000px;
    margin: auto;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}
header .search-table{
    font-family:'MyFont', sans-serif;
    max-width: 1000px;
    border: 1px solid black;
    background-color: white;
}
.footer-back-col{
    border: 1px solid black;
    border-radius: 5px;
}
/* 헤더 */
.header {
    font-family:'MyFont', sans-serif;
    position: fixed;
    top: 5px;  /* 화면 최상단에서 10px 떨어지게 함 */
    left: 5px; /* 좌측에서 10px 떨어지게 함 */
    width: calc(100% - 10px);

    color: white;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 1000;
}
.nav-item a{
    text-align: left;
}
/* 푸터 */
.footer {
    font-family:'MyFont', sans-serif;
    position: fixed;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 10px);
    color: white;
    text-align: center;
    font-size: 1rem;
    z-index: 999;
    max-width: 1000px;
    overflow-x: auto;
}
.btn-delete{
    border: 1px solid black;
    border-radius: 5px;
    padding: 5px 10px 5px 10px;
    background-color: black;
    color: red;

}
.btn-sales-reg{
    width: 30px;
    height: 30px;
    border-radius: 5px;
    background-color: black;
    color: white;
}
.input-price{
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    width: 20%;
    border: 1px solid darkgray;
    font-weight: bold;
}
.btn-deposit{
    border: 1px solid black;
    border-radius: 5px;
    padding: 5px 10px 5px 10px;
    background-color: black;
    color: white;
}
.body {
    font-family:'MyFont', sans-serif;
    overflow-y: auto;
    position: fixed;
    bottom: 0;
    top: 5px;  /* 화면 최상단에서 10px 떨어지게 함 */
    left: 50%;
    transform: translateX(-50%); /* 좌측에서 10px 떨어지게 함 */
    width: calc(100% - 10px);
    z-index: 999;
    border-radius: 5px;
    border: 1px solid black;
    max-width: 1000px;
}
.hide{
    display: none   !important;
}

.hide-con{
    display: none;
}

.sales-info1{
    width: 100%;
}

.btn-dark{
    padding: 5px;
    border: 0;
}
.menu{
    width: 100%;
    text-align: center;
    max-width: 900px;
    margin: auto;
}

menu{
    background-color: white;
    border-radius: 0 0 5px 5px;
    margin-bottom: 5px;
}

.detail-table {
    width: 100%;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    display: block;
    border-radius: 8px 8px 8px 8px;
    max-width: 900px;
    margin: auto;
}
.detail-table .sales-icon{
    padding: 3px;
    margin-left: 5px;
    margin-bottom: 5px;
    background-color: white;
}
#listContainer{
    max-height: 130px;
    overflow-y: auto;
}

/*검색*/
.search-table {
    width: 100%;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    display: block;
    border-radius:  8px 8px 8px 8px;
    margin:auto;
}

.search-table.hidden {
    display: none;
}
.company-list button{
    border: 1px solid white;
    border-radius: 6px;
    padding: 5px 10px 5px 10px;
    margin-right: 10px;
    margin-bottom:  10px;

}
::-webkit-scrollbar {
    display: none;
}
.company-list{
    overflow-x: auto;
    white-space: nowrap;

}
.search-table .col-md-auto:last-child {
    justify-self: normal;
}
.grid { }
.grid .row { display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2px;
    width: 100%; /* 전체 화면의 90% 너비 */
    max-width: 1200px; /* 최대 너비 */
    padding: 2px;
    border-radius: 8px 8px 8px 8px;
    align-items: center;
    margin:auto;
}
.grid .row5 { display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2px;
    width: 100%; /* 전체 화면의 90% 너비 */
    max-width: 1200px; /* 최대 너비 */
    padding: 2px;
    border-radius: 8px 8px 8px 8px;
    align-items: center;
    margin:auto;
}
.grid .row1 { display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1fr, 1fr));
    gap: 2px;
    padding: 2px;
    width: 100%; /* 전체 화면의 90% 너비 */
    max-width: 1200px; /* 최대 너비 */
    border-radius: 0 0 8px 8px;
    align-items: center;
    margin:auto;
}
.grid .row2{ display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 2px;
    width: 100%; /* 전체 화면의 90% 너비 */
    max-width: 1200px; /* 최대 너비 */
    align-items: center;
    margin:auto;

}
.grid .row3{ display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2px;
    width: 100%; /* 전체 화면의 90% 너비 */
    max-width: 1200px; /* 최대 너비 */
    align-items: center;
    margin:auto;
    padding: 2px;

}
.grid .row44{ display: grid;
    grid-template-columns: 0.7fr 1fr 0.4fr 1fr;
    gap: 2px;
    padding: 2px;
    width: 100%; /* 전체 화면의 90% 너비 */
    max-width: 1200px; /* 최대 너비 */
    align-items: center;
    margin:auto;

}
.grid .row444{ display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2px;
    padding: 2px;
    width: 100%; /* 전체 화면의 90% 너비 */
    max-width: 1200px; /* 최대 너비 */
    align-items: center;
    margin:auto;

}


.grid .row4{ display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
    width: 100%; /* 전체 화면의 90% 너비 */
    max-width: 1200px; /* 최대 너비 */
    align-items: center;
    margin:auto;

}

.status-active {
    color: blue;
}
.status-stop {
    color: black;
}
.btn-dark{
    border-radius: 5px;
}
.grid .bottom-border{
    margin-bottom: 1px;
    padding-bottom: 1px;
}
.col-md-auto{
    width: 90%;
    text-align: center;
}
.col-md-auto label{
    color:black;
}
.grid-item{
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    width: 100%;
    border: 1px solid darkgray;
}
input[type="date"].grid-item,
input[type="time"].grid-item,
input[type="search"].grid-item,
input[type="search"].grid-item-w-70,
input[type="search"].grid-item-w-50,
input[type="search"].grid-item-w-80,
input[type="search"].grid-item-w-85{
    -webkit-appearance: none; /* 크롬/사파리 검색 전용 스타일 제거 */
    appearance: none;
    background-color: #fff !important;
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    border: 1px solid darkgray;
}
select.grid-item,
select.grid-item-w-30,
select.grid-item-w-50{
    -webkit-appearance: none; /* 크롬/사파리 검색 전용 스타일 제거 */
    appearance: none;
    background-color: #fff !important;
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 5px;
    border-radius: 5px;
    border: 1px solid darkgray;
}
.grid-item-title{
    text-align: left;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    width: 100%;
    margin: 0;
    font-weight: bold;
}
.grid-item-title b{
    color: blue;
}
.grid-item-w-80{
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    border: 1px solid darkgray;
    width: 77%;
}
.grid-item-w-85{
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    border: 1px solid darkgray;
    width: 85%;
}
.grid-item-w-70{
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    border: 1px solid darkgray;
    width: 67%;
}
.grid-item-w-30{
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    border: 1px solid darkgray;
    width: 30%;
}
.grid-item-important{
    font-weight: bold;
}
.grid-item-w-50{
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
    border: 1px solid darkgray;
    width: 48%;
}
.money{
    text-align: right;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid black;
    width: 50%;
}
.text-red{
    color:red  !important;
}
.text-blue{
    color:blue  !important;
}
.text-gold{
    color:gold  !important;
}
/*검색*/

/*하단*/
.sales-info {
    width: 100%;
    margin: auto;
    border-collapse: collapse;
    color: #fff;
    overflow: hidden;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    table-layout: fixed;
    max-width: 900px;
    border: 1px solid black;
}

.sales-info th, .sales-info td {
    padding: 5px 5px;
    text-align: left;
}

.sales-info th {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 4px;
    color:#6d6e6e;
    font-family: 'MyFont', sans-serif; /* 세련된 폰트 */
}

.sales-info td {
    text-align: right;
    color:black;
    font-weight: bold;
}

.sales-info tr:nth-child(even) {
    background-color: #f3f3f3;
}

.sales-info tr:nth-child(odd) {
    background-color: #ffffff;
}

.sales-info tr:hover {
    background-color: yellow;
}


/*하단*/
/*리스트*/
.list-con {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 900px;
    margin: auto;
}
.list-con-w-90 {
    display: block;
    flex-direction: column;
    gap: 10px;
    width: 95%;
    margin: auto;
}
.sales-list-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid black; /* 테두리: 투명한 흰색 */
    color:white;
    table-layout: auto;
}

.sales-list-table th, .sales-list-table td {
    padding: 5px;
    text-align: left;
}

.sales-list-table th {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6d6e6e;
}
.sign{
    width: 50px;
    height: 50px;
}
.notice-img{
    width: 100%;
}
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8); /* 반투명 배경 */
    display: none;
    flex-direction: column; /* 세로 정렬 */
    justify-content: center;
    align-items: center;
    z-index: 1050;
    color: white; /* 텍스트 색상 */
    font-size: 1.5rem; /* 글씨 크기 */
}
.sales-list-table td {
    color: black;
    font-weight: bold;
}

.sales-list-table tr:last-child td {
    border-bottom: none;
}
.sales-list-table tr:last-child th{
    border-bottom: none;
}
.sales-list-table .text-right {
    text-align: right;
}

.sales-list-table .text-center {
    text-align: center;
}

.sales-list-table tr:hover {
    background-color: red; /* 호버 시 더 밝은 회색 */
}


.sales-list-table tr:nth-child(even) {
    background-color: #f3f3f3;
}

.sales-list-table tr:nth-child(odd) {
    background-color: #ffffff;
}

.sales-list-table .title{
    background-color: white !important;
    border: 1px solid black;
}
.sales-list-table .title td{
    color:black ;
}

.sales-list-table .title-bar{
    background-color: black !important;
    border: 1px solid black;
}
.sales-list-table .title-bar th{
    color:white ;
    font-weight: bold;
}

.credit-meth {
    background-color: black; /* 파란색 */
    color: #ea735e !important;
    font-weight: bold;
    padding: 4px 10px;
    text-align: center;
    border-radius: 4px;
    display: inline-block;
    margin: auto;
    border: 1px solid black;
}

.card-meth {
    background-color: black; /* 초록색 */
    color: antiquewhite !important;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    text-align: center;
    display: inline-block;
    margin: auto;
    border: 1px solid black;
}

.cash-meth {
    background-color: black; /* 주황색 */
    color: yellow !important;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    text-align: center;
    display: inline-block;
    margin: auto;
    border: 1px solid black;
}

.hide-product-list {
    display: none;
}
.sales-list-table h2{
    color:black;
}
.sales-list-table.show-products + .hide-product-list {
    display: table;
}
.navbar-toggler-icon {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='white' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.date-btn{
    width: 60px !important;
    color: white;
}
.search-btn
{
    width: 60px;
    background: black;
    border: 1px solid white;
    height: 35px;
}
.search-btn-w45
{
    width: 50px;
    background: black;
    border: 1px solid white;
    height: 30px;
}
.search-btn i {
    color: white;
}
.bulk-list{
    width: 97vw !important;
}
footer .menu button{
    border: 1px solid black;
    border-radius: 5px;
    padding: 5px 10px 5px 10px ;
    background-color: black;
    color: white;
    width: max-content;
}
.chart-container {
    position: relative;
    width: 100%;     /* 화면 가로 꽉 채우기 */
    height: 260px;   /* 차트 높이는 CSS로 고정 */
}
/*리스트*/

/* 반응형 스타일 */
@media (max-width: 600px) {
    table td, table th {
        font-size: 1rem;  /* 작은 글씨 */
        padding: 2px;
    }
    .search-table {
        font-size: 0.8rem;  /* 작은 글씨 */
        padding: 2px;
    }
    .detail-table {
        font-size: 1rem;  /* 작은 글씨 */
        padding: 2px;
    }
    .list-trade td, .list-trade th, .list-trade-explain td, .list-trade-explain th, .list-trade-explain textarea, .body p{
        font-size: 1rem;
    }
    body {
        font-size: 1rem; /* 작은 화면 기본 폰트 크기 */
    }

    .header {
        font-size: 1rem; /* 헤더와 푸터 크기 축소 */
    }
    .footer {
        font-size: 0.8rem; /* 헤더와 푸터 크기 축소 */
    }
    .footer .bottom-info th, td{
        font-size: 0.9rem !important; /* 헤더와 푸터 크기 축소 */
    }
    h2{
        font-size: 1.1rem;
    }
    .grid-item-title{
        font-size: 1.1rem;
    }
    .menu-title{
        font-size:1.2rem !important;
    }
    .bulk-list{
        width: max-content !important;
    }
    .date-btn {
        width: 45px !important;
    }
    .chart-container {
        height: 340px;   /* 세로를 더 키워서 크게 보이게 */
    }
    .search-btn {
        width: 54px;
    }
}

/* 📲 중간 크기 화면 (태블릿) */
@media (min-width: 601px) and (max-width: 1024px) {
    table td, table th {
        font-size: 1.1rem;  /* 중간 글씨 */
        padding: 8px;
    }
    .search-table {
        font-size: 1.1rem;  /* 작은 글씨 */
        padding: 8px;
    }
    .detail-table {
        font-size: 1.1rem;  /* 작은 글씨 */
        padding: 8px;
    }
    .sales-info th, .sales-info td {
        padding: 5px;
    }
    body {
        font-size: 1.1rem; /* 모바일 기본 폰트 크기 */
    }

    .header {
        font-size: 1.1rem; /* 헤더 폰트 크기 축소 */
    }

    .footer {
        font-size: 1.1rem; /* 푸터 폰트 크기 축소 */
    }
    h2{
        font-size: 1.3rem;
    }
    .grid-item-title{
        font-size: 1.3rem;
    }
    #listContainer {
        max-height: 200px;
    }
    .credit-meth{
        padding: 5px 10px;
    }
    .card-meth{
        padding: 5px 10px;
    }
    .cash-meth{
        padding: 5px 10px;
    }
    .bulk-list th{
        font-size: 1.0rem !important;
    }
    .bulk-list td{
        font-size: 1.0rem !important;
    }
    .grid .row {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .grid .row3 {
        grid-template-columns: repeat(auto-fit, minmax(1fr, 1fr));
    }
}

/* 🖥️ 큰 화면 (데스크탑) */
@media (min-width: 1025px) {
    table td, table th {
        font-size: 1.4rem;  /* 기본 글씨 */
    }
    .search-table {
        font-size: 1.4rem;  /* 작은 글씨 */
    }
    .detail-table {
        font-size: 1.4rem;  /* 작은 글씨 */
    }
    .grid-item-title{
        font-size: 1.5rem;
    }
    h2{
        font-size: 1.6rem;
    }
    #listContainer {
        max-height: 200px;
    }
    .credit-meth{
        padding: 6px 10px;
    }
    .card-meth{
        padding: 6px 10px;
    }
    .cash-meth{
        padding: 6px 10px;
    }
    .bulk-list th{
        font-size: 1.4rem !important;
    }
    .bulk-list td{
        font-size: 1.4rem !important;
    }
    .grid .row {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .grid .row3 {
        grid-template-columns: repeat(auto-fit, minmax(1fr, 1fr));
    }

}
:root{
    --nb-bg: #101828;      /* 배경 */
    --nb-fg: #ffffff;      /* 글자 */
    --nb-link: #c7d2fe;    /* 링크 */
    --nb-height: 44px;     /* 높이 */
    --nb-z: 9999;          /* z-index */
}
:root{
    --bnm-z: 10000;
    --bnm-backdrop: rgba(0,0,0,.5);
    --bnm-bg: #fff;
    --bnm-fg: #000;
    --bnm-accent: #3b82f6;
    --bnm-radius: 14px;
    --bnm-shadow: 0 20px 60px rgba(0,0,0,.25);
}
#notice-bar{
    position: sticky; top: 0; left: 0; right: 0; z-index: var(--nb-z);
    background: var(--nb-bg); color: var(--nb-fg);
    min-height: var(--nb-height); box-sizing: border-box;
}
.notice-wrap{
    max-width: 1200px; margin: 0 auto; padding: 8px 16px;
    display: flex; align-items: center; gap: 12px;
}
.notice-text{
    flex: 1; font-size: 14px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notice-link{ color: var(--nb-link); text-decoration: underline; margin-left: 8px; }
.notice-link:focus, .notice-close:focus{ outline: 2px solid #94a3b8; outline-offset: 2px; border-radius: 6px; }
.notice-close{
    background: transparent; border: 0; color: var(--nb-fg);
    font-size: 20px; line-height: 1; width: 32px; height: 32px; cursor: pointer;
}
/* 작은 화면에서 두 줄 허용 */
@media (max-width: 640px){
    .notice-text{ white-space: normal; }
}

#notice-modal{ position: fixed; inset: 0; z-index: var(--bnm-z); }
.notice-backdrop{ position:absolute; inset:0; background: var(--bnm-backdrop); }
.notice-dialog{
    position: relative; margin: 0 auto;
    top: 50%; transform: translateY(-50%);
    width: min(560px, calc(100vw - 32px));
    background: var(--bnm-bg); color: var(--bnm-fg);
    border-radius: var(--bnm-radius); box-shadow: var(--bnm-shadow);
    padding: 20px 20px 16px;
    display: flex; flex-direction: column; gap: 14px;
}
.notice-x{
    position:absolute; top:10px; right:10px; width:36px; height:36px;
    border:0; background:transparent; font-size:22px; cursor:pointer; line-height:1;
    border-radius: 10px;
}
.notice-x:focus{ outline: 2px solid #94a3b8; }
.notice-body{ padding: 8px 6px; }
.notice-body h2{ margin: 0 0 8px; font-size: 18px; }
.notice-message{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 10;    /* 표시 줄 수 */
    overflow: hidden;
    max-height: 16em;        /* 줄높이(line-height:1.6 기준 2줄=3.2em) */
    line-height: 1.6;
}
.notice-link{ color: var(--bnm-accent); text-decoration: underline; }
.notice-actions{ display:flex; gap:10px; justify-content: flex-end; padding-top: 4px; }

.btn-primary{
    background: var(--bnm-accent); color: #fff; border:0; padding:10px 14px;
    border-radius: 10px; cursor:pointer; font-weight:600;
}
.btn-ghost{
    background: transparent; color: #374151; border:1px solid #e5e7eb; padding:10px 14px;
    border-radius: 10px; cursor:pointer;
}
.btn-primary:focus, .btn-ghost:focus{ outline: 2px solid #94a3b8; }

/* 작은 화면 */
@media (max-width: 420px){
    .notice-dialog{ padding: 16px 16px 12px; }
    .notice-actions{ flex-direction: column-reverse; }
    .btn-primary, .btn-ghost{ width: 100%; }
}

/* 모션 최소화 */
@media (prefers-reduced-motion: reduce){
    .notice-dialog{ transition: none; }
}

/* 모달 열릴 때 스크롤 잠금 */
body.notice-lock{ overflow: hidden; }
#notice-value{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;    /* 표시 줄 수 */
    overflow: hidden;
    max-height: 1.6em;        /* 줄높이(line-height:1.6 기준 2줄=3.2em) */
    line-height: 1.6;
}


.recent-wrap { position: relative; display: block; }
.recent-dropdown {
    position: absolute; left: 0; right: 0; z-index: 9999;
    max-height: 240px; overflow-y: auto;
    border: 1px solid #ddd; background: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.08);
    border-radius: 6px; margin-top: 4px; padding: 4px 0;
}
.recent-item {
    padding: 8px 12px; cursor: pointer; display: flex; align-items: center; justify-content: space-between;color: black;
}
.recent-item:hover, .recent-item.active { background: #f5f7fa; }
.recent-item .text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.recent-item .del { color: #999; margin-left: 8px; cursor: pointer; }
.recent-header {
    padding: 6px 12px; font-size: 12px; color: #666; display: flex; justify-content: space-between; border-bottom: 1px solid #eee;
}
.recent-clear { color: #666; cursor: pointer; }
