/* 基础样式 */
body {
    font-family: 'Comic Sans MS', 'Marker Felt', 'Arial Rounded MT Bold', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #5a3d5a; /* 紫色系文字 */
    background-color: #fff5f7; /* 浅粉色背景 */

    background-attachment: fixed;
    background-size: cover;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: #ff9eb7; /* 粉红色 */
    color: white;
    padding: 1rem 0;
    border-bottom: 3px dashed #ff6b8b; /* 虚线边框 */
    box-shadow: 0 4px 8px rgba(255, 105, 180, 0.2);
}

header h1 {
    margin: 0;
    display: inline-block;
    font-size: 2rem;
    text-shadow: 2px 2px 0 #ff6b8b;
    background: linear-gradient(to right, #ff6b8b, #ff8fab);
    /*-webkit-background-clip: text;*/
    /*-webkit-text-fill-color: transparent;*/
    padding: 0.5rem;
    border-radius: 10px;
}

nav {
    float: right;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    padding: 0.5rem 1rem;
    /*background-color: #ff6b8b;*/
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: bold;
}

nav a:hover {
    /*background-color: #ff4757;*/
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    background-color: #ff6b81;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn:hover {
    background-color: #ff4757;
}

.error {
    color: #ff4757;
    margin-bottom: 1rem;
}

/* 仪表盘样式 */
.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.partner-info {
    background-color: #f8f9fa;
    padding: 0rem;
    border-radius: 0px;
    margin-top: 0rem;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* 按钮组 */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.btn-reject {
    background-color: #ff4757;
}

.btn-approve {
    background-color: #2ed573;
}

/* 列表样式 */
ul {
    list-style: none;
    padding: 0;
}

li {
    background-color: #f8f9fa;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* 菜品管理样式 */
.dishes-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.dishes-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.dish-card, .partner-info, .modal-content {
    background-color: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 158, 183, 0.3);
    border: 2px solid #ffd6e0;
    transition: transform 0.3s ease;
}

.dish-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.dish-placeholder {
    background-color: #ffebf0;
    color: #ff6b8b;
    font-size: 1.2rem;
}
.dish-card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.btn {
    background-color: #ff6b8b;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
    background-color: #ff4757;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-approve {
    background-color: #a8e6cf; /* 薄荷绿 */
}

.btn-reject {
    background-color: #ffaaa5; /* 浅珊瑚色 */
}
.dish-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}
footer {
    background-color: #ff9eb7;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 3px dashed #ff6b8b;
    font-size: 1rem;
}

footer p {
    margin: 0;
    text-shadow: 1px 1px 0 #ff6b8b;
}

.dish-placeholder {
    width: 100%;
    height: 150px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #666;
}

.dish-meta {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    color: #666;
}

.dish-actions {
    display: flex;
    gap: 0.5rem;
}

/* 订单状态徽章 */
.status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
}
.status-pending   { background: #fff3cd; color: #856404; }
.status-preparing { background: #cce5ff; color: #004085; }
.status-completed { background: #ffe0ec; color: #a83a66; }
.status-confirmed { background: #d4edda; color: #155724; }

/* 订单操作按钮 */
.order-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(255, 107, 139, 0.25);
}
.order-btn:hover { transform: translateY(-2px); }
.order-btn:active { transform: translateY(1px); }
.order-btn-pink    { background: #ff6b8b; color: white; }
.order-btn-pink:hover    { background: #ff4757; }
.order-btn-green  { background: #a8e6cf; color: #5a3d5a; }
.order-btn-green:hover  { background: #8fd3bd; }
.order-btn-outline { background: white; color: #ff6b8b; border: 1.5px solid #ffb6c9; }
.order-btn-outline:hover { background: #ffe9f1; }


/* ===== 家务管理 / 订单 共用样式（粉白卡片体系） ===== */
.housework-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
    background-color: #fff9fb;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(255, 158, 183, 0.3);
}

.housework-section {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(255, 158, 183, 0.2);
    padding: 20px;
    width: 100%;
    border: 2px solid #ffd6e0;
}

/* 折叠面板标题 */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 0;
    user-select: none;
    color: #ff6b8b;
    font-weight: bold;
}

.collapsible-header:hover {
    color: #ff4757;
}

.toggle-icon {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff6b8b;
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* 表格样式 - 响应式设计 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.housework-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
}

.housework-table th,
.housework-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ffd6e0;
}

.housework-table th {
    background-color: #ffebf0;
    font-weight: bold;
    color: #ff6b8b;
}

.housework-table td {
    color: #5a3d5a;
    vertical-align: middle;
}

.housework-table tbody tr:hover td {
    background-color: #fff9fb;
}

.housework-table tbody tr:last-child td {
    border-bottom: none;
}

/* 在小屏幕上将表格转换为卡片布局 */
@media screen and (max-width: 600px) {
    .housework-table {
        border: 0;
    }

    .housework-table thead {
        display: none;
    }

    .housework-table tr {
        display: block;
        margin-bottom: 15px;
        border: 2px solid #ffd6e0;
        border-radius: 15px;
        padding: 10px;
        background-color: white;
    }

    .housework-table td {
        display: flex;
        justify-content: space-between;
        padding: 10px 12px;
        border-bottom: 1px solid #ffebf0;
        white-space: normal;
    }

    .housework-table td:last-child {
        border-bottom: 0;
    }

    .housework-table td:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
        color: #ff6b8b;
    }

    .housework-table tbody tr:hover td {
        background-color: white;
    }

    .housework-table td button {
        width: auto;
        padding: 8px 16px;
        border-radius: 20px;
    }
}

/* 容器响应式：桌面端卡片并排 */
@media (min-width: 768px) {
    .housework-container {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 20px;
    }

    .housework-section {
        flex: 1 1 calc(50% - 20px);
        min-width: 0;
    }
}

@media (min-width: 992px) {
    .housework-container {
        padding: 25px;
    }

    .housework-section {
        flex: 1 1 calc(33.333% - 20px);
    }

    .housework-table {
        font-size: 15px;
    }
}

.hw-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.hw-images img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

/* 表单样式 */
#submit-housework-form, #add-dish-form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}