/* LBS管理后台样式 */

body { background: #f0f2f5; }

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    width: 360px;
}

.captcha-img {
    cursor: pointer;
    height: 40px;
    background: #f5f5f5;
    border-radius: 4px;
    width: 120px;
}

.admin-header {
    background: #001529;
    padding: 0 20px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.admin-user {
    color: rgba(255,255,255,0.65);
    font-size: 14px;
}

.admin-tabs {
    background: #fff;
    padding: 0 20px;
    border-bottom: 1px solid #e8e8e8;
}

.tab-btn {
    display: inline-block;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #1890ff;
}

.tab-btn.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
}

.content-box {
    background: #fff;
    margin: 20px;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card.green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card.orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-num {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

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

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

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

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

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

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

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

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
}

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

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

.btn-default {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #333;
}

.btn-default:hover {
    border-color: #1890ff;
    color: #1890ff;
}

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

.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.pagination button {
    padding: 4px 12px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    border-color: #1890ff;
    color: #1890ff;
}

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

.pagination .page-info {
    padding: 4px 12px;
    color: #666;
    font-size: 14px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-box input {
    flex: 1;
    min-width: 150px;
}

.search-box select {
    min-width: 120px;
}

.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.show {
    display: flex;
}

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

.modal-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

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

.hidden {
    display: none !important;
}

.lock-notice {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 5px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-box {
        margin: 10px;
        padding: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box input,
    .search-box select {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }

    .admin-header {
        padding: 0 10px;
    }

    .admin-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab-btn {
        padding: 10px 15px;
    }
}

/* 表格斑马纹 */
.data-table tbody tr:nth-child(odd) {
    background: #fafafa;
}

.data-table tbody tr:nth-child(odd):hover {
    background: #f0f0f0;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #1890ff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Toast提示样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background: #52c41a;
}

.toast-error {
    background: #ff4d4f;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
