* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f5f0e8;
    color: #1a1a1a;
    min-height: 100vh;
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: #fff;
    border-bottom: 1px solid #ebe3d8;
}
.portal-logo { font-size: 18px; font-weight: 700; }
.portal-user { font-size: 14px; color: #666; }
.portal-user a { color: #8b7355; text-decoration: none; margin-left: 12px; }

.portal-main { max-width: 800px; margin: 0 auto; padding: 32px 20px; }

.login-wrap {
    max-width: 420px;
    margin: 80px auto;
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.login-sub { font-size: 13px; color: #888; text-align: center; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-input {
    width: 100%;
    height: 44px;
    border: 1px solid #e0d8cc;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
}
.form-input:focus { border-color: #8b7355; }
.btn-primary {
    width: 100%;
    height: 46px;
    background: #2c2416;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 8px;
}
.btn-primary:hover { background: #1a1510; }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }

.scan-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}
.scan-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.scan-tip { font-size: 13px; color: #888; margin-bottom: 20px; }
.scan-input {
    width: 100%;
    height: 52px;
    font-size: 18px;
    border: 2px solid #e8e0d4;
    border-radius: 12px;
    padding: 0 16px;
    outline: none;
}
.scan-input:focus { border-color: #8b7355; }

.member-panel {
    display: none;
    margin-top: 24px;
    padding: 24px;
    background: #faf7f2;
    border-radius: 12px;
}
.member-panel.show { display: block; }
.member-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.info-item { font-size: 14px; color: #555; }
.info-item strong { display: block; color: #999; font-size: 12px; font-weight: normal; margin-bottom: 2px; }
.info-item span { color: #1a1a1a; font-weight: 500; }
.amount-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.amount-input {
    width: 140px;
    height: 42px;
    border: 1px solid #e0d8cc;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 18px;
}
.btn-writeoff {
    background: #2c2416;
    color: #fff;
    border: none;
    border-radius: 10px;
    height: 46px;
    padding: 0 36px;
    font-size: 16px;
    cursor: pointer;
}
.btn-writeoff:hover { background: #1a1510; }

.stats-bar {
    background: #faf7f2;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 14px;
    color: #555;
    text-align: center;
}
.stats-bar strong { color: #1a1a1a; font-size: 18px; }

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c2416;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    z-index: 999;
}
.toast.show { display: block; }

@media (max-width: 600px) {
    .member-info { grid-template-columns: 1fr; }
    .portal-header { padding: 12px 16px; }
    .scan-card { padding: 20px; }
}
