/* ==========================================================
   花漾集花卉商城 · 全站基础样式
   风格：森野质感（森野绿 + 花蜜金 + 花粉橘 / 描边卡片 / 微立体）
   ========================================================== */

:root {
    /* 主色：森野绿（水色、专业感） */
    --c-primary:        #2f7d4f;
    --c-primary-dark:   #1e5735;
    --c-primary-light:  #5da87c;
    --c-primary-soft:   #eaf5ee;

    /* 辅助：花蜜金 / 叶绿 / 花粉橘 / 灰绿 */
    --c-gold:      #d9a13b;
    --c-gold-soft: #fbf3e0;
    --c-green:     #4a9b6e;
    --c-berry:     #e08a7e;
    --c-pink:      #e08a7e;
    --c-pink-soft: #fdeee9;
    --c-blue:      #6fa487;
    --c-blue-soft: #eaf4ec;
    --c-purple:    #4a7059;
    --c-purple-soft: #ecf3ea;

    /* 中性：草木灰绿 */
    --c-text:      #1f2a1c;
    --c-text-2:    #55654f;
    --c-text-3:    #8a9a83;
    --c-border:    #e2ebe0;
    --c-border-2:  #cbdcc6;
    --c-bg:        #f7f9f5;
    --c-bg-2:      #eef4ea;
    --c-white:     #ffffff;

    /* 状态 */
    --c-warn:    #d99b2f;
    --c-success: #2f8a5f;
    --c-danger:  #c94f45;
    --c-info:    #6fa487;

    /* 阴影 & 圆角：森绿投影，克制不喧哗 */
    --shadow-sm: 0 1px 2px rgba(30, 87, 53, .05), 0 2px 10px rgba(30, 87, 53, .06);
    --shadow:    0 2px 4px rgba(30, 87, 53, .06), 0 12px 26px rgba(30, 87, 53, .1);
    --shadow-lg: 0 4px 8px rgba(30, 87, 53, .07), 0 22px 46px rgba(30, 87, 53, .14);
    --radius-sm: 10px;
    --radius:    14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    /* 描边 */
    --line: 1.5px solid #e2ebe0;
    --line-strong: 1.5px solid #cbdcc6;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--c-text);
    background: var(--c-bg);
    background-image:
        radial-gradient(circle at 8% 6%, rgba(217, 161, 59, .07), transparent 30%),
        radial-gradient(circle at 92% 10%, rgba(93, 168, 124, .08), transparent 32%),
        radial-gradient(circle at 50% 100%, rgba(74, 155, 110, .06), transparent 40%);
    background-attachment: fixed;
}

a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-primary-dark); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5 {
    margin: 0 0 .6em;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: .2px;
}
h1 { font-size: 27px; }
h2 { font-size: 22px; }
h3 { font-size: 17.5px; }

p { margin: 0 0 1em; }

input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ---------------- 布局 ---------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm { max-width: 560px; }
.container-md { max-width: 820px; }

.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.col { padding: 0 10px; flex: 1; }

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--c-text-3); }
.text-primary { color: var(--c-primary); }
.text-danger { color: var(--c-danger); }
.text-success { color: var(--c-success); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 16px; }
.fw-600 { font-weight: 700; }
.hidden { display: none !important; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 3px solid #e2ebe0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 70px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 20px;
    font-weight: 800;
    color: var(--c-text);
    letter-spacing: .5px;
    white-space: nowrap;
}
.brand:hover { color: var(--c-primary); }
.brand .logo {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #5da87c, #2f7d4f 55%, #1e5735);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 8px rgba(18, 54, 75, .22);
    transition: transform .3s;
}
.brand:hover .logo { transform: scale(1.05); }

.main-nav { display: flex; gap: 6px; flex: 1; }
.main-nav a {
    color: var(--c-text-2);
    font-size: 14.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    position: relative;
    white-space: nowrap;
    transition: all .2s;
}
.main-nav a:hover { background: var(--c-primary-soft); color: var(--c-primary); }
/* 当前所处栏目加底色，让「选中」一眼可见 */
.main-nav a.active {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--c-primary-light), var(--c-primary));
    box-shadow: 0 2px 8px rgba(18, 54, 75, .2);
}
.main-nav a.active:hover { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--c-white);
    color: var(--c-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
    line-height: 1.45;
    text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

.btn-primary {
    background: linear-gradient(135deg, #4a9670, #2f7d4f 60%, #1e5735);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(18, 54, 75, .2), 0 8px 20px rgba(30, 87, 53, .18);
}
.btn-primary:hover {
    color: #fff;
    box-shadow: 0 3px 8px rgba(18, 54, 75, .24), 0 12px 28px rgba(30, 87, 53, .26);
}

.btn-ghost {
    background: #fff;
    border-color: var(--c-border-2);
    color: var(--c-text-2);
}
.btn-ghost:hover { border-color: var(--c-primary-light); color: var(--c-primary); background: var(--c-primary-soft); }

.btn-soft {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    border-color: #cbdcc6;
}
.btn-soft:hover { background: #dfeaf1; color: var(--c-primary-dark); }

.btn-danger { background: var(--c-danger); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(207, 63, 52, .22); }
.btn-danger:hover { color: #fff; }

.btn-success { background: var(--c-success); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(47, 138, 104, .22); }
.btn-success:hover { color: #fff; }

.btn-sm { padding: 6px 15px; font-size: 12.5px; }
.btn-lg { padding: 13px 32px; font-size: 15.5px; }
.btn-block { width: 100%; }

/* ---------------- 表单 ---------------- */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--c-text-2);
}
.form-label .req { color: var(--c-danger); margin-left: 3px; }

.form-control {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-white);
    color: var(--c-text);
    transition: all .2s;
    outline: none;
}
.form-control:focus {
    border-color: var(--c-primary-light);
    box-shadow: 0 0 0 3px rgba(93, 168, 124, .14);
}
.form-control::placeholder { color: #a3b1bb; }
.form-control:disabled { background: var(--c-bg-2); cursor: not-allowed; }

textarea.form-control { resize: vertical; min-height: 90px; line-height: 1.7; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2352616e' d='M1.4 0L6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-hint { margin-top: 5px; font-size: 12.5px; color: var(--c-text-3); }
.form-error { margin-top: 5px; font-size: 12.5px; color: var(--c-danger); }
.form-control.is-invalid { border-color: var(--c-danger); background: #fbeeeb; }
.form-control.is-invalid:focus { border-color: var(--c-danger); box-shadow: 0 0 0 4px rgba(207, 63, 52, .14); }

.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; }

/* 复选框 */
.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--c-text-2);
    user-select: none;
}
.checkbox input { width: 16px; height: 16px; accent-color: var(--c-primary); cursor: pointer; margin: 0; }

/* 协议确认区块 */
.agree-box {
    background: var(--c-bg-2);
    border: var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.agree-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 7px;
}
.agree-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    line-height: 1.6;
}
.agree-list li .n {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--c-primary);
    color: var(--c-white);
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(2px);
}
.agree-list li a {
    color: var(--c-primary);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.agree-list li a:hover { text-decoration: underline; }
.agree-list li .desc { color: var(--c-text-3); font-size: 12px; }
@media (max-width: 640px) {
    .agree-list li .desc { display: none; }
}

/* ---------------- 卡片 ---------------- */
.card {
    background: var(--c-white);
    border: var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-head {
    padding: 16px 20px;
    border-bottom: var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #f7f9f5, #f4f8f1);
}
.card-head h3 { margin: 0; font-size: 16px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }

/* ---------------- 徽标 / 标签 ---------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}
.badge-warn    { background: var(--c-gold-soft);  color: #b57d00; }
.badge-success { background: #e6f2ee;             color: #2f8a5f; }
.badge-danger  { background: #fbeeea;             color: #c0402f; }
.badge-info    { background: var(--c-blue-soft);  color: #1080c0; }
.badge-primary { background: var(--c-primary-soft); color: var(--c-primary); }
.badge-muted   { background: #eef1f4;             color: var(--c-text-3); }

.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: var(--c-purple-soft);
    color: var(--c-purple);
    font-size: 11.5px;
    font-weight: 600;
    margin-right: 5px;
}

/* ---------------- 提示条 ---------------- */
.alert {
    padding: 13px 17px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13.5px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.6;
    border: 2.5px solid transparent;
}
.alert-info    { background: var(--c-blue-soft); color: #1476ae; border-color: #c2e8fb; }
.alert-success { background: #e6f2ee; color: #2f8a5f; border-color: #cfe4dc; }
.alert-warn    { background: var(--c-gold-soft); color: #8a6414; border-color: #f2e0b8; }
.alert-error   { background: #fbeeea; color: #b23a2c; border-color: #eecdc6; }

/* Toast */
.toast-wrap {
    position: fixed;
    top: 84px; left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
}
.toast {
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    background: rgba(53, 38, 74, .94);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 8px 0 rgba(30, 87, 53, .16), 0 16px 34px rgba(30, 87, 53, .24);
    animation: toastIn .32s cubic-bezier(.34, 1.56, .64, 1);
    max-width: 90vw;
}
.toast.success { background: linear-gradient(135deg, #4a9b6e, #2f8a5f); }
.toast.error   { background: linear-gradient(135deg, #d9634f, #c94f45); }
.toast.warn    { background: linear-gradient(135deg, #d9a13b, #d99b2f); color: #6b4a10; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-16px) scale(.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------- 表格 ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.table th {
    padding: 13px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--c-text-2);
    background: linear-gradient(135deg, #f7f9f5, #eef4ea);
    white-space: nowrap;
    border-bottom: var(--line);
}
.table td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--c-border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f1f6f9; }
.table .actions { white-space: nowrap; }
.table .actions .btn { margin-right: 5px; }
.table .actions .btn:last-child { margin-right: 0; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; justify-content: center; margin: 26px 0 8px; }
.pager ul {
    display: flex;
    gap: 7px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.pager a, .pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 11px;
    border-radius: var(--radius-sm);
    border: 2.5px solid var(--c-border);
    background: var(--c-white);
    color: var(--c-text-2);
    font-size: 13.5px;
    font-weight: 600;
    transition: all .2s;
}
.pager a:hover { border-color: var(--c-primary-light); color: var(--c-primary); transform: translateY(-2px); }
.pager .active a, .pager .active span {
    background: linear-gradient(135deg, var(--c-primary-light), var(--c-primary));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 0 rgba(18, 54, 75, .3);
}
.pager .disabled span { opacity: .4; }

/* ---------------- 空状态 ---------------- */
.empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--c-text-3);
}
.empty .icon { font-size: 52px; margin-bottom: 12px; opacity: .9; }
.empty p { margin: 0 0 16px; font-size: 14.5px; }

/* ---------------- 页脚 ---------------- */
.site-footer {
    margin-top: 60px;
    padding: 40px 0 28px;
    background: linear-gradient(180deg, #f5f9f2, #edf4e9);
    border-top: 3px solid #e2ebe0;
    color: var(--c-text-3);
    font-size: 13px;
}
.site-footer .foot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 24px;
}
.site-footer .foot-col h4 {
    font-size: 14px;
    color: var(--c-text);
    margin-bottom: 10px;
    font-weight: 800;
}
.site-footer .foot-col a {
    display: block;
    color: var(--c-text-3);
    padding: 3px 0;
    font-size: 13px;
}
.site-footer .foot-col a:hover { color: var(--c-primary); }
.site-footer .copyright {
    padding-top: 18px;
    border-top: 2px dashed var(--c-border-2);
    text-align: center;
    font-size: 12.5px;
    color: var(--c-text-3);
}

/* ---------------- 模态框 ---------------- */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(53, 38, 74, .42);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
    background: var(--c-white);
    border-radius: var(--radius-lg);
    border: 3px solid #e2ebe0;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn .3s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(22px) scale(.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
    padding: 18px 22px;
    border-bottom: var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f7f9f5, #f4f8f1);
}
.modal-head h3 { margin: 0; font-size: 16.5px; }
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--c-text-3);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    border-radius: 50%;
    transition: all .2s;
}
.modal-close:hover { color: var(--c-primary); transform: rotate(90deg); }
.modal-body { padding: 22px; }
.modal-foot {
    padding: 16px 22px;
    border-top: var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---------------- 工具类：图片占位 ---------------- */
.img-ph {
    background: linear-gradient(135deg, #f3f8f0, #ebf2e7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-primary-light);
    font-size: 40px;
}

/* ---------------- 滚动条 ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--c-border-2);
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--c-primary-light); background-clip: content-box; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .container { padding: 0 16px; }
    h1 { font-size: 23px; }
}
@media (max-width: 600px) {
    .site-header .inner { height: 62px; gap: 14px; }
    .brand { font-size: 17.5px; }
    .brand .logo { width: 32px; height: 32px; font-size: 17px; border-radius: 11px; }
    .card-body { padding: 16px; }
    .form-row { flex-direction: column; gap: 0; }
    .table th, .table td { padding: 10px 10px; }
}
