/* ============================================
   柳少欢乐送 - 全局样式
   ============================================ */

:root {
    --primary: #1677ff;
    --primary-hover: #4096ff;
    --primary-bg: #e6f4ff;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --text: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border: #e8e8e8;
    --bg: #f5f7fa;
    --bg-white: #fff;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
}

[v-cloak] {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ========== 布局 ========== */
.app-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    background: var(--bg);
}

.app-header {
    color: #fff;
    text-align: center;
    padding: 0 16px;
    background: linear-gradient(180deg, #e0f7fa 0%, #f5f7fa 100%);
}

.app-header .banner-img {
    max-width: 100%;
    height: auto;
}



.app-body {
    padding: 16px;
}

/* ========== 卡片 ========== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.card-title {
    padding-left: 20px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-left: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.card-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #002333;
    border-radius: 3px;
}

.card-title .icon {
    display: none;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-label .required {
    color: var(--danger);
    margin-right: 2px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background:#F6F6F6;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.form-input.error,
.form-select.error {
    border-color: var(--danger);
}

.form-textarea {
    height: 80px;
    padding: 10px 12px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* 地址联动选择 */
.address-row {
    display: flex;
    gap: 8px;
}

.address-row .form-select {
    flex: 1;
    min-width: 0;
}

/* 手机号 + 验证码 */
.input-with-btn {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-btn .form-input {
    padding-right: 100px;
}

.input-with-btn .btn-inner {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: 4px;
    color: #1BC1C2;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s;
    background: #F6F6F6;
}

.input-with-btn .btn-inner:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: .7;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    gap: 6px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary-bg);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

/* ========== 图片上传 ========== */
.upload-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.upload-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.upload-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
}

.upload-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #fff;
    font-weight: 500;
}

.upload-badge.header { background: #1677ff; }
.upload-badge.display { background: #52c41a; }
.upload-badge.tasting { background: #faad14; }

.upload-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: normal;
}

.upload-mini-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-mini-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.upload-mini-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.upload-mini-item .image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.upload-mini-add {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.upload-mini-add:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-mini-add span {
    font-size: 28px;
    color: var(--text-muted);
}

.upload-loading {
    text-align: center;
    padding: 16px;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-area .upload-icon {
    font-size: 36px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.upload-area .upload-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.upload-area .upload-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.upload-rules {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #8c6900;
    line-height: 1.8;
}

.upload-rules strong {
    color: #d48806;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fafafa;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item .image-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    color: #fff;
    font-weight: 500;
}

.image-badge.display {
    background: var(--primary);
}

.image-badge.tasting {
    background: var(--success);
}

.image-badge.other {
    background: var(--text-muted);
}

.image-item .image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.image-item .image-remove:hover {
    background: var(--danger);
}

.image-item .image-type-select {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    padding: 4px;
    text-align: center;
}

.image-item .image-type-select select {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 11px;
    text-align: center;
    width: 100%;
    outline: none;
}

.image-item .image-type-select select option {
    background: #333;
    color: #fff;
}

.image-count {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.image-count .count {
    color: var(--primary);
    font-weight: 600;
}

/* ========== 提交栏 ========== */
.submit-bar {
    padding: 16px 0 0;
}

.submit-bar .btn {
    width: 100%;
    background: linear-gradient(to right, #1BC1C2 0%, #00D8D2 100%);
    color: #fff;
    border-radius: 20px;
}

/* ========== 结果页 ========== */
.result-page {
    text-align: center;
    padding: 40px 20px 60px;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.result-icon.success {
    color: var(--success);
}

.result-icon.error {
    color: var(--danger);
}

.result-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

.result-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto;
}

/* ========== 门店搜索下拉 ========== */
.store-search-wrapper {
    position: relative;
}

.store-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 0 0 6px 6px;
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
}

.store-dropdown-item {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}

.store-dropdown-item:hover {
    background: var(--primary-bg);
}

.store-dropdown-item .region {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* ========== Loading ========== */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: none;
    animation: fadeInOut 2s ease;
    max-width: 80%;
    text-align: center;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

/* ============================================
   管理端样式
   ============================================ */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background: #001529;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.admin-sidebar .logo {
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar .logo small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.6;
    margin-top: 4px;
}

.admin-nav {
    flex: 1;
    padding: 12px 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.admin-nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.admin-nav-item.active {
    color: #fff;
    background: rgba(22, 119, 255, 0.2);
    border-left-color: var(--primary);
}

.admin-nav-item .nav-icon {
    width: 18px;
    text-align: center;
}

.admin-nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.admin-sidebar .sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    height: 56px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
}

.admin-topbar .page-title {
    font-size: 16px;
    font-weight: 600;
}

.admin-topbar .topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.admin-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.stat-card .stat-value.primary { color: var(--primary); }
.stat-card .stat-value.success { color: var(--success); }
.stat-card .stat-value.warning { color: var(--warning); }
.stat-card .stat-value.danger { color: var(--danger); }

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #fafafa;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.data-table tr:hover td {
    background: #fafafa;
}

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

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-tag.pending { background: #fff7e6; color: #d48806; }
.status-tag.approved { background: #f6ffed; color: #389e0d; }
.status-tag.rejected { background: #fff1f0; color: #cf1322; }
.status-tag.disqualified { background: #f5f5f5; color: #8c8c8c; }

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .form-input,
.filter-bar .form-select {
    width: auto;
    min-width: 160px;
    height: 36px;
    font-size: 13px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination .page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-white);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination .page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination .page-ellipsis {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 2px;
    user-select: none;
}

/* 详情弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.2s;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    border-radius: 4px;
}

.modal-close:hover {
    background: #f5f5f5;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 详情信息 */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item .label {
    font-size: 12px;
    color: var(--text-muted);
}

.detail-item .value {
    font-size: 14px;
    color: var(--text);
}

.detail-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.detail-images img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border);
}

.detail-images img:hover {
    border-color: var(--primary);
}

/* 审核操作区 */
.review-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.review-section h4 {
    font-size: 14px;
    margin-bottom: 12px;
}

/* 登录页 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 40px;
    width: 400px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 24px;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 14px;
}

/* 图片预览 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-preview-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 60px;
    }
    .admin-sidebar .logo small,
    .admin-nav-item span,
    .admin-sidebar .sidebar-footer {
        display: none;
    }
    .admin-nav-item {
        justify-content: center;
        padding: 12px;
    }
    .admin-nav-item .nav-icon {
        font-size: 18px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .detail-images {
        grid-template-columns: repeat(3, 1fr);
    }
}
