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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 登录界面样式 */
#login-page {
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 登录背景形状 */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.login-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: #4CAF50;
    top: -50px;
    left: -50px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: #764ba2;
    bottom: -30px;
    right: -30px;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: #667eea;
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.login-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    transform: translateY(0);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out;
}

.login-logo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.login-logo img:hover {
    transform: scale(1.05) rotate(5deg);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #4CAF50;
    font-size: 28px;
    font-weight: bold;
    position: relative;
    padding-bottom: 15px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.login-container h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 2px;
    animation: growIn 1s ease-out 0.4s both;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* 登录表单样式 */
#login-form {
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

#login-form .form-group {
    position: relative;
    margin-bottom: 25px;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    font-size: 18px;
    color: #999;
    transition: color 0.3s ease;
}

#login-form .form-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

#login-form .form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    background-color: white;
}

#login-form .form-group input:focus + .input-icon {
    color: #4CAF50;
}

#login-form button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#login-form button:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
}

#login-form button:active {
    transform: translateY(0);
}

#login-form button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

#login-form button:hover .btn-icon {
    transform: translateX(5px);
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: #999;
    font-size: 14px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes growIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

/* 密码输入框样式 */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 35px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 16px;
    color: #999;
    background: #f5f5f5;
    border-radius: 3px;
    padding: 2px 5px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: #4CAF50;
    background: #e8f5e8;
}

/* 响应式登录页面 */
@media (max-width: 768px) {
    #login-page {
        padding: 10px;
    }
    
    .login-container {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .login-logo img {
        width: 80px;
        height: 80px;
    }
    
    .login-container h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .login-subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    #login-form .form-group {
        margin-bottom: 20px;
    }
    
    #login-form .form-group input {
        padding: 12px 15px 12px 40px;
        font-size: 14px;
    }
    
    .input-icon {
        font-size: 16px;
        left: 12px;
    }
    
    #login-form button {
        padding: 14px;
        font-size: 14px;
    }
    
    .shape-1 {
        width: 200px;
        height: 200px;
    }
    
    .shape-2 {
        width: 150px;
        height: 150px;
    }
    
    .shape-3 {
        width: 100px;
        height: 100px;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

/* 主界面样式 */
#main-page {
    flex-direction: row;
}

.header {
    position: fixed;
    top: 0;
    left: 200px;
    right: 0;
    height: 60px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #4CAF50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;
    background-color: #333;
    color: white;
    padding-top: 60px;
    z-index: 200;
}

.menu {
    list-style: none;
}

.menu-item {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.menu-item:hover {
    background-color: #555;
}

.menu-item.active {
    background-color: #4CAF50;
}

.menu-icon {
    font-size: 18px;
}

.content {
    margin-left: 200px;
    margin-top: 60px;
    padding: 20px;
    flex: 1;
    overflow: auto;
}

.page-title {
    margin-bottom: 20px;
}

.page-title h2 {
    font-size: 24px;
    color: #333;
}

/* 表格样式 */
.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content.wide {
    max-width: 900px;
}

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

.modal-header h3 {
    margin: 0;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 搜索和筛选 */
.search-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-filter input,
.search-filter select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 5px;
}

.pagination button {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
}

.pagination button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 150;
        padding-top: 10px;
        padding-bottom: 10px;
        background: #333;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .header {
        left: 0;
        top: 0;
        padding: 0 15px;
    }

    .content {
        margin-left: 0;
        margin-top: 120px;
        margin-bottom: 20px;
        padding: 10px;
    }

    .menu {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .menu::-webkit-scrollbar {
        display: none;
    }

    .menu-item {
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 14px;
    }

    .login-container {
        padding: 20px;
        margin: 0 20px;
    }

    .btn-group {
        flex-direction: column;
    }

    .search-filter {
        flex-direction: column;
        gap: 8px;
    }

    .search-filter input,
    .search-filter select,
    .search-filter button {
        width: 100%;
        padding: 8px;
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px;
        font-size: 14px;
    }

    .card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .card-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    /* 表格响应式处理 */
    .table-container {
        overflow-x: auto;
    }

    th, td {
        padding: 6px 8px;
        font-size: 13px;
    }

    .modal-content {
        margin: 10px;
        max-height: 90vh;
        border-radius: 8px;
    }

    .page-title h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    /* 紧凑表单样式 */
    .compact-form {
        padding: 15px;
    }

    .compact-form .form-group {
        margin-bottom: 10px;
    }

    .compact-form .form-group label {
        margin-bottom: 4px;
        font-size: 14px;
        font-weight: bold;
    }

    .compact-form .form-group small {
        font-size: 12px;
        color: #666;
    }

    .compact-form button {
        margin-top: 12px;
        width: 100%;
        padding: 10px;
    }

    /* 图片预览响应式 */
    .image-preview-content {
        max-width: 95%;
        max-height: 90%;
    }

    .image-preview-content img {
        max-width: 100%;
        max-height: 70vh;
    }

    .image-preview-close {
        top: -30px;
        right: -10px;
        font-size: 20px;
    }
}

/* 状态标签 */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status-pending {
    background-color: #ffc107;
    color: #333;
}

.status-approved {
    background-color: #28a745;
    color: white;
}

.status-rejected {
    background-color: #dc3545;
    color: white;
}

.status-shipped {
    background-color: #17a2b8;
    color: white;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.compact-card {
    margin-bottom: 15px;
}

.compact-card .card-title {
    font-size: 16px;
    margin-bottom: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

/* 错误提示 */
.error-message {
    color: #dc3545;
    margin-top: 5px;
    font-size: 14px;
}

/* 成功提示 */
.success-message {
    color: #28a745;
    margin-top: 5px;
    font-size: 14px;
}

/* 角色复选框样式 */
.role-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.role-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-weight: normal;
}

/* 图片预览样式 */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.image-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px 10px;
}

.image-preview-close:hover {
    color: #ff4d4f;
}

/* 紧凑表单 */
.compact-form {
    padding: 15px;
}

.compact-form .form-group {
    margin-bottom: 12px;
}

.compact-form .form-group label {
    font-size: 14px;
    margin-bottom: 4px;
}

.compact-form .form-group input,
.compact-form .form-group select,
.compact-form .form-group textarea {
    padding: 8px;
    font-size: 14px;
}

.compact-form button {
    margin-top: 12px;
}