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

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

.login-body {
    background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2d6a4f;
    font-size: 24px;
    margin-bottom: 5px;
}

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

.login-form {
    display: flex;
    flex-direction: column;
}

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

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

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

.form-group input:focus {
    outline: none;
    border-color: #2d6a4f;
}

/* 登录页增强样式 */
.login-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
}

.field-icon {
    font-size: 16px;
}

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

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

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    padding: 5px;
}

.toggle-password:hover {
    color: #2d6a4f;
}

.field-tip {
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
}

.tip-error {
    color: #dc3545;
}

.tip-ok {
    color: #28a745;
}

.input-error {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.input-ok {
    border-color: #28a745 !important;
    background-color: #f0fff4;
}

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 15px;
    padding: 12px 15px;
    background: #fff5f5;
    border: 1px solid #ffcaca;
    border-radius: 8px;
    line-height: 1.8;
    display: none;
}

.error-message .err-icon {
    font-size: 16px;
    margin-right: 5px;
}

.error-message .err-detail {
    color: #666;
    font-size: 12px;
}

.error-message .err-hint {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

.success-message {
    color: #28a745;
    font-size: 14px;
    margin-top: 15px;
    padding: 12px 15px;
    background: #f0fff4;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    display: none;
}

.success-message .ok-icon {
    font-size: 16px;
    margin-right: 5px;
    font-weight: bold;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.login-footer p {
    color: #999;
    font-size: 12px;
}

#loginBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 106, 79, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
}

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

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

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.error-message {
    color: #dc3545;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

.success-message {
    color: #28a745;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #1b4332 0%, #2d6a4f 100%);
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

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

.sidebar-logo h2 {
    font-size: 18px;
    font-weight: 600;
}

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

.sidebar-menu li {
    margin-bottom: 5px;
}

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

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #95d5b2;
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 220px;
    min-height: 100vh;
}

.header {
    background: #fff;
    padding: 15px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

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

.user-info span {
    margin-right: 15px;
    font-size: 14px;
    color: #666;
}

.user-info button {
    padding: 8px 16px;
    font-size: 13px;
}

.page-container {
    padding: 25px;
}

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    padding: 25px;
    margin-bottom: 25px;
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.card-body {
    min-height: 300px;
}

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

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

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

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

.table .actions {
    display: flex;
    gap: 8px;
}

.table .actions button {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 5px;
}

.pagination button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.pagination button:hover:not(:disabled) {
    background: #2d6a4f;
    color: #fff;
    border-color: #2d6a4f;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    padding: 0 10px;
    font-size: 14px;
}

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

.modal-overlay.active {
    display: flex;
}

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

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 25px;
}

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

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

.dashboard-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.dashboard-card .icon.users { background: #e7f5ff; color: #1971c2; }
.dashboard-card .icon.recyclers { background: #ebfbee; color: #2f9e44; }
.dashboard-card .icon.orders { background: #fff3e0; color: #f59f00; }
.dashboard-card .icon.points { background: #f3d9fa; color: #9b59b6; }

.dashboard-card .info h4 {
    font-size: 14px;
    color: #888;
    margin-bottom: 5px;
}

.dashboard-card .info p {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.search-bar button {
    padding: 10px 20px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending { background: #fff3e0; color: #f59f00; }
.status-approved { background: #ebfbee; color: #2f9e44; }
.status-rejected { background: #ffebee; color: #e53935; }
.status-active { background: #ebfbee; color: #2f9e44; }
.status-disabled { background: #f0f0f0; color: #999; }

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .main-content {
        margin-left: 0;
    }
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}