* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--font-body);
    color: var(--color-text);
    background-color: #FFFFFF !important;
    line-height: 1.5;
}

/* 全局统一搜索框：左清空(带边框浅灰底) + 中输入框(带边框白底) + 右搜索(带边框浅灰底) */
.global-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: #FFFFFF;
}
.global-search .gs-btn {
    width: 18%;
    min-width: 55px;
    max-width: 75px;
    height: 36px;
    line-height: 34px;
    text-align: center;
    background: #F7F7F7;
    color: #888888;
    border: 1px solid #E0E0E0;
    border-radius: 14px;
    font-size: 14px;
    padding: 0 8px;
    margin: 0;
    box-shadow: none;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}
.global-search .gs-btn:hover {
    background: #EFEFEF;
    color: #666666;
}
.global-search .gs-btn.search-btn {
    background: #F7F7F7;
    color: #888888;
    border: 1px solid #E0E0E0;
    font-weight: normal;
}
.global-search .gs-btn.search-btn:hover {
    background: #EFEFEF;
    color: #666666;
}
.global-search .gs-input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #E0E0E0;
    border-radius: 14px;
    background: #FFFFFF;
    font-size: 14px;
    outline: none;
    min-width: 0;
    color: #666666;
}
.global-search .gs-input::placeholder {
    color: #999999;
}
.global-search .gs-input:focus {
    border-color: #D5D5D5;
    background: #FFFFFF;
}
.card {
    background: var(--color-card);
    border-radius: var(--radius-card);
    padding: var(--padding-page);
    margin-bottom: var(--gap-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-btn);
    font-size: var(--font-btn);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn:active {
    transform: scale(0.97);
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #FFFFFF;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), #A87E3E);
}
.btn-success {
    background: var(--color-success);
    color: #FFFFFF;
}
.btn-danger {
    background: var(--color-danger);
    color: #FFFFFF;
}
.btn-blue {
    background: var(--color-blue);
    color: #FFFFFF;
}
.btn-coffee {
    background: var(--color-coffee);
    color: #FFFFFF;
}
.btn-red {
    background: var(--color-red);
    color: #FFFFFF;
}
.btn-outline {
    background: transparent;
    border: 1px solid #CCCCCC;
    color: var(--color-text);
}
.btn-full {
    width: 100%;
}
.input-group {
    margin-bottom: var(--gap-card);
}
.input-label {
    display: block;
    font-size: var(--font-body);
    color: var(--color-text);
    margin-bottom: 6px;
}
.input-label span {
    color: var(--color-danger);
}
.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #CCCCCC;
    border-radius: var(--radius-input);
    font-size: var(--font-body);
    color: var(--color-text);
    background: #FFFFFF;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus {
    border-color: var(--color-primary);
}
.form-input::placeholder {
    color: var(--color-text-light);
}
.text-center {
    text-align: center;
}
.text-light {
    color: var(--color-text-light);
    font-size: var(--font-text-light);
}
.text-success {
    color: var(--color-success);
}
.text-danger {
    color: var(--color-danger);
}
.text-primary {
    color: var(--color-primary);
}
.text-blue {
    color: var(--color-blue);
}
.text-coffee {
    color: var(--color-coffee);
}
.text-bold {
    font-weight: bold;
}
.flex {
    display: flex;
}
.flex-column {
    flex-direction: column;
}
.flex-center {
    align-items: center;
    justify-content: center;
}
.flex-between {
    justify-content: space-between;
    align-items: center;
}
.flex-wrap {
    flex-wrap: wrap;
}
.gap-12 {
    gap: 12px;
}
.gap-16 {
    gap: 16px;
}
.mt-16 {
    margin-top: 16px;
}
.mb-16 {
    margin-bottom: 16px;
}
.mt-20 {
    margin-top: 20px;
}
.mb-20 {
    margin-bottom: 20px;
}
.w-full {
    width: 100%;
}
.hidden {
    display: none;
}
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #FFFFFF;
    padding: 16px 32px;
    border-radius: var(--radius-btn);
    font-size: var(--font-body);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}
.toast.show {
    opacity: 1;
}
.toast-success {
    background: rgba(0,153,68,0.9);
}
.toast-danger {
    background: rgba(204,0,0,0.9);
}
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}
.popup-card {
    width: 85%;
    max-width: 400px;
    background: #FFFFFF;
    border-radius: var(--radius-popup);
    overflow: hidden;
    position: relative;
}
.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    color: var(--color-text-light);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}
.popup-image {
    padding: 20px;
    text-align: center;
}
.popup-image img {
    max-width: 100%;
    border-radius: var(--radius-card);
}
.popup-tip {
    text-align: center;
    color: var(--color-text-light);
    font-size: var(--font-text-light);
    margin-bottom: 16px;
}
.popup-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #FFFFFF;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-btn);
    font-size: var(--font-btn);
    font-weight: bold;
}
.popup-title {
    padding: 20px 16px 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--color-text);
    text-align: center;
}
.popup-content {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--color-text-light);
    text-align: center;
    line-height: 1.6;
}
.popup-btn-gold {
    background: linear-gradient(135deg, #C8A96E, #B8944F);
}
.popup-btn-blue {
    background: linear-gradient(135deg, #2E86C1, #2471A3);
}
.popup-btn-green {
    background: linear-gradient(135deg, #009944, #007A35);
}
.popup-btn-red {
    background: linear-gradient(135deg, #E63946, #C62D39);
}
.popup-card-no-wrap {
    text-align: center;
    padding: 8px 16px 12px;
}
.popup-card-no {
    text-align: center;
    color: var(--color-text-light);
    font-size: 13px;
    margin-bottom: 8px;
}
.popup-card-no-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    padding: 4px 0;
    width: fit-content;
    max-width: 100%;
}
.popup-card-no-value {
    font-size: 28px;
    font-weight: bold;
    color: #C8A96E;
    letter-spacing: 2px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FFF9E6, #FFF3CC);
    border: 2px dashed #C8A96E;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}
.popup-copy-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, #2E86C1, #2471A3);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}
.popup-card-no-tip {
    text-align: center;
    color: #E63946;
    font-size: 12px;
    margin-top: 8px;
    font-weight: bold;
}
.page-header {
    background: #FFFFFF;
    padding: var(--padding-page);
    margin-bottom: var(--gap-module);
}
.page-title {
    font-size: var(--font-title);
    font-weight: bold;
    color: var(--color-text);
}
.empty-state {
    text-align: center;
    padding: 60px var(--padding-page);
    color: var(--color-text-light);
}
.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}
.loading {
    text-align: center;
    padding: 20px;
    color: var(--color-text-light);
}
.loading span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: loading 0.8s infinite;
}
.loading span:nth-child(2) { animation-delay: 0.2s; }
.loading span:nth-child(3) { animation-delay: 0.4s; }
@keyframes loading {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.divider {
    height: 1px;
    background: #EEEEEE;
    margin: var(--gap-card) 0;
}
.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: var(--font-text-light);
}
.tag-success {
    background: var(--color-success-light);
    color: var(--color-success);
}
.tag-danger {
    background: var(--color-danger-light);
    color: var(--color-danger);
}
.tag-primary {
    background: rgba(200,169,110,0.1);
    color: var(--color-primary);
}
.tag-warning {
    background: rgba(243,156,18,0.1);
    color: var(--color-warning);
}
.tag-blue {
    background: var(--color-blue-light);
    color: var(--color-blue);
}
