.coupon-wrap{
    max-width:1100px;
    margin:30px auto;
    padding:0 20px 60px;
    color:#172235;
}

/* 返回后台 */
.coupon-back{
    color:#64748b;
    font-weight:600;
    text-decoration:none;
}
.coupon-back:hover{
    color:#000;
}

/* 顶部快捷按钮 */
.coupon-nav{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
}

.coupon-nav a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:0 14px;
    border:1px solid #d8dee5;
    border-radius:7px;
    color:#172235;
    background:#fff;
    text-decoration:none;
    font-weight:600;
}

.coupon-nav a:hover{
    border-color:#ee8b22;
    color:#ee8b22;
}

/* Card */
.coupon-card{
    background:#fff;
    border:1px solid #d8dee5;
    border-radius:14px;
    padding:24px;
    margin:18px 0;
}

.coupon-card h1,
.coupon-card h2{
    color:#172235;
    margin-top:0;
}

/* 新增/编辑表单 */
.coupon-create{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}

.coupon-create label{
    display:flex;
    flex-direction:column;
    gap:7px;
    font-size:14px;
}

.coupon-wrap input,
.coupon-wrap select,
.coupon-entry input{
    box-sizing:border-box;
    min-width:0;
    height:42px;
    padding:0 12px;
    border:1px solid #d8dee5;
    border-radius:7px;
    font:inherit;
    background:#fff;
    color:#172235;
}

/* 通用主按钮 */
.coupon-wrap button,
.coupon-entry button{
    min-height:40px;
    padding:0 16px;
    border:1px solid #ee8b22;
    border-radius:7px;
    background:#ee8b22;
    color:#000;
    font-weight:700;
    cursor:pointer;
    white-space:nowrap;
}

.coupon-wrap button:hover,
.coupon-entry button:hover{
    background:#f6a449;
}

.coupon-wrap button:disabled,
.coupon-entry button:disabled{
    opacity:.6;
    cursor:wait;
}

.coupon-submit{
    align-self:end;
    display:flex;
    gap:10px;
    align-items:center;
}

.coupon-create [hidden]{
    display:none;
}

/* 搜索区 */
.coupon-search{
    display:grid;
    grid-template-columns:minmax(280px,1fr) max-content max-content;
    gap:10px;
    align-items:center;
}

.coupon-search input{
    width:100%;
}

.coupon-reset{
    min-height:40px;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    border:1px solid #e5e7eb;
    border-radius:7px;
    background:#eef0f2;
    color:#667085;
    text-decoration:none;
    font-weight:700;
    white-space:nowrap;
}

.coupon-reset:hover{
    background:#e2e5e9;
    color:#172235;
}

/* 说明 */
.coupon-note{
    font-size:13px;
    line-height:1.7;
    color:#64748b;
}

.coupon-error{
    color:#b42318;
}

.coupon-message{
    min-height:24px;
    text-align:center;
}

/* 列表 */
.coupon-table{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

.coupon-table table{
    width:100%;
    border-collapse:collapse;
    min-width:850px;
    font-size:14px;
}

.coupon-table th,
.coupon-table td{
    padding:12px;
    text-align:left;
    border-bottom:1px solid #e5e7eb;
    vertical-align:middle;
}

.coupon-table th{
    background:#f5f7fa;
}

/* 操作栏 */
.coupon-table td:last-child{
    white-space:nowrap;
}

.coupon-table td:last-child form{
    display:inline-block;
    margin-left:6px;
}

/* 编辑：蓝色 */
.coupon-edit-btn{
    min-height:36px;
    padding:0 14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    border:0;
    border-radius:7px;
    background:#e4f3ff;
    color:#1672c4;
    font-weight:700;
    text-decoration:none;
}

.coupon-edit-btn:hover{
    background:#d5ecff;
}

/* 停用：红色 */
.coupon-disable-btn{
    background:#fde8eb !important;
    border-color:#fde8eb !important;
    color:#df3d4f !important;
}

/* 启用：青色 */
.coupon-enable-btn{
    background:#e7f8f6 !important;
    border-color:#b9e8e2 !important;
    color:#14847b !important;
}

.coupon-original{
    font-size:17px;
    color:#64748b;
    text-decoration:line-through;
    margin-right:8px;
}

/* 其他 coupon entry */
.coupon-entry{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    max-width:650px;
    margin:20px auto;
}

.coupon-entry input{
    flex:1;
    min-width:150px;
}

/* iPhone 13 mini 375px 为最低要求 */
@media(max-width:700px){

    .coupon-wrap{
        width:100%;
        max-width:100%;
        box-sizing:border-box;
        padding:0 12px 50px;
        margin:18px auto;
    }

    .coupon-card{
        padding:16px;
        border-radius:12px;
    }

    .coupon-nav{
        gap:8px;
    }

    .coupon-nav a{
        min-height:38px;
        padding:0 12px;
        font-size:13px;
    }

    .coupon-create{
        grid-template-columns:1fr;
        gap:12px;
    }

    .coupon-submit{
        width:100%;
    }

    .coupon-submit button,
    .coupon-submit .coupon-reset{
        flex:1;
    }

    /* 搜索框整行，按钮下一排 */
    .coupon-search{
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .coupon-search input{
        grid-column:1 / -1;
    }

    .coupon-search button,
    .coupon-search .coupon-reset{
        width:100%;
    }

    /* 表格保持完整，不压坏 */
    .coupon-table{
        overflow-x:auto;
    }

    .coupon-table table{
        min-width:850px;
    }

    .coupon-table th,
    .coupon-table td{
        padding:10px;
    }

    .coupon-table td:last-child{
        white-space:nowrap;
    }

    .coupon-entry{
        gap:8px;
    }

    .coupon-entry input{
        flex-basis:100%;
    }
}
