﻿/* 美像工坊后台管理系统 - 婚纱影楼行业风格 */
/* 响应式设计，适配手机和电脑 */

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

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f0e8 0%, #e8dcc8 100%);
    color: #333;
    min-height: 100vh;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #d4a574 0%, #8b6f47 50%, #5c4a32 100%);
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-box .logo {
    margin-bottom: 30px;
}

.login-box .logo h1 {
    font-size: 28px;
    color: #8b6f47;
    margin-bottom: 8px;
    letter-spacing: 4px;
}

.login-box .logo p {
    color: #999;
    font-size: 14px;
    letter-spacing: 2px;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #d4a574;
    box-shadow: 0 0 0 3px rgba(212,165,116,0.2);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #d4a574 0%, #8b6f47 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 4px;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139,111,71,0.4);
}

/* 后台布局 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #3d2f1f 0%, #2a1f14 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar .logo {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .logo h2 {
    font-size: 20px;
    color: #d4a574;
    margin-bottom: 4px;
    letter-spacing: 3px;
}

.sidebar .logo p {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    letter-spacing: 1px;
}

.sidebar .user-info {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .user-info .user-name {
    display: block;
    font-size: 15px;
    color: #fff;
    margin-bottom: 4px;
}

.sidebar .user-info .user-role {
    display: block;
    font-size: 12px;
    color: #d4a574;
}

.sidebar .menu {
    list-style: none;
    padding: 12px 0;
}

.sidebar .menu-item {
    margin: 2px 0;
}

.sidebar .menu-item a {
    display: block;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar .menu-item a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.sidebar .menu-item.active a {
    color: #d4a574;
    background: rgba(212,165,116,0.1);
    border-left-color: #d4a574;
}

.sidebar .menu-item .logout-btn {
    color: #ff6b6b;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 240px;
    min-height: 100vh;
}

/* 兼容page-header和content-area类名 */
.main-content .page-header,
.main-content .header {
    background: #fff;
    padding: 16px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.main-content .page-header h1,
.main-content .header h1 {
    font-size: 20px;
    color: #3d2f1f;
    font-weight: 600;
}

.main-content .content-area,
.main-content .content {
    padding: 30px;
}

/* 菜单切换按钮兼容 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #3d2f1f;
}

/* 顶部栏 */
.header {
    background: #fff;
    padding: 16px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header h1 {
    font-size: 20px;
    color: #3d2f1f;
    font-weight: 600;
}

.header-right {
    color: #999;
    font-size: 14px;
}

/* 内容区 */
.content {
    padding: 30px;
}

/* 统计卡片 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    border-left: 4px solid #d4a574;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 28px;
    color: #3d2f1f;
    margin-bottom: 8px;
}

.stat-card p {
    color: #999;
    font-size: 14px;
}

/* 面板 */
.panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    overflow: hidden;
}

.panel-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 16px;
    color: #3d2f1f;
    font-weight: 600;
}

.panel-body {
    padding: 24px;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #faf7f2;
    color: #3d2f1f;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e8dcc8;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f0e8;
    color: #666;
}

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

.data-table a {
    color: #d4a574;
    text-decoration: none;
    margin-right: 8px;
}

.data-table a:hover {
    text-decoration: underline;
}

/* 工具栏 */
.toolbar {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* 按钮 */
.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #d4a574 0%, #8b6f47 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139,111,71,0.4);
}

.btn-default {
    background: #f5f0e8;
    color: #666;
    border: 1px solid #e8dcc8;
}

.btn-default:hover {
    background: #e8dcc8;
}

.btn-danger {
    background: #ff6b6b;
    color: #fff;
}

.btn-danger:hover {
    background: #ff5252;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    background: #3d2f1f;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
}

/* 遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.overlay.show {
    display: block;
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 99;
    }

    .mobile-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 12px 16px 12px 60px;
    }

    .page-header {
        padding: 12px 16px 12px 60px;
    }

    .menu-toggle {
        display: block;
    }
    
    .header h1 {
        font-size: 16px;
    }

    .page-header h1 {
        font-size: 16px;
    }
    
    .content {
        padding: 16px;
    }

    .content-area {
        padding: 16px;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card h3 {
        font-size: 22px;
    }
    
    .panel-body {
        padding: 16px;
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .login-box .logo h1 {
        font-size: 24px;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* 状态颜色 */
.status-active {
    color: #52c41a;
    font-weight: 600;
}

.status-inactive {
    color: #ff4d4f;
    font-weight: 600;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d4a574;
    box-shadow: 0 0 0 3px rgba(212,165,116,0.2);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    color: #3d2f1f;
    font-size: 18px;
}

.close-btn {
    cursor: pointer;
    font-size: 24px;
    color: #999;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

.modal-footer {
    margin-top: 20px;
    text-align: right;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* 二维码绑定弹窗样式 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qr-modal.show {
    display: flex;
}

.qr-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.qr-content h3 {
    margin: 0 0 15px 0;
    color: #3d2f1f;
    font-size: 18px;
}

.qr-content img {
    border: 1px solid #eee;
    border-radius: 8px;
    margin: 10px 0;
}

.bind-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 10px;
}

.bind-unbound {
    background: #fff3cd;
    color: #856404;
}

.bind-bound {
    background: #d4edda;
    color: #155724;
}
