/* 地质监督综合工作平台 - 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

/* 顶部导航 */
.header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2c5f8a 100%);
    color: #fff;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header .logo span { color: #ffd700; }

.header .nav {
    display: flex;
    gap: 5px;
}

.header .nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.header .nav a:hover, .header .nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

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

/* 卡片 */

/* 工具栏 */
.toolbar {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 8px 20px rgba(0,0,0,.05);
    margin-bottom: 25px;
    justify-content: flex-start;
    margin-left: 1cm;
}
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: #f7f9fc;
    padding: 15px 20px;
    border-bottom: 1px solid #e8ecf1;
    font-size: 16px;
    font-weight: 600;
    color: #1a3a5c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header .actions { display: flex; gap: 8px; }

.card-body { padding: 20px; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    line-height: 1.5;
}

.btn-primary { background: #1a73e8; color: #fff; }
.btn-primary:hover { background: #1557b0; }

.btn-success { background: #0d7c3f; color: #fff; }
.btn-success:hover { background: #0a5e30; }

.btn-danger { background: #d93025; color: #fff; }
.btn-danger:hover { background: #b3261e; }

.btn-warning { background: #f9ab00; color: #333; }
.btn-warning:hover { background: #d48f00; }

.btn-secondary { background: #5f6368; color: #fff; }
.btn-secondary:hover { background: #4a4d51; }

.btn-outline {
    background: transparent;
    border: 1px solid #dadce0;
    color: #1a73e8;
}
.btn-outline:hover { background: #e8f0fe; border-color: #1a73e8; }

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

/* 表单 */
.form-group { margin-bottom: 15px; }
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #444;
    font-size: 13px;
}
.form-group .hint {
    font-size: 11px;
    color: #888;
    font-weight: normal;
    margin-left: 5px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.15);
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { background: #fff; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-row-4 { grid-template-columns: repeat(4, 1fr); }
.form-row-2 { grid-template-columns: repeat(2, 1fr); }

/* 页面标题 */
.page-title {
    font-size: 22px;
    font-weight: bold;
    color: #1a3a5c;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8ecf1;
}

/* 表格 */
.table-wrapper { overflow-x: auto; }

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

table th {
    background: #f7f9fc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e8ecf1;
    white-space: nowrap;
}

table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

table tr:hover { background: #f8faff; }
table tr:last-child td { border-bottom: none; }

/* 列表视图 */
.well-list { list-style: none; }
.well-list-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}
.well-list-item:hover { background: #f8faff; }
.well-list-item:last-child { border-bottom: none; }

.well-list-item .well-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a3a5c;
}
.well-list-item .well-info {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}
.well-list-item .well-actions { display: flex; gap: 8px; }

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-active { background: #e6f4ea; color: #0d7c3f; }
.badge-completed { background: #e8f0fe; color: #1a73e8; }
.badge-morning { background: #fff8e1; color: #e37400; }
.badge-evening { background: #e8eaf6; color: #3949ab; }
.badge-report { background: #fce4ec; color: #c62828; }

/* 信息展示 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.info-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #1a73e8;
}

.info-item .label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item .value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-top: 2px;
}

/* 提示消息 */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}
.alert-success { background: #e6f4ea; color: #0d7c3f; border: 1px solid #b7e1cd; }
.alert-error { background: #fce8e6; color: #c62828; border: 1px solid #f5c6cb; }
.alert-info { background: #e8f0fe; color: #1a73e8; border: 1px solid #c2d7fc; }

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 12px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}
.empty-state .icon { font-size: 48px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

/* 报告预览 */
.report-section { margin-bottom: 20px; }
.report-section h3 {
    font-size: 15px;
    color: #1a3a5c;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e8ecf1;
}
.report-field {
    display: flex;
    padding: 6px 0;
    border-bottom: 1px dashed #f0f0f0;
}
.report-field .label {
    flex: 0 0 150px;
    font-weight: 600;
    color: #666;
    font-size: 13px;
}
.report-field .value {
    flex: 1;
    color: #333;
}

/* 响应式 */
@media (max-width: 768px) {
    .header { padding: 0 15px; flex-direction: column; height: auto; padding: 10px 15px; gap: 10px; }
    .form-row { grid-template-columns: 1fr !important; }
    .info-grid { grid-template-columns: 1fr; }
    .well-list-item { flex-direction: column; gap: 10px; align-items: flex-start; }
    .container, .container-wide { padding: 0 10px; }
    .card-body { padding: 15px; }
}

/* 打印样式 */
@media print {
    .header, .footer, .actions, .btn, .no-print { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    .container-wide { max-width: 100%; margin: 0; padding: 0; }
    body { background: #fff; font-size: 12px; }
}

/* tab切换 */
.tabs {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 1cm;
}
/* tab卡片（旧tab-item兼容） */
.tab-item {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab-item:hover { color: #1a73e8; }
.tab-item.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

/* 现代卡片式Tab */
.tab {
    background: #fff;
    padding: 18px 28px;
    border-radius: 14px 14px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #55637b;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: .25s;
    box-shadow: 0 4px 15px rgba(0,0,0,.05);
}
.tab:hover {
    transform: translateY(-2px);
}
.tab b {
    background: #edf3ff;
    color: #2d7df6;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 13px;
}
.tab.active {
    color: #2d7df6;
    font-weight: 600;
}
.tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 4px;
    background: #2d7df6;
    border-radius: 4px;
}
.tab span {
    font-size: 18px;
    line-height: 1;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 动态行 */
.dynamic-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}
.dynamic-row .form-control { flex: 1; }
.dynamic-row .btn-remove {
    background: #fce8e6;
    color: #c62828;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
}
.dynamic-row .btn-remove:hover { background: #f5c6cb; }

.btn-add-row {
    background: none;
    border: 1px dashed #dadce0;
    color: #1a73e8;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 5px;
}
.btn-add-row:hover { background: #e8f0fe; }

/* 现代按钮 */
.btn-blue {
    background: linear-gradient(135deg,#2d7df6,#4f9cff);
}
.btn-green {
    background: linear-gradient(135deg,#17b26a,#3acb8f);
}
.btn-gray {
    background: linear-gradient(135deg,#5d6678,#80889a);
}
.btn-orange {
    background: linear-gradient(135deg,#ff8c1a,#ffb347);
}
.btn-yellow {
    background: linear-gradient(135deg,#f4a300,#ffca55);
}
.btn-white {
    background: #fff;
    color: #2d7df6;
    border: 1px solid #d9e2ef;
}
.btn-white:hover {
    background: #f8fbff;
}
