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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
}

.header {
    background: #0066CC;
    color: white;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    position: relative;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.container {
    display: flex;
    height: calc(100vh - 64px);
}

.sidebar {
    width: 220px;
    background: white;
    border-right: 1px solid #e8e8e8;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #f0f2f5;
}

.menu-item {
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 14px;
}

.menu-item:hover {
    background: #e6f7ff;
    color: #0066CC;
}

.menu-item.active {
    background: #e6f7ff;
    color: #0066CC;
    border-right: 3px solid #0066CC;
    font-weight: 500;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #1f1f1f;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #0066CC;
}

.stat-value {
    font-size: 30px;
    font-weight: bold;
    color: #0066CC;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #888;
}

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

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    background: #fafafa;
    font-weight: 500;
    color: #555;
}

.table tr:hover {
    background: #fafafa;
}

.btn {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #0066CC;
    color: white;
}

.btn-primary:hover {
    background: #004d99;
}

.btn-success {
    background: #52c41a;
    color: white;
}

.btn-danger {
    background: #ff4d4f;
    color: white;
}

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

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-on_shelf,
.status-active,
.status-verified,
.status-paid,
.status-recruiting {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-off_shelf,
.status-blocked,
.status-cancelled,
.status-unavailable {
    background: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}

.status-pending {
    background: #fffbe6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    width: 700px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.image-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.image-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.image-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.image-card .image-info {
    padding: 8px;
    font-size: 11px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
}

.image-card .image-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: none;
}

.image-card:hover .image-actions {
    display: flex;
    gap: 4px;
}

.image-card .btn-delete-img {
    background: rgba(255, 77, 79, 0.85);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
}

.image-card .btn-copy-img {
    background: rgba(0, 102, 204, 0.85);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
}

.image-card .image-placeholder {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #bbb;
    font-size: 12px;
}

.required::after {
    content: " *";
    color: #ff4d4f;
    margin-left: 4px;
}

.hint {
    font-size: 12px;
    color: #8c8c8c;
    margin-top: 4px;
    display: block;
}

#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 2000;
    display: none;
    font-size: 14px;
}

/* 登录界面样式 */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0066CC 0%, #004d99 50%, #003366 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 28px;
    color: #0066CC;
    margin-bottom: 8px;
}

.login-logo p {
    color: #888;
    font-size: 14px;
}

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

.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.login-form .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0066CC, #004d99);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user span {
    font-size: 14px;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.table-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.operation-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}
