/* sales.css - Invisible POS 매출 내역 조회 디자인 요소 */
body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
    color: #333;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
}

h1 {
    margin: 0;
    font-size: 20px;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.login-box {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 350px;
    text-align: center;
    border-top: 5px solid #ff5722;
}

.login-box h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 22px;
}

.login-desc {
    font-size: 12px;
    color: #888;
    margin-bottom: 25px;
}

.form-group {
    text-align: left;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
}

.form-group input:focus {
    border-color: #ff5722;
    outline: none;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card h2 {
    margin-top: 0;
    font-size: 18px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-box {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.summary-title {
    font-size: 14px;
    color: #e65100;
    font-weight: bold;
    margin-bottom: 5px;
}

.summary-amount {
    font-size: 32px;
    font-weight: bold;
    color: #ff5722;
}

.summary-count {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    color: #555;
    font-weight: bold;
}

.date-control {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    background: #f9f9f9;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.date-control input[type="date"] {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    background: #ff5722;
    color: white;
    transition: 0.2s;
    font-size: 14px;
    width: 100%;
}

.btn-small {
    width: auto;
    padding: 8px 12px;
    font-size: 13px;
}

.btn-outline {
    background: white;
    color: #555;
    border: 1px solid #ddd;
}

.btn:hover {
    opacity: 0.8;
}

.item-list-text {
    white-space: pre-wrap;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

#master-store-select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 2px solid #ff5722;
    font-weight: bold;
    color: #ff5722;
    outline: none;
    background: #fff3e0;
    margin-right: 10px;
    font-size: 14px;
    cursor: pointer;
}

/* 👇 새로 추가할 테이블 현황판 스타일 👇 */
.tab-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
    background: #333;
    color: white;
    border-color: #333;
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.table-card {
    background: white;
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    position: relative;
}

.table-card h3 {
    margin: 0 0 15px 0;
    color: #ff5722;
    font-size: 20px;
    border-bottom: 2px dashed #ffe0b2;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-item-list {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.table-total {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: right;
    margin-bottom: 15px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-actions button {
    flex: 1;
    padding: 12px;
    font-size: 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    border: none;
}
/* Order workflow: one primary action per individual order, not receipt group. */
.orders-heading { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:20px 0 12px; }
.orders-heading small { color:#64748b; font-size:13px; font-weight:normal; }
.order-workflow { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #e2e8f0; padding:8px 0 14px; margin-bottom:12px; }
.order-status { color:#475569; font-size:13px; font-weight:600; }
.order-primary { min-height:44px; min-width:112px; border:0; border-radius:8px; background:#087f5b; color:white; font-size:15px; font-weight:700; padding:10px 16px; cursor:pointer; white-space:nowrap; }
.order-primary:disabled { background:#64748b; cursor:default; }
.order-primary:focus-visible { outline:3px solid #2563eb; outline-offset:3px; }
.order-other summary { color:#64748b; font-size:12px; font-weight:normal; cursor:pointer; margin:10px 0; }
.sales-summary { margin-top:24px; border-top:1px solid #e2e8f0; padding-top:16px; }
.sales-summary > summary { cursor:pointer; font-weight:700; color:#334155; padding:12px 0 20px; }
#order-tbody td:nth-child(2) { font-size:22px !important; }
@media(max-width:700px) { .order-workflow { align-items:stretch; flex-direction:column; gap:8px; } .order-primary { width:100%; } .header h1 { font-size:20px; } }

/* Active order board: keep processing separate from destructive receipt actions. */
.workboard-tabs { display:flex; flex-wrap:wrap; gap:8px; }
.workboard-tabs button { min-height:44px; border:1px solid #cbd5e1; border-radius:24px; padding:8px 18px; background:white; color:#334155; cursor:pointer; font-weight:700; }
.workboard-tabs button[aria-pressed="true"] { background:#123c36; color:white; border-color:#123c36; }
#workboard-count,.workboard-empty { color:#64748b; font-size:14px; }
.workboard-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); gap:14px; margin-bottom:30px; }
.work-card { border:1px solid #e2e8f0; border-top:5px solid #e99427; border-radius:12px; padding:18px; background:#fffdf7; min-width:0; }
.work-cooking { border-top-color:#2563eb; background:#f7faff; }
.work-done { border-top-color:#94a3b8; background:#f8fafc; }
.work-head,.work-foot { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.work-number { font-size:24px; color:#172f2b; }
.work-time,.work-type { font-size:12px; color:#64748b; }
.work-store { font-size:14px; color:#475569; margin:10px 0; }
.work-items { font-size:17px; font-weight:600; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.work-controls { display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.work-amount { font-size:22px; white-space:nowrap; }
.work-foot { border-top:1px solid #e2e8f0; padding-top:14px; }
.work-payment .order-primary { background:#a84b08; }
.work-cooking .order-primary { background:#1d4ed8; }
.workboard-tabs button:focus-visible { outline:3px solid #2563eb; outline-offset:3px; }
@media(max-width:600px) { .workboard-list { grid-template-columns:1fr; } .work-head,.work-foot { flex-wrap:wrap; } .work-controls { flex:1; min-width:140px; } }

.orders-live-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0;color:#526578;font-size:14px}.orders-live-tools button{padding:10px 14px;border:1px solid #b9cbd5;border-radius:10px;background:#fff;color:#123e38;cursor:pointer}.orders-live-tools small{flex-basis:100%}#orders-new{background:#fff3d7;font-weight:700}#orders-new[hidden]{display:none}

.owner-push-panel{margin:14px 0;padding:14px;border:1px solid #d9e3e6;border-radius:12px;background:#f7faf9;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.owner-push-panel p{margin:5px 0;color:#536b76;font-size:13px;line-height:1.6}
.owner-push-panel small{flex-basis:100%;color:#536b76;line-height:1.6}
.owner-push-panel button{padding:11px 14px;border:1px solid #b9cbd0;border-radius:9px;background:#fff;color:#123d36;font-weight:bold;cursor:pointer}
.owner-push-panel button:disabled{cursor:default;opacity:.65}
@media(max-width:600px){body{padding:10px}.header{flex-direction:column;align-items:stretch;gap:14px;padding:16px}.header h1{font-size:20px;line-height:1.4;word-break:keep-all}.header>div{flex-wrap:wrap;gap:12px;justify-content:flex-end}.header a{white-space:nowrap}.header #user-role-text{flex-basis:100%;margin-right:0!important}.tab-btn{font-size:15px;padding:13px 8px;word-break:keep-all}.date-control{width:100%}.date-control input[type=date]{max-width:calc(50% - 20px);min-width:0}.owner-push-panel button{min-height:44px}.owner-push-panel>div{flex-basis:100%}}

/* Mobile order layout: presentation only; existing IDs and action handlers retained. */
.sales-context { border-bottom:1px solid #e2e8f0; padding-bottom:12px; }
#selected-store-name { font-size:20px; font-weight:700; }
.settings-fold { border:1px solid #d9e3e6; border-radius:12px; padding:12px 14px; margin:12px 0; background:#f8fafb; }
.settings-fold > summary { cursor:pointer; font-size:15px; font-weight:700; color:#334155; min-height:24px; padding:4px 0; }
.settings-fold > summary:focus-visible { outline:3px solid #2563eb; outline-offset:3px; }
.settings-fold[open] > summary { margin-bottom:12px; }
details.owner-push-panel { display:block; }
.settings-fold[hidden] { display:none!important; }
.store-tools { display:inline-block; vertical-align:middle; margin:6px 0; }
.store-tools .btn { margin:5px 0; }
body.staff-pending .sales-context,body.staff-pending #active-orders { display:none!important; }
.work-card { display:flex; flex-direction:column; }
.work-number { font-size:30px; line-height:1.2; }
.work-items { font-size:20px; line-height:1.55; }
.work-card .order-status { font-size:16px; line-height:1.5; }
.work-foot { margin-top:auto; align-items:flex-end; }
.work-controls { flex:1; min-width:0; }
.work-controls .order-primary { min-height:52px; min-width:160px; font-size:18px; }
.order-action-note { overflow-wrap:anywhere; max-width:100%; }
@media(max-width:600px) {
 .header { gap:8px; margin-bottom:12px; }
 .header h1 { font-size:18px; }
 .header #user-role-text { flex-basis:auto; margin-right:auto!important; }
 .card { padding:14px; }
 .tab-container { gap:6px; margin-bottom:12px; }
 .tab-btn { padding:10px 6px; font-size:14px; }
 .sales-context .store-tools { display:block; }
 #master-store-select { max-width:100%; }
 .date-control > div { flex-wrap:wrap; max-width:100%; }
 .date-control input { box-sizing:border-box; }
 .orders-heading { margin:16px 0 10px; font-size:22px; }
 .orders-heading small { font-size:12px; }
 .orders-live-tools { gap:8px; font-size:12px; }
 .orders-live-tools small { font-size:12px; line-height:1.5; }
 .workboard-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
 .workboard-tabs button { padding:9px 2px; font-size:13px; white-space:nowrap; }
 .work-card { padding:16px; }
 .work-head { align-items:baseline; }
 .work-number { font-size:30px; }
 .work-time { font-size:12px; }
 .work-store { margin:8px 0; }
 .work-items { margin:10px 0; font-size:20px; }
 .work-type { font-size:13px; line-height:1.5; }
 .work-foot { display:grid; grid-template-columns:1fr; gap:10px; }
 .work-controls { width:100%; align-items:stretch; gap:10px; }
 .work-controls .order-primary { width:100%; }
 .work-controls .order-status { padding:6px 10px; background:#ffffffb3; border-radius:6px; }
 .staff-panel { padding:14px; }
 .staff-panel p { font-size:14px; line-height:1.6; }
 .staff-panel input { max-width:100%; box-sizing:border-box; }
}

/* Receipt history: mobile presentation only, preserve row filtering and actions. */
@media (max-width:600px) {
 .receipt-history { display:block; margin-top:12px; }
 .receipt-history thead { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); }
 .receipt-history tbody { display:block; }
 .receipt-history tbody > tr { display:block; margin:0 0 16px; padding:14px; border:1px solid #d9e3e6; border-radius:12px; background-color:#fff; }
 .receipt-history tbody > tr > td { display:block; width:auto; min-width:0; padding:10px 0!important; border:0; text-align:left!important; overflow-wrap:anywhere; line-height:1.55; }
 .receipt-history td:not([colspan])::before { display:block; font-size:12px; font-weight:600; color:#64748b; margin-bottom:4px; }
 .receipt-history td:not([colspan]):nth-child(1)::before { content:'결제 일시 · 상태'; }
 .receipt-history td:not([colspan]):nth-child(2)::before { content:'대기번호 · 연락처'; }
 .receipt-history td:not([colspan]):nth-child(3)::before { content:'주문 방식'; }
 .receipt-history td:not([colspan]):nth-child(4)::before { content:'주문 내역'; }
 .receipt-history td:not([colspan]):nth-child(5)::before { content:'결제 금액'; }
 .receipt-history td:nth-child(1) { font-size:14px!important; }
 .receipt-history td:nth-child(2) small { font-size:14px!important; }
 .receipt-history td:nth-child(3) > span { font-size:14px!important; line-height:1.8; box-decoration-break:clone; }
 .receipt-history td:nth-child(4) > div { display:flex!important; flex-direction:column; gap:6px; padding:8px; font-size:16px!important; border-bottom:1px solid #e2e8f0; }
 .receipt-history td:nth-child(4) > div > span:first-child { display:block!important; min-width:0; }
 .receipt-history td:nth-child(4) > div > span:first-child > span { display:table!important; font-size:12px!important; margin-bottom:4px; }
 .receipt-history td:nth-child(4) > div > span:last-child { align-self:flex-end; white-space:nowrap; }
 .receipt-history td:nth-child(5) { border-top:1px solid #e2e8f0; font-size:20px; }
 .receipt-history .order-other { margin-top:12px; border-top:1px dashed #cbd5e1; }
 .receipt-history .order-other summary { min-height:44px; box-sizing:border-box; padding:12px 0; margin:0; font-size:14px; }
 .receipt-history .order-other button { min-height:44px; white-space:normal; }
 .receipt-history td[colspan] { text-align:center!important; }
}
.transfer-check {margin:10px 0 16px;padding:12px;border:1px solid #e6cd9a;background:#fff5de;border-radius:10px;line-height:1.6;overflow-wrap:anywhere;}
.transfer-check strong {font-size:18px;color:#75420c;}
.transfer-check p {margin:6px 0;font-size:14px;}
.transfer-check small {display:block;font-size:12px;color:#625545;}

/* Static owner/staff guide: no action handlers or business changes. */
.usage-guide-body {padding:0 16px 16px;line-height:1.75;color:#334155;overflow-wrap:anywhere;}
.usage-guide-body section + section {margin-top:18px;padding-top:14px;border-top:1px solid #dbe3e8;}
.usage-guide-body h4 {font-size:18px;margin:8px 0;color:#173d37;}
.usage-guide-body p {font-size:15px;margin:8px 0;}
.usage-guide-caution {background:#fff6e5;border-radius:8px;padding:12px;}
@media(max-width:600px){.usage-guide-body{padding:0 12px 12px;}.usage-guide-body p{font-size:16px;}}
/* Owner task counts, wrap safely on mobile. */
.workboard-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.workboard-tabs button{white-space:normal;min-height:68px;padding:12px;font-size:16px;border-radius:12px;overflow-wrap:anywhere}.workboard-tabs button:disabled{cursor:wait;opacity:.65}.workboard-help{color:#526171;font-size:14px;line-height:1.6}
