/* 管道局设备租赁公司原型图 - 通用样式 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    color: #333333;
    background-color: #F5F7FA;
    min-width: 1366px;
}

/* 色彩规范 */
:root {
    --primary-color: #1E50B3;
    --primary-color-hover: #1a469a;
    --secondary-color: #F5F7FA;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent-color: #FF7D00;
    --error-color: #F53F3F;
    --border-color: #E5E6EB;
    --white: #FFFFFF;
}

/* 容器 */
.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏 */
.top-nav {
    height: 60px;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.top-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    width: 180px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}

.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-menu li {
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.3s;
}

.nav-menu li:hover {
    color: var(--primary-color);
}

.nav-menu li.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.nav-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* 按钮样式 */
.btn {
    padding: 8px 20px;
    height: 36px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-color-hover);
    box-shadow: 0 2px 8px rgba(30, 80, 179, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
}

.btn-danger {
    background: var(--error-color);
    color: var(--white);
}

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

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--white);
}

.btn-icon:hover {
    background: var(--secondary-color);
}

/* 输入框样式 */
.input {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input::placeholder {
    color: var(--text-tertiary);
}

/* 下拉选择框 */
.select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: var(--white);
    cursor: pointer;
}

/* 底部通栏 */
.footer {
    background: var(--secondary-color);
    padding: 30px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    gap: 40px;
}

.footer-left {
    width: 40%;
}

.footer-left p {
    color: var(--text-secondary);
    line-height: 24px;
    margin-bottom: 20px;
}

.footer-qrcode {
    width: 120px;
    height: 120px;
    background: var(--white);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.footer-center {
    width: 30%;
}

.footer-center h3 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-center .input {
    width: 100%;
    margin-bottom: 12px;
}

.footer-center textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.footer-right {
    width: 30%;
}

.footer-right h3 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-right p {
    color: var(--text-secondary);
    line-height: 24px;
    margin-bottom: 8px;
}

/* 卡片样式 */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 弹窗样式 */
.modal {
    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: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

.modal-header {
    height: 48px;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    font-size: 20px;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

/* 分页样式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination-item {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-item.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

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

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 2px;
    margin-right: 4px;
}

.tag-hot {
    background: #FFE8E8;
    color: var(--error-color);
}

.tag-new {
    background: #E8F3FF;
    color: var(--primary-color);
}

.tag-premium {
    background: #FFF3E8;
    color: var(--accent-color);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.table thead {
    background: var(--secondary-color);
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: #FAFBFC;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 空数据提示 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.breadcrumb-item {
    color: var(--text-secondary);
    cursor: pointer;
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    cursor: default;
}

.breadcrumb-separator {
    color: var(--text-tertiary);
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    margin-bottom: 8px;
}

/* 开关按钮 */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 22px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .switch-slider {
    background-color: var(--primary-color);
}

.switch input:checked + .switch-slider:before {
    transform: translateX(22px);
}

/* 内容区域（页面主体） */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 220px);
    padding: 20px 0;
}

/* 响应式处理 */
@media (max-width: 1366px) {
    .container {
        width: 100%;
        max-width: 1200px;
    }
}

/* 复选框样式 */
.checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.checkbox input {
    margin-right: 8px;
    cursor: pointer;
}

/* 单选按钮样式 */
.radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-right: 16px;
}

.radio input {
    margin-right: 8px;
    cursor: pointer;
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    text-decoration: underline;
}

/* 表单组 */
.form-group {
    margin-bottom: 16px;
}

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

.form-control {
    width: 100%;
}

/* 图片缩略图 */
.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

