/* =====================================================================
   BIG POS 관리자웹 스타일

   기반은 Bootstrap 3.3.5 와 Font Awesome 4.6.3 이다(wwwroot/lib).
   매장이 쓰던 옛 관리자 사이트와 같은 틀이라, 같은 마크업을 쓰면 배치·크기·색이 그쪽과 같게 나온다.
   ⚠ 운영자 콘솔은 Bootstrap 5 다. 클래스 이름이 달라서 그쪽 마크업을 그대로 옮겨 오면 맨 모양이 된다.

   이 파일에는 그 위에 얹는 것만 둔다 — 셸(검은 상단과 왼쪽 메뉴), 표의 가운데 정렬과 숫자 색,
   확인 창, 로딩·빈 상태, 홈의 요약 카드.
   규칙은 docs/05-운영.md 「관리자웹 화면 규칙」에 있다.
   ===================================================================== */

body {
    background-color: white;
}

h1:focus {
    outline: none;
}

/* ===== 셸: 검은 띠 + 상단 바 + 왼쪽 메뉴 + 본문 ===== */

/* 맨 위 검은 띠. 옛 사이트의 배너 자리이고 지금은 비어 있다. 아래 상단 바와 본문의 위치가 이 높이에 맞춰져 있다 */
.top_banner {
    overflow: hidden;
    width: 100%;
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 5;
    background-color: black;
}

#wrapper {
    width: 100%;
}

.navbar {
    margin-bottom: 0;
    width: 100%;
    position: fixed;
    top: 80px;
    left: 0;
    overflow: scroll;
    max-height: calc(100% - 80px);
}

.navbar-default {
    background-color: black;
    border-color: black;
}

.navbar-default .navbar-brand,
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
    color: white;
}

/* 좁은 화면의 「메뉴」 버튼: 줄 세 개 + 글자 */
.navbar-toggle .toggle-bars {
    float: left;
    margin-top: 3px;
}

.navbar-toggle .toggle-text {
    float: right;
    margin-left: 1rem;
    color: white;
}

#page-wrapper {
    padding: 0 15px;
    min-height: 568px;
    background-color: #fff;
    margin-top: 150px;
    /* 폭이 넓은 표는 본문 안에서 옆으로 민다 */
    overflow: scroll;
}

.sidebar .sidebar-nav.navbar-collapse {
    padding-right: 0;
    padding-left: 0;
}

.sidebar ul li {
    border-bottom: 1px solid #e7e7e7;
}

.nav > li > a {
    color: white;
}

.sidebar ul li a.active {
    background-color: gray;
}

.sidebar li a:focus {
    background-color: gray;
}

.sidebar ul li a:hover {
    background-color: #c59595;
}

/* 묶음 제목은 주소가 없는 링크다. 누르면 접히고 펼쳐진다(app.js) */
.sidebar a.menu-group {
    cursor: pointer;
}

.sidebar .arrow {
    float: right;
    line-height: 1.42857;
}

.sidebar .fa.arrow:before {
    content: "\f104";
}

.sidebar .active > a > .fa.arrow:before {
    content: "\f107";
}

.sidebar .nav-second-level li {
    border-bottom: 0 !important;
}

.sidebar .nav-second-level li a,
.sidebar .nav-second-level li button {
    padding-left: 37px;
}

/* 로그아웃은 폼 전송이라 버튼이다. 메뉴의 링크와 같은 모양으로 맞춘다 */
.sidebar .nav-second-level li form {
    margin: 0;
}

.sidebar .nav-second-level li button {
    display: block;
    width: 100%;
    padding-top: 10px;
    padding-right: 15px;
    padding-bottom: 10px;
    border: 0;
    background: none;
    color: white;
    text-align: left;
}

.sidebar .nav-second-level li button:hover {
    background-color: #c59595;
}

.sidebar .nav-second-level li button:focus {
    background-color: gray;
    outline: 0;
}

@media (min-width: 768px) {
    .navbar {
        overflow: visible;
        max-height: none;
    }

    .sidebar {
        z-index: 1;
        position: absolute;
        width: 250px;
        margin-top: 51px;
        background: transparent;
        overflow: scroll;
        height: 100vh;
        padding-bottom: 131px;
    }

    .navbar-collapse {
        background: black;
    }

    #page-wrapper {
        position: inherit;
        margin: 150px 0 0 250px;
        padding: 0 30px;
        border-left: 1px solid #e7e7e7;
    }
}

@media only screen and (max-width: 600px) {
    .top_banner {
        height: 50px;
    }

    .navbar {
        top: 50px;
        max-height: calc(100% - 50px);
    }

    #page-wrapper {
        margin-top: 120px;
    }
}

/* ===== 화면 머리(Shared/PageHeader.razor) ===== */
.page-header {
    margin: 20px 0;
}

/* 제목 아래 한 줄(홈의 영업일 범위) */
.page-desc {
    color: #777;
    margin: -10px 0 20px;
}

/* ===== 버튼 ===== */
.btn {
    border-color: #CCC;
}

/* 색 클래스가 없는 버튼은 브라우저의 기본 버튼 색이다. 링크(<a>)로 만든 버튼도 그 색이 되게 한다 */
a.btn-face,
a.btn-face:hover,
a.btn-face:focus {
    background-color: ButtonFace;
    color: #333;
}

/* 제목 줄 오른쪽의 큰 버튼(서버 기간연장 신청의 [신청]). 옛 사이트와 같은 자리·크기다 */
.header-action {
    margin-top: 40px;
}

.btn-header {
    float: right;
    padding: 12px 24px;
}

/* 서버 기간연장 신청 직후 보여 주는 키 목록 */
.applied-keys li {
    font-size: 1.5em;
}

/* 가운데 좁은 상자의 마지막 버튼 아래를 조금 띄운다 */
.login-panel a.btn-block:last-child {
    margin-bottom: 5px;
}

/* ===== 표 ===== */
/* 기능 화면의 표는 제목 칸도 값 칸도 가운데다 */
.center-table {
    background-color: white;
}

.center-table > thead > tr > th,
.center-table > tbody > tr > th,
.center-table > tbody > tr > td {
    text-align: center;
}

/* 제목 칸 안의 건수 (0) */
.center-table > thead > tr > th > p {
    margin: 0 0 10px;
}

/* 긴 글(사유·내용)이 들어가는 칸 */
.center-table > tbody > tr > td.wrap {
    text-align: left;
    min-width: 12em;
}

.center-table > tbody > tr.total-row > td {
    font-weight: 700;
}

/* 취소된 거래 줄 */
.table > tbody > tr.row-reversed > td {
    color: #999;
}

/* 표로 짠 폼(라벨 칸 + 입력 칸) */
.form-table > tbody > tr > td {
    vertical-align: middle;
}

.form-table > tbody > tr > td:first-child {
    width: 25%;
}

.form-table .btn-lg {
    margin: 1rem;
    padding-left: 3rem;
    padding-right: 3rem;
}

.form-table .btn-lg .fa {
    margin-right: 1rem;
}

/* 페이지 이동. 화면을 새로 받지 않고 그 자리에서 바꾸므로 링크가 아니라 버튼이다. 모양은 링크일 때와 같게 한다 */
.pagination > li > button {
    position: relative;
    float: left;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #337ab7;
    background-color: #fff;
    border: 1px solid #ddd;
}

.pagination > li:first-child > button {
    margin-left: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.pagination > li:last-child > button {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.pagination > li > button:hover,
.pagination > li > button:focus {
    z-index: 3;
    color: #23527c;
    background-color: #eee;
    border-color: #ddd;
}

.pagination > .active > button,
.pagination > .active > button:hover,
.pagination > .active > button:focus {
    z-index: 2;
    color: #fff;
    cursor: default;
    background-color: #337ab7;
    border-color: #337ab7;
}

.pagination > .disabled > button,
.pagination > .disabled > button:hover,
.pagination > .disabled > button:focus {
    color: #777;
    cursor: not-allowed;
    background-color: #fff;
    border-color: #ddd;
}

.font-mono {
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}

/* 숫자 칸(홈의 최근 거래) */
.num {
    text-align: right;
}

/* ===== 적립/차감/서비스 — 이 도메인의 고정 색이다 ===== */
.pos { color: blue; }
.neg { color: red; }
.svc { color: green; }

/* ===== 가운데 좁은 상자(로그인·가입·내 정보·비밀번호 변경) ===== */
.login-panel {
    margin-top: 10%;
}

.auth-title {
    margin-top: 10%;
    text-align: center;
}

.auth-title h1 {
    color: black;
}

/* ===== 로딩·빈 상태(Shared/Loading.razor · Shared/EmptyState.razor) ===== */
.state-block {
    color: #777;
    text-align: center;
    padding: 25px 10px;
}

.state-block .state-title {
    color: #333;
    font-weight: 700;
    margin-bottom: 3px;
}

/* ===== 확인 창(Shared/ConfirmDialog.razor) — 모달 마크업을 JS 없이 상태로 띄운다 ===== */
.modal.modal-shown {
    display: block;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
}

/* ===== 홈: 요약 수치 카드 ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 14px 18px;
}

.stat-label {
    color: #777;
    font-size: 13px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
}

.home-section-title {
    font-size: 14px;
    color: #777;
    margin: 0 0 8px;
}

.panel-heading .panel-link {
    float: right;
}

/* 매장 정보: 이름 칸을 왼쪽으로 붙인다 */
.home-info dt {
    text-align: left;
}

@media (max-width: 420px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* 봇 차단용 숨은 칸(사람에게 안 보여야 한다) */
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ===== 약관 본문 ===== */
.terms h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 20px 0 10px;
}

.terms h2:first-child {
    margin-top: 0;
}

.terms h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 15px 0 5px;
}

/* ===== 앱 다운로드: 화면 전체를 한 칸 들이고, 제목 아래 내용을 또 한 칸 들여 쓴다 ===== */
.download-page,
.download-page .download-contents {
    margin: 20px;
}

.download-body h1 ~ *:not(h1) {
    margin-left: 1em;
}

.download-body h1 {
    margin-top: 2em;
}

.download-body h2 {
    margin-top: 1em;
}

/* ===== Blazor 기본 ===== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #5cb85c;
}

.invalid {
    outline: 1px solid #d9534f;
}

.validation-message {
    color: #d9534f;
}

.blazor-error-boundary {
    background: #d9534f;
    padding: 10px 15px;
    color: white;
}

.blazor-error-boundary::after {
    content: "처리 중 오류가 발생했습니다.";
}
