* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #303133;
}

#app {
    width: 100%;
    min-height: 100vh;
}

.el-select-dropdown.search-filter-dropdown,
.el-select-dropdown.view-filter-dropdown {
    width: 100px !important;
    min-width: 100px !important;
}

/* 登录界面样式 */
.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    width: 400px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #303133;
    font-size: 24px;
    font-weight: 600;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-user {
    margin-right: 15px;
    font-size: 14px;
    opacity: 0.9;
}

/* 主容器 */
.container {
    display: flex;
    padding: 20px;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    min-height: 720px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 地图区域 */
.map-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.map-section-full {
    flex: 1 1 100%;
    max-width: 100%;
}

.search-box {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-box .el-input {
    flex: 1;
    min-width: 200px;
}

.search-box .el-button {
    white-space: nowrap;
}

.search-box .el-select {
    width: 100px !important;
    flex: none !important;
}

.search-box .el-select .el-input {
    width: 100px !important;
    flex: none !important;
    min-width: unset !important;
}

.search-box .el-select .el-input__inner {
    width: 100px !important;
    height: 36px !important;
    line-height: 36px !important;
    padding-left: 8px !important;
    padding-right: 25px !important;
}

.search-box .filter-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.search-box .search-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
    margin-top: 17px;
}

.search-box .search-row .el-input {
    flex: 0 0 200px;
    min-width: unset;
    height: 36px;
}

.search-box .search-row .el-input__inner {
    height: 36px !important;
    line-height: 36px !important;
}

.search-box .search-row .el-button {
    height: 36px;
    line-height: 36px;
    padding-top: 0;
    padding-bottom: 0;
}

.search-box .filter-item {
    display: flex;
    flex-direction: column;
    margin-right: 0;
    margin-bottom: 5px;
    width: 100px;
}

.search-box .filter-label-top {
    font-size: 13px;
    color: #606266;
    margin-bottom: 5px;
    white-space: nowrap;
    pointer-events: none;
}

.map-container {
    flex: 1;
    height: 650px;
    min-height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    background: white;
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.map-legend {
    position: absolute;
    top: 40px;
    right: 10px;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.legend-title {
    font-size: 13px;
    font-weight: 600;
    color: #303133;
}

.legend-close-btn {
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
    color: #909399 !important;
}

.legend-close-btn:hover {
    color: #409EFF !important;
}

.show-legend-btn {
    position: absolute;
    top: 40px;
    right: 10px;
    z-index: 100;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-label {
    font-size: 12px;
    color: #606266;
}

#map {
    width: 100%;
    height: 100%;
}

/* 表单区域 */
.form-container {
    width: 420px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    max-height: 720px;
    overflow-y: auto;
}

.form-container::-webkit-scrollbar {
    width: 6px;
}

.form-container::-webkit-scrollbar-thumb {
    background-color: #c0c4cc;
    border-radius: 3px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ebeef5;
}

.form-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
}

/* 商户列表 */
.merchant-list {
    margin: 0 20px 20px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ebeef5;
}

.list-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
}

.list-actions {
    display: flex;
    align-items: center;
}

/* 用户管理页面 */
.user-management-page {
    padding: 20px;
    background-color: white;
}

/* 表格样式优化 */
.el-table {
    border-radius: 8px;
    overflow: hidden;
}

.el-table th {
    background-color: #f5f7fa !important;
    color: #606266;
    font-weight: 600;
}

/* 导入对话框 */
.import-template {
    margin-top: 20px;
    padding: 15px;
    background-color: #f5f7fa;
    border-radius: 6px;
}

.import-template p {
    margin-bottom: 10px;
    color: #606266;
}

/* 响应式布局 */
@media (max-width: 1400px) {
    .container {
        flex-direction: column;
        width: 100%;
    }

    .form-container {
        width: 100%;
        max-height: none;
    }

    .map-container {
        height: 500px;
        min-height: 400px;
        width: 100%;
    }

    .map-section {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .current-user {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .container {
        padding: 10px;
        width: 100%;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .search-box .filter-row {
        width: 100%;
    }

    .search-box .filter-item {
        width: 100%;
    }

    .search-box .filter-select,
    .search-box .view-filter-select {
        width: 100% !important;
    }

    .search-box .search-row {
        width: 100%;
        margin-top: 10px;
    }

    .search-box .search-row .el-input {
        width: 100% !important;
        flex: none;
    }

    .search-box .el-button {
        width: 100%;
        margin-left: 0 !important;
    }

    .map-container {
        height: 400px;
        min-height: 300px;
        width: 100%;
    }

    .map-section {
        width: 100%;
        min-width: unset;
    }

    .map-legend {
        top: 30px;
        right: 5px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .show-legend-btn {
        top: 30px;
        right: 5px;
    }

    .merchant-detail-panel {
        position: fixed;
        right: 10px;
        left: 10px;
        top: 50% !important;
        transform: translateY(-50%);
        width: auto;
        max-height: 80vh;
        z-index: 1000;
    }

    .form-container {
        width: 100%;
        max-height: none;
        padding: 15px;
    }

    .merchant-list {
        margin: 0 10px 10px;
        padding: 15px;
    }

    .list-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .list-actions {
        width: 100%;
    }

    .list-actions .el-input {
        flex: 1;
    }

    .login-box {
        width: 90%;
        padding: 30px 20px;
    }

    .main-tabs {
        margin: 0 10px 10px;
    }

    .el-table {
        font-size: 12px;
    }

    .el-table__header th,
    .el-table__body td {
        padding: 8px 4px;
    }
}

/* 地图信息窗口样式 - 移除所有阴影 */
.qqmaps-info-window,
.qqmaps-info-window-content,
.qqmaps-info-window-content > div,
.qqmaps-info-window-content > div > div,
.qqmaps-info-window > div,
.qqmaps-info-window > div > div {
    border-radius: 8px;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    filter: none !important;
    position: absolute !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* 商户详情悬浮面板 */
.merchant-detail-panel {
    position: absolute;
    right: 210px;
    top: 10px;
    width: 320px;
    max-height: calc(100% - 30px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
    color: white;
}

.detail-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.detail-content {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.detail-row {
    display: flex;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    line-height: 1.6;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
    font-weight: 500;
    min-width: 90px;
    flex-shrink: 0;
}

.detail-value {
    color: #333;
    word-break: break-all;
}

.detail-actions {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* 商户标记样式 */
.merchant-label {
    cursor: pointer;
    user-select: none;
}

.marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.marker-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.marker-icon::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.marker-name {
    margin-top: 4px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #303133;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 1px solid #ebeef5;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merchant-label:hover .marker-name {
    background: #409EFF;
    color: white;
}

.merchant-label:hover .marker-icon {
    background: linear-gradient(135deg, #66b1ff 0%, #409EFF 100%);
    transform: rotate(-45deg) scale(1.1);
}

/* 按钮组 */
.el-button {
    border-radius: 4px;
}

.el-button--primary {
    background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
    border: none;
}

.el-button--success {
    background: linear-gradient(135deg, #67C23A 0%, #85ce61 100%);
    border: none;
}

.el-button--danger {
    background: linear-gradient(135deg, #F56C6C 0%, #f78989 100%);
    border: none;
}

/* 表单元素 */
.el-input__inner,
.el-textarea__inner {
    border-radius: 4px;
}

.el-select {
    width: 100%;
}

/* 标签 */
.el-tag {
    border-radius: 4px;
}

/* 上传区域 */
.upload-demo .el-upload-dragger {
    width: 100%;
    height: 180px;
}

/* 页面内容区域 */
.page-content {
    margin: 0 20px 20px;
    min-height: 700px;
}

.map-page, .merchant-list-page {
    width: 100%;
    min-height: 700px;
}

/* 商户列表页面样式 */
.merchant-list-page {
    padding: 20px;
    background-color: white;
}

/* 灶具选择器样式 - 新版 */
.stove-dropdown-section {
    margin-bottom: 10px;
}

.stove-count-section {
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 10px;
    background-color: #f5f7fa;
}

.stove-count-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
    flex-wrap: wrap;
}

.stove-count-item:last-child {
    margin-bottom: 0;
}

.stove-name {
    min-width: 100px;
    font-weight: 500;
    color: #606266;
}

.stove-unit {
    color: #909399;
    font-size: 13px;
}

.stove-summary {
    margin-top: 8px;
    padding: 8px;
    background-color: #ecf5ff;
    border-radius: 4px;
    color: #409EFF;
    font-size: 13px;
}

/* 悬浮添加商户表单样式 */
.merchant-form-float {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 420px;
    max-height: calc(100% - 20px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 500;
    display: flex;
    flex-direction: column;
}

.merchant-form-float .form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.merchant-form-float .form-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.merchant-form-float .form-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .merchant-form-float {
        width: calc(100% - 20px);
        max-height: 80vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}
