/* 全局字体定义 - 阿里巴巴普惠体 */
@font-face {
    font-family: 'AliPuHui';
    src: url('/preorder/fonts/ali.woff2') format('woff2'),
         url('/preorder/fonts/ali.woff') format('woff');
    font-display: swap;
}
/* assets/admin.css - 完整最终版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "AliPuHui", "Microsoft YaHei", sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    padding: 24px 20px;
}

.admin-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* 头部区域 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(251, 177, 194, 0.4);
    flex-wrap: wrap;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a63c5e 0%, #d44e7a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.01em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #475569;
    font-weight: 500;
}

.user-info a {
    color: #d44e7a;
    text-decoration: none;
    padding: 8px 16px;
    background: white;
    border-radius: 40px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    border: 1px solid #f1e7eb;
    transition: all 0.2s;
}

.user-info a:hover {
    background: #fbb1c2;
    color: #a63c5e;
    border-color: #ffb3c6;
}

/* 导航栏 */
nav {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

nav a {
    background: white;
    padding: 12px 24px;
    border-radius: 60px;
    text-decoration: none;
    color: #334155;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.02);
    border: 1px solid #e9eef2;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

nav a:hover {
    background: #fef0f5;
    border-color: #ffb3c6;
    transform: translateY(-2px);
    box-shadow: 0 8px 14px rgba(212, 78, 122, 0.08);
}

nav a.active {
    background: #ff8aae;
    color: white;
    border-color: #ff8aae;
    box-shadow: 0 8px 14px rgba(255, 138, 174, 0.25);
}

/* 内容卡片 */
.content {
    background: white;
    border-radius: 32px;
    padding: 32px;
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid #f5f0f2;
}

/* 表格 */
.form-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    font-size: 1rem;
}

.form-table th {
    background: #fef0f5;
    color: #a63c5e;
    font-weight: 600;
    padding: 18px 20px;
    text-align: left;
    border-bottom: 2px solid #fbb1c2;
}

.form-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1e7eb;
    vertical-align: middle;
}

.form-table tr:last-child td {
    border-bottom: none;
}

.form-table tbody tr:hover {
    background-color: #fff0f5 !important;
    transition: background 0.2s;
}

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

.actions .btn-sm {
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 40px;
    text-decoration: none;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
}

.actions .btn-sm:hover {
    background: #ffb3c6;
    color: #a63c5e;
    border-color: #ffb3c6;
}

.actions .delete {
    color: #b91c1c;
    border-color: #fee2e2;
}

.actions .delete:hover {
    background: #fee2e2;
}

/* 表单组 */
.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 18px !important;
    font-size: 1rem;
    background: white;
    transition: border 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #ff85a2;
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 138, 174, 0.12);
}

/* 字段行（表单编辑页） */
.field-row {
    background: #fafcff;
    padding: 20px 24px;
    border-radius: 24px;
    margin-bottom: 28px;
    border: 1px solid #f0e7ea;
    box-shadow: 0 4px 8px rgba(0,0,0,0.02);
    transition: box-shadow 0.2s;
}

.field-row:hover {
    box-shadow: 0 8px 16px rgba(212, 78, 122, 0.06);
}

.field-row > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.drag-handle {
    cursor: grab;
    color: #cbd5e1;
    font-size: 1.8rem;
    user-select: none;
    line-height: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

.field-row input[type="text"] {
    flex: 2 1 200px;
    min-width: 180px;
    padding: 12px 16px;
}

.field-row select {
    flex: 1 1 160px;
    min-width: 140px;
    padding: 12px 16px;
}

.field-row .remove-field {
    background: #fff1f2;
    border: 1px solid #ffccd0;
    color: #b91c1c;
    padding: 10px 18px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.field-row .remove-field:hover {
    background: #fee2e2;
}

.options-input {
    margin-top: 16px;
    width: 100%;
    padding: 12px 16px !important;
    border-radius: 18px !important;
    min-height: 180px;
    resize: vertical;
}

.field-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 18px;
    align-items: center;
}

.field-extra label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
}

.field-note-input {
    flex: 2 1 240px;
    min-width: 200px;
    padding: 10px 16px !important;
}

/* 按钮 */
.btn-primary {
    background: #ff8aae;
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: 60px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 0 #c1547a, 0 6px 12px rgba(193, 84, 122, 0.2);
    border: 2px solid #fff2f5;
    transition: all 0.1s;
    margin-top: 20px;
}

.btn-primary:hover {
    background: #ff7a9f;
    transform: translateY(-2px);
    box-shadow: 0 10px 0 #c1547a, 0 8px 16px rgba(193, 84, 122, 0.25);
}

.btn-primary:active {
    transform: translateY(5px);
    box-shadow: 0 4px 0 #c1547a, 0 6px 12px rgba(193, 84, 122, 0.2);
}

.btn-sm {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-sm:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* 打印相关 */
.print-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #3730a3;
    transition: 0.1s;
}

.print-btn:hover {
    background: #4338ca;
}

.entry-card {
    background: #fff9fb;
    border-radius: 30px;
    padding: 28px;
    margin-bottom: 30px;
    border: 2px solid #ffd9e4;
    box-shadow: 0 6px 0 #fbb1c2;
}

.entry-meta {
    font-size: 1.2rem;
    color: #a63c5e;
    margin-bottom: 20px;
    border-bottom: 2px dashed #fbb1c2;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.entry-data {
    font-size: 1.2rem;
    line-height: 1.8;
}

.data-row {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #ffe0e8;
    padding-bottom: 10px;
}

.data-label {
    font-weight: 700;
    min-width: 140px;
    color: #4a2c3a;
}

.data-value {
    color: #1e293b;
}

@media print {
    body { background: white; font-size: 14pt; }
    .admin-container { max-width: 100%; margin: 0; padding: 10px; }
    header, nav, .no-print, .print-btn { display: none !important; }
    .print-header { display: block; text-align: center; margin-bottom: 20px; }
    .entry-card { box-shadow: none; border: 2px solid #aaa; background: white; page-break-inside: avoid; }
}

/* 登录页 */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    background: linear-gradient(145deg, #fef0f5 0%, #ffe4ec 100%);
}

.login-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px 36px;
    border-radius: 48px;
    box-shadow: 0 20px 0 #fbb1c2, 0 30px 40px rgba(212, 78, 122, 0.15);
    width: 100%;
    max-width: 420px;
    border: 3px solid white;
}

.login-box h2 {
    color: #a63c5e;
    font-size: 2rem;
    margin-bottom: 28px;
    text-align: center;
}

.login-box input {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 18px;
    border: 2px solid #f9c6d4;
    border-radius: 50px;
    font-size: 1.1rem;
    background: white;
}

.login-box button {
    background: #ff8aae;
    color: white;
    border: none;
    padding: 16px;
    width: 100%;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 0 #c1547a;
    transition: all 0.1s;
    border: 2px solid #ffeef2;
    margin-top: 5px;
}

.login-box button:hover {
    background: #ff7a9f;
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #c1547a;
}

.login-box button:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #c1547a;
}

.login-box .hint {
    text-align: center;
    margin-top: 20px;
    color: #a63c5e;
    font-size: 0.95rem;
}

.debug-hint {
    font-size: 0.8rem;
    color: #888;
    margin-top: 20px;
    border-top: 1px dashed #ccc;
    padding-top: 15px;
}

.login-copyright {
    margin-top: 30px;
    text-align: center;
    color: #38394b;
    font-size: 0.9rem;
    width: 100%;
}
.login-copyright a {
    color: #a63c5e;
    text-decoration: none;
    font-weight: 600;
}
.login-copyright a:hover {
    text-decoration: underline;
}

/* 状态提示 */
.error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 14px 20px;
    border-radius: 40px;
    margin-bottom: 20px;
    font-weight: 500;
}

.success {
    background: #dcfce7;
    color: #166534;
    padding: 14px 20px;
    border-radius: 40px;
    margin-bottom: 20px;
    font-weight: 500;
}

.flash-success, .flash-error {
    padding: 14px 24px;
    border-radius: 60px;
    margin-bottom: 24px;
    font-weight: 500;
    border-left: 6px solid #22c55e;
}

.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; border-left-color: #ef4444; }

/* 移动端响应式 */
@media (max-width: 768px) {
    body { padding: 16px 12px; }
    header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .content { padding: 20px 16px; }
    .form-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ===== 补充样式 ===== */
#toast-container {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 9999; pointer-events: none;
}
.toast-message {
    background: #000000;
    color: white; padding: 16px 28px; border-radius: 60px;
    font-size: 1.1rem; font-weight: 500; box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    display: flex; align-items: center; gap: 12px; pointer-events: none;
    animation: fadeInOut 4s ease forwards;
    border-left: 6px solid #22c55e;
}
.toast-message.error { border-left-color: #ef4444; }
.toast-message i { font-size: 1.4rem; }
@keyframes fadeInOut {
    0% { opacity: 0; transform: scale(0.9); }
    15% { opacity: 1; transform: scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: scale(0.9); }
}

.info-card {
    background: #fff9db; border: 2px solid #ffd966; border-radius: 40px;
    padding: 10px 20px; display: inline-flex; align-items: center; gap: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.03);
}
.info-card .card-icon { font-size: 1.6rem; }
.info-card .card-text { font-size: 1rem; font-weight: 600; color: #a63c5e; white-space: nowrap; }
.info-card .card-text a { color: #a63c5e; text-decoration: underline; font-weight: 700; }
.info-card .close-btn {
    background: none; border: none; font-size: 1.3rem; cursor: pointer;
    color: #a63c5e; padding: 0 4px; margin-left: 5px;
}
@keyframes borderFlash {
    0%,100% { border-color: #ffd966; box-shadow: 0 4px 8px rgba(0,0,0,0.03); }
    50% { border-color: #ff4d6d; box-shadow: 0 0 20px #ff8aae; }
}
.info-card.flash-border { animation: borderFlash 0.8s ease-in-out infinite; }

/* 表单编辑页图标选择器 */
.form-name-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.form-name-row input {
    flex: 3;
    height: 54px;
    padding: 0 18px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-size: 1rem;
    background: white;
}
.form-name-row select {
    flex: 1;
    min-width: 100px;
    height: 54px;
    padding: 0 12px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    background: white;
    font-size: 1.8rem;
    text-align: center;
    line-height: 1.2;
}
.form-name-row select:focus {
    border-color: #ff85a2;
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 138, 174, 0.12);
}

#fieldsContainer {
    margin-top: 28px;
}

/* 密码框包装 */
.password-wrapper {
    display: flex; align-items: center; border: 1.5px solid #ecc0cd;
    border-radius: 40px; background: #fff; transition: border-color 0.2s;
}
.password-wrapper:focus-within { border-color: #d47b9a; }
.password-wrapper input {
    flex: 1; min-width: 0; border: none !important; outline: none !important;
    box-shadow: none !important; background: transparent !important;
    padding: 14px 0 14px 18px; font-size: 1rem; color: #2d1e24;
    -webkit-appearance: none; appearance: none; border-radius: 0;
}
.password-wrapper input:-webkit-autofill,
.password-wrapper input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #2d1e24 !important;
}
.password-wrapper input::placeholder { color: #c9a9b6; }
.password-wrapper i {
    padding: 0 18px 0 8px; color: #a87e8f; cursor: pointer;
    font-size: 1.25rem; transition: color 0.2s; line-height: 1;
}
.password-wrapper i:hover { color: #a63c5e; }
.password-hint { margin-top: 6px; font-size: 0.9rem; color: #b38394; }
.password-hint.valid { color: #22c55e; }
.password-hint.invalid { color: #e53e3e; }

/* 表单图标 */
.form-icon-emoji {
    margin-right: 8px; font-size: 1.4rem; vertical-align: middle; display: inline-block;
}

/* 页脚版权（后台通用） */
.copyright {
    text-align: center; margin-top: 40px; padding: 20px 0;
    color: #b38394; font-size: 0.95rem;
    border-top: 2px solid #ffe0f0;
}
.copyright a { color: #a63c5e; text-decoration: none; font-weight: 600; }
.copyright i { margin: 0 6px; color: #ff9ebb; }

.header-left { display: flex; align-items: center; gap: 12px; }
.header-logo {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    border: 2px solid #ffd966; background: #fff;
}
.page-label {
    display: inline-block;
    margin-left: 12px;
    padding: 4px 14px;
    background: transparent;
    border: 2px solid #fbb1c2;
    border-radius: 40px;
    color: #a63c5e;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
}

/* 数据查看页特有 */
.delete-entry-btn {
    background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca;
    padding: 10px 20px; border-radius: 40px; font-size: 1rem;
    font-weight: bold; cursor: pointer; transition: all 0.15s;
    box-shadow: 0 4px 0 #b91c1c; text-decoration: none; display: inline-block;
}
.delete-entry-btn:hover {
    background: #fecaca; transform: translateY(-2px);
    box-shadow: 0 6px 0 #b91c1c; text-decoration: none;
}
.btn-back {
    display: inline-flex; align-items: center; gap: 6px;
    background: white; padding: 12px 24px; border-radius: 60px;
    text-decoration: none; color: #334155; font-weight: 600;
    box-shadow: 0 4px 8px rgba(0,0,0,0.02); border: 1px solid #e9eef2;
    transition: all 0.2s; margin-bottom: 20px;
}
.btn-back:hover {
    background: #fef0f5; border-color: #ffb3c6; transform: translateY(-2px);
    box-shadow: 0 8px 14px rgba(212, 78, 122, 0.08); text-decoration: none;
}
.stats-info {
    background: #f8fafc; padding: 12px 20px; border-radius: 40px;
    margin-bottom: 20px; display: inline-block; border: 1px solid #e2e8f0;
    font-size: 1rem; color: #475569;
}
.stats-info strong { color: #a63c5e; font-size: 1.2rem; margin: 0 4px; }
.print-header { margin-bottom: 30px; }
.print-header h1 { margin-bottom: 10px; padding-bottom: 10px; font-size: 2rem; color: #a63c5e; }
.period-badge {
    background: #ffd966; color: #a63c5e; padding: 6px 16px;
    border-radius: 30px; margin-left: 15px; font-size: 0.9rem; font-weight: 600;
}
.system-name { font-weight: bold; font-size: 1.2rem; }

/* 设置页样式 */
.settings-form {
    background: white; border-radius: 24px; padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-top: 20px;
}
.preview-logo {
    width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
    border: 2px solid #ffd966; margin-right: 16px; background: #fff0f5;
}
.current-file {
    display: flex; align-items: center; background: #fef0f5;
    padding: 10px 16px; border-radius: 40px; margin-bottom: 12px;
}
.btn-submit {
    background: #ff8aae; color: white; border: none; border-radius: 60px;
    padding: 16px 36px; font-size: 1.2rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 6px 0 #c1547a; transition: transform 0.1s, box-shadow 0.1s;
    border: 2px solid #fff2f5;
}
.btn-submit:hover {
    background: #ff7a9f; transform: translateY(-2px); box-shadow: 0 8px 0 #c1547a;
}
.btn-submit:active { transform: translateY(4px); box-shadow: 0 2px 0 #c1547a; }
.file-input-wrapper {
    position: relative; display: inline-block;
}
.file-input-wrapper input { opacity: 0; position: absolute; width: 0.1px; height: 0.1px; }
.file-input-wrapper label {
    background: #fff0dd; border: 2px dashed #fbb1c2; border-radius: 40px;
    padding: 10px 24px; color: #a63c5e; font-weight: 500; cursor: pointer;
    display: inline-block;
}
.rich-editor-toolbar {
    background: #f1f5f9; padding: 8px 12px; border-radius: 20px 20px 0 0;
    display: flex; gap: 5px; flex-wrap: wrap;
}
.rich-editor-toolbar button {
    background: white; border: 1px solid #cbd5e1; border-radius: 20px;
    padding: 5px 12px; cursor: pointer; font-size: 0.9rem;
}
.rich-editor-toolbar button:hover { background: #fbb1c2; border-color: #a63c5e; }
.icon-preview {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.icon-preview span {
    font-size: 1.8rem; background: #fff0f5; padding: 6px 10px;
    border-radius: 40px; border: 1px solid #ffd0dc;
}

/* 微官网管理页样式 */
.banner-preview {
    max-width: 100%; border-radius: 20px; margin: 15px 0;
    border: 3px solid #fbb1c2; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.announcement-item {
    background: #fafcff; padding: 15px 20px; border-radius: 20px;
    margin-bottom: 12px; display: flex; align-items: center; gap: 15px;
    border: 1px solid #f1e7eb;
}
.announcement-content { flex: 1; font-size: 1.1rem; color: #334155; display: flex; align-items: center; }
.announcement-text { flex: 1; }
.edit-area { display: none; width: 100%; }
.edit-area textarea {
    width: 100%; border-radius: 20px; padding: 8px 12px;
    border: 2px solid #fbb1c2; font-size: 1rem; resize: vertical;
}
.edit-actions { display: flex; gap: 8px; margin-top: 8px; }
.announcement-actions { display: flex; gap: 8px; }
.btn-icon {
    background: white; border: 1px solid #e2e8f0; font-size: 1rem;
    cursor: pointer; padding: 6px 12px; border-radius: 30px; color: #475569;
    transition: all 0.15s;
}
.btn-icon:hover { background: #f1f5f9; border-color: #cbd5e1; }
.inactive { opacity: 0.5; }
.upload-area {
    border: 3px dashed #fbb1c2; border-radius: 30px; padding: 30px 20px;
    text-align: center; background: #fff9fb; cursor: pointer; margin-bottom: 20px;
}
.upload-area:hover { border-color: #ff8aae; background: #fff0f5; }
.upload-area i { font-size: 3rem; color: #ff8aae; margin-bottom: 12px; }
.upload-area p { color: #a63c5e; font-weight: 600; }
#carouselInput { display: none; }
.section-title { margin: 30px 0 20px; font-size: 1.6rem; color: #a63c5e; }
.save-order-btn { margin-top: 20px; margin-bottom: 10px; }
.hint-text { margin-top: 12px; color: #64748b; font-size: 0.9rem; }
.carousel-list { display: flex; flex-direction: column; gap: 15px; margin: 20px 0; }
.carousel-item {
    background: #fff9fb; border-radius: 24px; padding: 15px 20px;
    border: 2px solid #ffe1b3; display: flex; align-items: center; gap: 20px;
    box-shadow: 0 3px 0 #fbc0cf;
}
.carousel-preview {
    width: 120px; height: 80px; object-fit: cover; border-radius: 16px;
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.carousel-info { flex: 1; display: flex; align-items: center; gap: 15px; }
.carousel-actions { display: flex; gap: 10px; }
.btn-replace { background: #e0f2fe; border-color: #7dd3fc; }
.upload-limit-info { margin: 10px 0; font-size: 0.9rem; color: #64748b; }
.replace-file-input { display: none; }

/* 卡片统一增强 */
.recommend-section,
.avatar-upload-box,
.settings-box {
    background: #fafcff;
    border-radius: 24px;
    padding: 24px;
    margin: 20px 0;
    border: 2px solid #f1e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.recommend-section { background: #fff9fb; border-color: #ffd0dc; }
.avatar-upload-box { background: #fff9fb; border-color: #ffd0dc; }
.settings-box { background: #fafcff; }

.recommend-title { font-size: 1.4rem; font-weight: 700; color: #a63c5e; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.recommend-list { margin-top: 25px; }
.recommend-item {
    background: white; border-radius: 20px; padding: 12px 18px; margin-bottom: 10px;
    border: 2px solid #ffd0dc; box-shadow: 0 3px 0 #fbb1c2; display: flex; align-items: center; gap: 15px; cursor: move;
}
.recommend-item .drag-handle { color: #c94f7c; font-size: 1.4rem; cursor: grab; }
.recommend-info { flex: 1; }
.recommend-info .form-name { font-weight: 700; color: #a63c5e; }
.recommend-info .field-label { color: #b87a8e; font-size: 0.9rem; margin-left: 8px; }
.recommend-info .dish-name { font-size: 1.1rem; font-weight: 600; color: #4a2c3a; margin-top: 4px; }
.recommend-actions button { background: none; border: 1.5px solid #ffb3c6; border-radius: 30px; padding: 6px 14px; color: #a63c5e; font-weight: 600; cursor: pointer; transition: 0.1s; box-shadow: 0 2px 0 #f9c6d4; }
.recommend-actions button:hover { background: #fef0f5; transform: translateY(-2px); box-shadow: 0 4px 0 #f9c6d4; }
.recommend-actions button:active { transform: translateY(2px); box-shadow: none; }

.add-recommend-panel {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start;
    background: #fef0f5; border-radius: 24px; padding: 20px; margin-bottom: 10px;
}
.add-recommend-panel > select { flex: 1 1 180px; min-width: 160px; }
#dishContainer.dish-selector { flex: 2 1 250px; max-height: 200px; overflow-y: auto; border: 2px solid #ffd0dc; border-radius: 20px; padding: 12px; background: white; }
.add-recommend-panel > div:last-child { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

.dish-selector { max-height: 200px; overflow-y: auto; border: 2px solid #ffd0dc; border-radius: 20px; padding: 12px; background: white; }
.dish-checkbox { display: block; padding: 6px 0; }
.badge-count { background: #c94f7c; color: white; border-radius: 30px; padding: 2px 12px; font-size: 0.9rem; margin-left: 12px; }
.sort-hint { font-size: 0.9rem; color: #b87a8e; display: flex; align-items: center; gap: 5px; margin-top: 15px; justify-content: center; }
.remaining-info { font-weight: 600; }
.remaining-info .remaining-number { color: #a63c5e; font-size: 1.2rem; margin: 0 4px; }

/* 头像上传区域：按钮同一行 */
.avatar-upload-box {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.avatar-upload-box img {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    border: 3px solid #ffd0dc; background: #fff; flex-shrink: 0;
}
.avatar-upload-box form {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.avatar-buttons-row {
    display: flex; gap: 12px; align-items: center; flex-wrap: nowrap;
}
.avatar-buttons-row .btn-primary,
.avatar-buttons-row .btn-submit {
    margin-top: 0 !important;
}
.avatar-hint {
    display: block; color: #64748b; font-size: 0.85rem; margin-top: 4px;
}

/* 成功页文案主标题输入框美化（与通用输入框一致） */
#submitSuccessTitle {
    border-radius: 18px !important;
    padding: 12px 18px;
    border: 2px solid #e2e8f0;
    background: white;
    font-size: 1rem;
    transition: border 0.2s, box-shadow 0.2s;
}
#submitSuccessTitle:focus {
    border-color: #ff85a2;
    box-shadow: 0 0 0 4px rgba(255, 138, 174, 0.12);
}

/* 字数提示间距 */
.form-group small {
    display: inline-block;
    margin-left: 12px;
    color: #64748b;
    font-size: 0.85rem;
}

/* 主题选项卡 */
.theme-tab {
    background: white; border: 2px solid #e9eef2; padding: 10px 20px;
    border-radius: 40px; cursor: pointer; font-weight: 600; transition: all 0.2s;
}
.theme-tab.active { background: #ff8aae; color: white; border-color: #ff8aae; }
.theme-tab:hover { background: #fef0f5; border-color: #ffb3c6; }
.theme-tab.active:hover { background: #ff7a9f; border-color: #ff8aae; color: white; }

/* 辅助 */
.new-data-alert { background:#fff9db; border:2px solid #ffd966; border-radius:24px; padding:18px 24px; margin-bottom:28px; }
.new-data-title { font-size:1.2rem; font-weight:700; color:#a63c5e; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.new-data-item { display:inline-block; background:white; border-radius:40px; padding:10px 20px; margin-right:12px; margin-bottom:8px; box-shadow:0 2px 6px rgba(0,0,0,0.03); border:1px solid #ffb3c6; text-decoration:none; color:#334155; }
.new-data-item:hover { background:#fbb1c2; color:#a63c5e; }
.new-data-count { background:#ff8aae; color:white; border-radius:30px; padding:2px 10px; margin-left:8px; font-weight:700; }
.data-count { background: #ff8aae; color: white; border-radius: 20px; padding: 2px 8px; margin-left: 6px; font-size: 0.8rem; font-weight: 700; }
.sortable-ghost { opacity: 0.5; background: #ffe0f0; }
.sortable-drag { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.btn-featured-red { color: #e53e3e !important; font-weight: 600; }
.btn-hidden { opacity: 0.7; }
@keyframes steam { 0%,100% { opacity: 0.6; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
.coffee { animation: steam 2s infinite; display: inline-block; }
.header-right { display: flex; align-items: center; gap: 20px; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.8); border: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #c94f7c; font-size: 0.95rem; box-shadow: 0 1px 3px rgba(0,0,0,0.15); z-index: 30; transition: all 0.2s; border: 1px solid rgba(255,255,255,0.5); -webkit-tap-highlight-color: transparent; outline: none; }
.carousel-arrow:hover { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.carousel-arrow-left { left: 10px; }
.carousel-arrow-right { right: 10px; }
.empty-state { text-align: center; padding: 40px; color: #94a3b8; }
.drag-hint { display: block !important; margin-top: 16px; margin-bottom: 0; padding-left: 20px; padding-right: 20px; padding-bottom: 40px !important; color: #a63c5e; font-size: 0.9rem; }

.content:has(#sortableForms) { padding: 0 !important; border-radius: 24px !important; overflow: hidden !important; }
#sortableForms { margin: 0 !important; }
.content #sortableForms, .content .form-table { margin: 0 !important; border-radius: 0 !important; }
#sortableForms .form-table, .form-table#sortableForms { width: 100% !important; }
.content .new-data-alert, .content .flash-success, .content .drag-hint { padding-left: 20px !important; padding-right: 20px !important; }
.content .drag-hint { padding-bottom: 26px !important; padding-top: 10px !important; }

/* ========== 新订单弹框样式 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(145deg, #fff9fb 0%, #fff0dc 100%);
    border-radius: 36px;
    padding: 36px 32px 28px;
    max-width: 440px;
    width: 100%;
    box-shadow:
        0 20px 50px rgba(212, 78, 122, 0.35),
        0 0 0 6px rgba(255, 138, 174, 0.25),
        0 0 0 14px rgba(255, 255, 255, 0.7);
    text-align: center;
    border: 3px solid #ffd966;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-pop {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-30px);
    }
    60% {
        transform: scale(1.03) translateY(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-icon {
    font-size: 2.6rem;
    line-height: 1;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a63c5e 0%, #e8547f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.modal-body {
    margin-bottom: 28px;
}

.modal-subtitle {
    font-size: 1.15rem;
    font-weight: 500;
    color: #5c3848;
    margin-bottom: 18px;
}

.modal-order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 260px;
    overflow-y: auto;
    padding: 0 4px;
    margin-bottom: 6px;
}

.modal-order-item {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #ffc1d4;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s;
}

.modal-order-item:hover {
    transform: scale(1.02);
    border-color: #ff8aae;
}

.modal-order-item span {
    font-weight: 700;
    color: #3a2530;
    font-size: 1.05rem;
}

.modal-view-link {
    color: #c94f7c;
    font-weight: 700;
    text-decoration: none;
    padding: 6px 18px;
    background: #fff0f5;
    border-radius: 40px;
    border: 2px solid #ffb3c6;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.95rem;
}

.modal-view-link:hover {
    background: #ffb3c6;
    color: #a63c5e;
    border-color: #ff8aae;
}

.modal-footer {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.modal-btn {
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: 2px solid transparent;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

.modal-close-btn {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.modal-close-btn:hover {
    background: #fecaca;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(185, 28, 28, 0.15);
}

.modal-view-all-btn {
    background: #ff8aae;
    color: white;
    border-color: #ff8aae;
    box-shadow: 0 4px 0 #c1547a;
}

.modal-view-all-btn:hover {
    background: #ff7a9f;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #c1547a;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .modal-content {
        padding: 28px 22px 24px;
        border-radius: 28px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
/* ========== 返回顶部按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8aae, #ffb3c6);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(212,78,122,0.3);
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    transform: translateY(10px);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: #ff7a9f;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212,78,122,0.4);
}
.back-to-top i {
    font-size: 1.3rem;
}

/* ========== 字段折叠/展开 ========== */
/* 统一过渡效果 */
.field-row .options-editor,
.field-row .field-extra {
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

/* 展开状态：没有 .collapsed 类 */
.field-row:not(.collapsed) .options-editor,
.field-row:not(.collapsed) .field-extra {
    max-height: 9999px;   /* 足够大，确保内容完全可见 */
    overflow: visible;
    opacity: 1;
    margin-top: 16px;
}

/* 折叠状态 */
.field-row.collapsed .options-editor,
.field-row.collapsed .field-extra {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.toggle-collapse-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 10px;
    cursor: pointer;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toggle-collapse-btn:hover {
    background: #fef0f5;
    border-color: #ffb3c6;
    color: #a63c5e;
}

.field-row.collapsed .toggle-collapse-btn {
    background: #f8fafc;
    border-color: #ffd0dc;
}

/* 图标切换不需要旋转，由 JavaScript 控制类名 */
.field-row .toggle-collapse-btn i {
    transition: none;
}

/* 折叠时隐藏 field-extra 内部元素（保证不可见） */
.field-row.collapsed .field-extra > * {
    display: none;
}

/* ========== 登录页密码框带眼睛图标 ========== */
.login-password-wrapper {
    display: flex;
    align-items: center;
    height: 52px;
    width: 100%;
    border: 2px solid #f9c6d4;
    border-radius: 50px;
    box-sizing: border-box;
    background: white;
    padding: 0 14px 0 14px;
    overflow: hidden;
    margin-bottom: 18px;
}

.login-password-wrapper input[type="password"],
.login-password-wrapper input[type="text"] {
    flex: 1;
    padding: 0 0 0 4px !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 1.1rem !important;
    line-height: 52px !important;
    height: 52px !important;
    min-width: 0;
    margin-bottom: 0 !important;
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
}

.login-password-wrapper .toggle-password-icon {
    cursor: pointer;
    font-size: 1.3rem;
    user-select: none;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-left: 8px;
    line-height: 1;
}

.login-password-wrapper .toggle-password-icon:hover {
    color: #a63c5e;
}