/* ===== 酒之林供应链查询系统 · 尊享?===== */
:root {
    --navy: #0a1628;
    --navy2: #111d34;
    --gold: #c9a84c;
    --gold2: #d4b860;
    --gold3: #a8882e;
    --cream: #faf7f0;
    --cream2: #f5f0e6;
    --white: #ffffff;
    --ink: #1a1f2e;
    --ink2: #3a4050;
    --line: #e8e2d4;
    --line2: #d9d0bc;
    --red: #b5343a;
    --green: #3b7a57;
    --shadow-sm: 0 4px 12px rgba(10,22,40,.06);
    --shadow: 0 12px 36px rgba(10,22,40,.10);
    --shadow-lg: 0 24px 60px rgba(10,22,40,.15);
    --radius: 16px;
    --radius-sm: 10px;
}

*{box-sizing:border-box}

body{
    margin:0;
    font-family: "Inter","Noto Sans SC","Microsoft YaHei","PingFang SC",-apple-system,sans-serif;
    background: var(--cream);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a{text-decoration:none;color:inherit}

/* ===== BUTTONS ===== */
button,.btn{
    border:0;
    background: linear-gradient(135deg,var(--gold),var(--gold3));
    color: var(--navy);
    border-radius: var(--radius-sm);
    padding: 12px 22px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .2s;
    box-shadow: 0 4px 14px rgba(201,168,76,.25);
    letter-spacing: .3px;
}

button:hover,.btn:hover{
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(201,168,76,.35);
}

.btn.light,button.light{
    background: var(--white);
    color: var(--ink2);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.btn.light:hover{box-shadow:var(--shadow)}

.btn.danger{
    background: linear-gradient(135deg,#c0392b,#a93226);
    color:#fff;
    box-shadow:0 4px 14px rgba(192,57,43,.25);
}

.btn.small{padding:8px 14px;font-size:12px;border-radius:8px}

/* ===== BRAND MARK ===== */
.brandmark{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201,168,76,.12);
    border: 1px solid rgba(201,168,76,.3);
    color: var(--gold);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

/* ===== HEADER ===== */
.app-head{
    background: linear-gradient(165deg, var(--navy) 0%, var(--navy2) 50%, #1a2d4a 100%);
    color: var(--white);
    padding: 28px 24px 52px;
    position: relative;
    overflow: hidden;
}

.app-head::before{
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201,168,76,.12) 0%, transparent 70%);
    pointer-events: none;
}

.app-head::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,.4), transparent);
}

.app-head .inner{
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    text-align: center;
}

.app-head .inner .brandmark{
    margin: 0 auto 12px;
    background: rgba(255,255,255,.08);
    border-color: rgba(201,168,76,.4);
    color: var(--gold2);
    font-size: 11px;
    letter-spacing: 3px;
}

.app-head h1{
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0 0 6px;
    background: linear-gradient(180deg, #fff 40%, #d4b860);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-head p{
    color: rgba(255,255,255,.55);
    font-size: 14px;
    margin: 0;
    letter-spacing: .5px;
}

/* ===== CITY TABS (hidden) ===== */
.city-tabs{display:none!important}

/* ===== SEARCH BAR ===== */
.searchbar{
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr auto;
    gap: 10px;
    background: var(--white);
    padding: 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    backdrop-filter: blur(20px);
}

input,select,textarea{
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 13px 16px;
    background: var(--cream);
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: all .2s;
    font-family: inherit;
}

input:focus,select:focus,textarea:focus{
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,.12);
    background: var(--white);
}

input::placeholder{color:#b0a89a}

select{
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23888075'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ===== MAIN CONTENT ===== */
.wrap{
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 24px;
}

.app .wrap{margin-top: -34px}

.count{
    margin: 16px 4px;
    color: #9a8e7a;
    font-size: 13px;
    font-weight: 500;
}

/* ===== PRODUCT GRID ===== */
.grid.appgrid{
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 20px;
}

.appcard{
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: all .3s cubic-bezier(.4,0,.2,1);
    position: relative;
}

.appcard:hover{
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201,168,76,.3);
}

.appcard::after{
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity .3s;
}

.appcard:hover::after{opacity: 1}

/* ===== PRODUCT IMAGE ===== */
.pic{
    height: 190px;
    background: linear-gradient(180deg, var(--cream), var(--cream2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    color: var(--gold3);
    position: relative;
    overflow: hidden;
}

.pic img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform .4s cubic-bezier(.4,0,.2,1);
}

.appcard:hover .pic img{transform: scale(1.05)}

.pic span{
    font-size: 28px;
    letter-spacing: 4px;
    color: rgba(168,136,46,.2);
    font-weight: 900;
}

/* ===== PRODUCT INFO ===== */
.info{padding: 14px 16px 16px}

.badges{
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.tag{
    display: inline-block;
    background: linear-gradient(135deg, rgba(201,168,76,.1), rgba(201,168,76,.06));
    color: var(--gold3);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(201,168,76,.15);
    letter-spacing: .3px;
}

.tag.gray{
    background: var(--cream);
    color: #8a8070;
    border-color: var(--line);
}

.product h2{
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin: 6px 0;
    min-height: 42px;
    color: var(--ink);
}

.meta,.product p{
    margin: 4px 0;
    color: #8a8070;
    font-size: 12px;
}

/* ===== PRICES ===== */
.prices{
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 10px;
}

.prices div{
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
}

.prices span{
    color: #8a8070;
    font-size: 11px;
    font-weight: 500;
}

.prices b{
    font-size: 16px;
    color: var(--red);
    font-weight: 700;
}

.remark{
    background: linear-gradient(135deg, rgba(201,168,76,.06), transparent);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    font-size: 12px;
    color: #8a8070;
    border-left: 2px solid var(--gold);
}

/* ===== FOOTER ===== */
.site-footer{
    margin-top: 32px;
    background: var(--navy);
    color: rgba(255,255,255,.6);
    text-align: center;
    font-size: 12px;
    line-height: 2;
    padding: 28px 20px;
    letter-spacing: .5px;
}

.site-footer::before{
    content: "酒之林供应链查询系统 · 商品信息内部查询平台";
    display: block;
    color: var(--gold);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.site-footer::after{
    content: "价格数据以后台维护为?;
    display: block;
    color: rgba(255,255,255,.35);
    font-size: 11px;
    margin-top: 2px;
}

/* ===== ADMIN HEADER ===== */
.admin-head{
    background: var(--navy);
    color: var(--white);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 24px rgba(10,22,40,.25);
}

.admin-head .brand{
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--gold);
}

.admin-head .right{display:flex;align-items:center;gap:16px;font-size:13px;color:rgba(255,255,255,.7)}

/* ===== ADMIN NAV ===== */
.admin-nav{
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin: 18px 0 8px;
    padding: 4px;
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.admin-nav a{
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--ink2);
    transition: all .2s;
}

.admin-nav a:hover{background: var(--cream);color: var(--ink)}

.admin-nav a.on{
    background: var(--navy);
    color: var(--gold);
}

/* ===== CARDS ===== */
.card{
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.card+.card{margin-top:16px}

.card-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header h3{
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

/* ===== STATS ===== */
.stats-grid{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card{
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: all .2s;
}

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

.stat-card .label{
    font-size: 12px;
    color: #9a8e7a;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: .5px;
}

.stat-card .value{
    font-size: 32px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.stat-card .sub{
    font-size: 11px;
    color: #9a8e7a;
    margin-top: 6px;
}

/* ===== TABLE ===== */
.table-wrap{
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--white);
}

table{
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 900px;
}

th{
    background: var(--navy);
    color: var(--gold);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

td{
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

tbody tr{
    transition: background .15s;
}

tbody tr:hover{background: rgba(201,168,76,.04)}

tbody tr:last-child td{border-bottom: none}

.actions{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== FORM ===== */
.form-grid{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
}

.form-grid .full{grid-column: 1/-1}

label{
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--ink);
}

.section-title{
    font-size: 15px;
    font-weight: 700;
    margin: 8px 0 14px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(201,168,76,.08), transparent);
    border-radius: var(--radius-sm);
    color: var(--gold3);
    border-left: 3px solid var(--gold);
}

/* ===== LOGIN ===== */
.login-page{
    min-height: 100vh;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before{
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201,168,76,.08) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.login-page::after{
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201,168,76,.06) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
}

.login-card{
    position: relative;
    z-index: 1;
    width: 420px;
    max-width: 92vw;
    background: var(--white);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 36px 80px rgba(0,0,0,.3);
    border: 1px solid rgba(201,168,76,.2);
}

.login-card .brandmark{
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.login-card h2{
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    color: var(--navy);
    margin: 0 0 6px;
    letter-spacing: 1px;
}

.login-card .subtitle{
    text-align: center;
    color: #9a8e7a;
    font-size: 13px;
    margin-bottom: 28px;
}

.login-card label{
    margin-top: 16px;
}

.login-card .btn{
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    font-size: 15px;
}

.login-error{
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 8px;
}

.login-footer{
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,.35);
    font-size: 12px;
    padding: 20px;
    text-align: center;
}

/* ===== MODAL ===== */
.modal-overlay{
    position: fixed;
    inset: 0;
    background: rgba(10,22,40,.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal{
    background: var(--white);
    border-radius: 20px;
    padding: 32px;
    width: 640px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
}

.modal h3{
    margin: 0 0 20px;
    font-size: 18px;
    color: var(--navy);
}

/* ===== SMALL WRAP ===== */
.small{max-width:760px}

/* ===== INSTALL ===== */
.check{padding:14px;border-radius:var(--radius-sm);margin:12px 0;font-weight:600}
.good{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}
.bad{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
.muted{color:#9a8e7a}

/* ===== RESPONSIVE ===== */
@media(max-width:1080px){
    .grid.appgrid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .stats-grid{grid-template-columns:repeat(2,1fr)}
    .form-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:720px){
    .grid.appgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
    .searchbar{grid-template-columns:1fr 1fr;padding:12px;border-radius:16px}
    .app-head{padding:24px 16px 42px}
    .app-head h1{font-size:24px}
    .app-head p{font-size:12px}
    .wrap{padding:14px}
    .app .wrap{margin-top:-28px}
    .pic{height:140px}
    .pic img{padding:10px}
    .product h2{font-size:13px;min-height:36px}
    .tag{font-size:10px;padding:3px 7px}
    .prices div{padding:7px 10px}
    .prices b{font-size:14px}
    .login-card{padding:32px 24px}
    .stats-grid{grid-template-columns:1fr}
    .form-grid{grid-template-columns:1fr}
    .admin-nav{overflow-x:auto;flex-wrap:nowrap}
}

@media(max-width:420px){
    .grid.appgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .searchbar{grid-template-columns:1fr}
    .pic{height:120px}
    .info{padding:10px}
    .prices b{font-size:13px}
}

/* Utility */
.text-center{text-align:center}
.mt-16{margin-top:16px}
.mb-16{margin-bottom:16px}
.gap-8{display:flex;gap:8px;align-items:center}
/* ===== ɫ ===== */
.profit-high { color: #22c55e; font-weight: 700; font-size: 1.05em; }
.profit-mid  { color: #eab308; font-weight: 700; font-size: 1.05em; }
.profit-low  { color: #ef4444; font-weight: 700; font-size: 1.05em; }
.price-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.price-row span { font-size: 0.72rem; color: #8892b0; flex-shrink: 0; }

/* ===== ɨ ===== */
.scan-input-group { display: flex; gap: 4px; flex: 1; min-width: 200px; }
.scan-input-group input { flex: 1; }
.scan-btn { padding: 8px 14px; font-size: 1.2rem; line-height: 1; cursor: pointer; background: var(--navy2); border: 1px solid var(--gold); color: var(--gold); border-radius: 6px; transition: all .2s; }
.scan-btn:hover { background: var(--gold); color: var(--navy); }
.scanner-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.scanner-shell { background: var(--navy); border: 1px solid var(--gold); border-radius: 12px; padding: 16px; width: 90vw; max-width: 480px; }
.scanner-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: #e0e0e0; font-size: 0.95rem; }
.scanner-shell video { width: 100%; border-radius: 8px; border: 2px solid var(--gold); }
.scanner-hint { text-align: center; color: #8892b0; font-size: 0.78rem; margin: 8px 0 0; }
.btn.light { background: transparent; border: 1px solid #666; color: #aaa; }
.btn.light:hover { background: #333; color: #fff; }