/* 데일리위스키 ERP - Global Styles */
:root {
    --primary: #2c3e50;
    --accent: #e67e22;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --bg: #f5f6fa;
    --card: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #dcdde1;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }

/* Nav */
.nav {
    background: var(--primary);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 0;
}
.nav-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 2rem;
    white-space: nowrap;
    padding: .7rem 0;
}
.nav-brand:hover { color: #fff; background: transparent; }
.nav a {
    color: rgba(255,255,255,.7);
    padding: .7rem 1rem;
    font-size: .9rem;
    transition: .2s;
}
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.1); border-radius: 6px; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }

/* Cards */
.card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--bg);
}

/* Forms */
.form-row { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; margin-bottom: .75rem; }
.form-group { display: flex; flex-direction: column; gap: .25rem; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--text-light); }
.form-group input, .form-group select {
    padding: .55rem .75rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: .95rem;
    outline: none;
    transition: .2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
input[type=number] { width: 80px; }

/* Buttons */
.btn {
    padding: .6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: .15s;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.btn:hover { opacity: .85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { background: var(--bg); font-weight: 600; text-align: left; padding: .6rem .75rem; font-size: .8rem; color: var(--text-light); text-transform: uppercase; }
td { padding: .6rem .75rem; border-bottom: 1px solid var(--bg); }
tr:hover { background: #fafbfc; }

/* Search */
.search-box {
    position: relative;
}
.search-box input {
    width: 100%;
    padding: .7rem 1rem .7rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
}
.search-box input:focus { border-color: var(--accent); }
.search-box::before {
    content: "🔍";
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
}
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    display: none;
}
.search-results.show { display: block; }
.search-item {
    padding: .75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bg);
}
.search-item:hover { background: #fff8f0; }
.search-item .name { font-weight: 600; }
.search-item .code { color: var(--text-light); font-size: .85rem; }
.search-item .price { font-size: .85rem; color: var(--accent); }

/* Staging list */
.staging-list { min-height: 60px; }
.staging-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .75rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    margin-bottom: .5rem;
    background: #fffdf8;
}
.staging-item .info { flex: 1; }
.staging-item .info .name { font-weight: 600; font-size: .95rem; }
.staging-item .info .detail { font-size: .8rem; color: var(--text-light); }
.staging-item .amount { font-weight: 700; font-size: 1rem; margin: 0 1rem; }

/* Selected product card */
.selected-product {
    background: #fffdf8;
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    display: none;
}
.selected-product.show { display: block; }
.selected-product .prod-name { font-size: 1.1rem; font-weight: 700; }
.selected-product .prod-code { color: var(--text-light); font-size: .9rem; }
.selected-product .prod-prices { display: flex; gap: 2rem; margin-top: .5rem; }
.selected-product .prod-prices span { font-size: .9rem; }
.selected-product .prod-prices strong { color: var(--accent); }

/* Badges */
.badge {
    padding: .2rem .6rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-card { background: #dfe6e9; color: #2d3436; }
.badge-cash { background: #ffeaa7; color: #d35400; }
.badge-dailyshot { background: #a29bfe; color: #fff; }
.badge-submitted { background: #55efc4; color: #00695c; }
.badge-pending { background: #fab1a0; color: #c0392b; }

/* Summary bar */
.summary-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.summary-stat {
    background: var(--card);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    text-align: center;
    min-width: 150px;
}
.summary-stat .label { font-size: .8rem; color: var(--text-light); }
.summary-stat .value { font-size: 1.5rem; font-weight: 700; }
.summary-stat .value.positive { color: var(--success); }
.summary-stat .value.negative { color: var(--danger); }

/* Submit bar */
.submit-bar {
    background: var(--primary);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}
.submit-bar .total { font-size: 1.2rem; font-weight: 700; }
.submit-bar .btn { background: var(--success); font-size: 1rem; padding: .7rem 2rem; }

/* Utilities */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.text-muted { color: var(--text-light); }
.text-sm { font-size: .85rem; }
.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    font-size: .95rem;
}

/* Modal overlay */
.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
    background: #fff;
    border-radius: 14px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal h3 { margin-bottom: 1rem; }
.modal .actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Responsive */
@media (max-width: 768px) {
    .nav { flex-wrap: wrap; height: auto; padding: .5rem; }
    .form-row { flex-direction: column; }
    .summary-bar { flex-direction: column; }
}
