﻿/* ===== 船舶维修派工管理系统 v2.0 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== 基础 ===== */
body {
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    background: #f4f6f9;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== 布局 ===== */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== 主菜单（左侧） ===== */
.sidebar {
    width: 230px;
    min-width: 230px;
    background: #1e2a3a;
    color: #c8d6e5;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    transition: transform .3s ease;
}
.sidebar-header {
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a2536;
}
.sidebar-header i { font-size: 22px; color: #4fc3f7; }
.sidebar-nav {
    list-style: none;
    padding: 6px 0;
    flex: 1;
    overflow-y: auto;
}
.nav-divider {
    padding: 12px 18px 4px;
    font-size: 10px;
    text-transform: uppercase;
    color: #6b7a8d;
    letter-spacing: 1px;
    font-weight: 600;
}
.nav-link, .nav-sub-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: #aab8c9;
    text-decoration: none;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: all .2s;
    cursor: pointer;
}
.nav-link:hover, .nav-sub-link:hover {
    color: #fff;
    background: rgba(255,255,255,.06);
    border-left-color: rgba(79,195,247,.5);
}
.nav-link.active, .nav-sub-link.active {
    color: #fff;
    background: rgba(79,195,247,.15);
    border-left-color: #4fc3f7;
}
.nav-link i, .nav-sub-link i { font-size: 16px; width: 20px; text-align: center; }
.nav-link .arrow { margin-left: auto; font-size: 10px; transition: transform .2s; }
.nav-link .arrow.open { transform: rotate(90deg); }

.nav-sub { list-style: none; padding: 0; max-height: 0; overflow: hidden; transition: max-height .3s; }
.nav-sub.open { max-height: 500px; }
.nav-sub-link { padding-left: 48px; font-size: 13px; }

.sidebar-footer {
    padding: 10px 18px;
    font-size: 11px;
    color: #6b7a8d;
    border-top: 1px solid rgba(255,255,255,.06);
    text-align: center;
}

/* ===== 顶部导航栏 ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: #fff;
    border-bottom: 1px solid #e4e7ed;
    padding: 0 20px;
    height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar .toggle-btn {
    background: none;
    border: none;
    color: #495057;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.topbar .toggle-btn:hover { background: #f0f2f5; }

/* ===== 顶部标签页 ===== */
.tab-bar {
    background: #f0f2f5;
    border-bottom: 1px solid #e4e7ed;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 36px;
    overflow-x: auto;
    gap: 0;
}
.tab-bar::-webkit-scrollbar { height: 2px; }
.tab-bar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }
.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    font-size: 12.5px;
    color: #6c757d;
    text-decoration: none;
    border-right: 1px solid #e4e7ed;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    height: 100%;
    transition: all .15s;
}
.tab-item:hover { background: #e9ecef; color: #495057; }
.tab-item.active {
    background: #fff;
    color: #4fc3f7;
    font-weight: 600;
    border-bottom: 2px solid #4fc3f7;
}
.tab-item .close-tab {
    font-size: 10px;
    padding: 0 2px;
    margin-left: 2px;
    opacity: 0;
    transition: opacity .15s;
}
.tab-item:hover .close-tab { opacity: .6; }
.tab-item .close-tab:hover { opacity: 1; color: #dc3545; }

/* ===== 主内容 ===== */
.main-content {
    flex: 1;
    margin-left: 230px;
    min-height: 100vh;
}
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 10px;
}
.content-header h5 {
    font-size: 16px;
    font-weight: 600;
    color: #1e2a3a;
    margin: 0;
}
.content-body {
    font-size: 16px; padding: 0 20px 20px; }

/* ===== 卡片 ===== */
.card {
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    background: #fff;
    margin-bottom: 16px;
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #eef0f4;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    color: #1e2a3a;
    border-radius: 6px 6px 0 0 !important;
}
.card-body {
    font-size: 16px; padding: 16px; }

/* ===== 统计卡片 ===== */
.stat-card {
    border-radius: 6px;
    padding: 18px;
    color: #fff;
}
.stat-card .stat-icon { font-size: 32px; opacity: .25; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; }
.stat-card .stat-label { font-size: 12px; opacity: .85; }

/* ===== 表格工具条 ===== */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f8f9fc;
    border-bottom: 1px solid #eef0f4;
    flex-wrap: wrap;
    gap: 8px;
}
.table-toolbar .toolbar-left { display: flex; gap: 4px; align-items: center; }
.table-toolbar .toolbar-right { display: flex; gap: 6px; align-items: center; }
.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12.5px;
    border: 1px solid #dce0e6;
    background: #fff;
    color: #495057;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}
.toolbar-btn:hover { background: #f0f2f5; border-color: #c0c4cc; }
.toolbar-btn i { font-size: 13px; }
.toolbar-btn.btn-primary { background: #4fc3f7; border-color: #4fc3f7; color: #fff; }
.toolbar-btn.btn-primary:hover { background: #29b6f6; border-color: #29b6f6; }
.toolbar-btn.btn-danger { background: #ef5350; border-color: #ef5350; color: #fff; }
.toolbar-btn.btn-danger:hover { background: #d32f2f; border-color: #d32f2f; }
.toolbar-btn.btn-warning { background: #ff9800; border-color: #ff9800; color: #fff; }
.toolbar-btn.btn-warning:hover { background: #f57c00; border-color: #f57c00; }
.toolbar-btn.btn-info { background: #26a69a; border-color: #26a69a; color: #fff; }
.toolbar-btn.btn-info:hover { background: #00897b; border-color: #00897b; }
.toolbar-btn.btn-success { background: #66bb6a; border-color: #66bb6a; color: #fff; }
.toolbar-btn.btn-success:hover { background: #43a047; border-color: #43a047; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table thead th {
    background: #f8f9fc;
    color: #495057;
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 2px solid #eef0f4;
    white-space: nowrap;
    text-align: left;
    font-size: 12.5px;
}
.table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
    font-size: 13px;
    color: #333;
}
.table tbody tr:hover { background: #f5f7fa; }
.table tbody tr:last-child td { border-bottom: none; }

/* ===== 状态标签 ===== */
.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
}
.status-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.green::before { background: #4caf50; }
.status-dot.yellow::before { background: #ff9800; }
.status-dot.red::before { background: #f44336; }
.status-dot.blue::before { background: #2196f3; }
.status-dot.gray::before { background: #9e9e9e; }
.status-dot.teal::before { background: #009688; }

/* ===== 操作用链接按钮 ===== */
.action-links { display: flex; gap: 2px; flex-wrap: nowrap; }
.action-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
    color: #495057;
    text-decoration: none;
    transition: all .15s;
}
.action-link:hover { background: #e9ecef; }
.action-link i { font-size: 13px; }
.action-link.text-primary { color: #2196f3; }
.action-link.text-primary:hover { background: #e3f2fd; }
.action-link.text-success { color: #4caf50; }
.action-link.text-success:hover { background: #e8f5e9; }
.action-link.text-warning { color: #ff9800; }
.action-link.text-warning:hover { background: #fff3e0; }
.action-link.text-danger { color: #f44336; }
.action-link.text-danger:hover { background: #ffebee; }
.action-link.text-info { color: #009688; }
.action-link.text-info:hover { background: #e0f2f1; }

/* ===== 表头操作区 ===== */
.header-actions { display: flex; gap: 4px; }

/* ===== 搜索框 ===== */
.search-box {
    display: flex;
    align-items: center;
    border: 1px solid #dce0e6;
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
}
.search-box input {
    border: none;
    outline: none;
    padding: 4px 8px;
    font-size: 12.5px;
    width: 180px;
    background: transparent;
}
.search-box button {
    border: none;
    background: none;
    padding: 4px 8px;
    color: #999;
    cursor: pointer;
}
.search-box button:hover { color: #333; }

/* ===== 分页 ===== */
.pagination-info {
    font-size: 12px;
    color: #999;
    padding: 8px 16px;
}
.pagination {
    display: flex;
    gap: 2px;
    justify-content: center;
    padding: 10px 0;
}

/* ===== 表单 ===== */
.form-section { margin-bottom: 20px; }
.form-section:last-child { margin-bottom: 0; }
.form-label { font-weight: 500; color: #495057; font-size: 13px; margin-bottom: 4px; }
.form-control, .form-select {
    border: 1px solid #dce0e6;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}
.form-control:focus, .form-select:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 0 .2rem rgba(79,195,247,.2);
    outline: none;
}
.form-control-sm { padding: 4px 8px; font-size: 12px; }
textarea.form-control { resize: vertical; min-height: 60px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 180px; }
.form-actions {
    display: flex;
    gap: 8px;
    padding: 12px 0 0;
    border-top: 1px solid #eef0f4;
    margin-top: 16px;
}

/* ===== 详情页样式 ===== */
.detail-row {
    display: flex;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}
.detail-label {
    min-width: 100px;
    color: #999;
    font-size: 13px;
    flex-shrink: 0;
}
.detail-value {
    flex: 1;
    font-size: 13px;
    color: #333;
}

/* ===== 时间线 ===== */
.timeline { position: relative; }
.timeline-item {
    position: relative;
    padding: 0 0 14px 24px;
    border-left: 2px solid #e4e7ed;
    margin-left: 6px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4fc3f7;
    border: 2px solid #fff;
}
.timeline-item:last-child { border-left-color: transparent; }
.timeline-time { font-size: 11px; color: #999; }
.timeline-text { font-size: 13px; color: #333; margin-top: 2px; }

/* ===== 照片墙 ===== */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photo-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #eee;
    transition: transform .15s;
}
.photo-grid img:hover { transform: scale(1.05); }
.photo-caption { font-size: 11px; color: #999; margin-top: 2px; text-align: center; }

/* ===== Badge ===== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 10px;
}
.badge-secondary { background: #e4e7ed; color: #666; }
.badge-warning { background: #fff3e0; color: #e65100; }
.badge-primary { background: #e3f2fd; color: #1565c0; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-info { background: #e0f2f1; color: #00695c; }
.badge-dark { background: #e0e0e0; color: #333; }
.badge-teal { background: #e0f2f1; color: #004d40; }

/* ===== 颜色背景 ===== */
.bg-ocean { background: linear-gradient(135deg, #26a69a, #00897b); }
.bg-warm { background: linear-gradient(135deg, #ff9800, #f57c00); }
.bg-sky { background: linear-gradient(135deg, #42a5f5, #1e88e5); }
.bg-rose { background: linear-gradient(135deg, #ef5350, #d32f2f); }
.bg-teal { background: linear-gradient(135deg, #26a69a, #00695c); }
.bg-purple { background: linear-gradient(135deg, #ab47bc, #7b1fa2); }

/* ===== 登录页 ===== */
.login-page {
    background: linear-gradient(135deg, #1a2332, #2c3e50);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: #fff;
    border-radius: 8px;
    padding: 36px;
    width: 380px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo i { font-size: 48px; color: #4fc3f7; }
.login-logo h3 { margin-top: 8px; font-weight: 700; font-size: 20px; }

/* ===== Alert ===== */
.alert {
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
    border: 1px solid transparent;
}
.alert-info { background: #e3f2fd; border-color: #bbdefb; color: #1565c0; }
.alert-success { background: #e8f5e9; border-color: #c8e6c9; color: #2e7d32; }
.alert-warning { background: #fff3e0; border-color: #ffe0b2; color: #e65100; }
.alert-danger { background: #ffebee; border-color: #ffcdd2; color: #c62828; }

/* ===== 侧栏遮罩 ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    z-index: 1049;
}

/* ===== 响应式 ===== */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
    .main-content { margin-left: 0; }
    .content-body {
    font-size: 16px; padding: 0 12px 12px; }
    .search-box input { width: 120px; }
}

/* ===== 打印 ===== */
/* ===== 分页 ===== */
.pagination { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.pagination .page-item { display: inline-block; }
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    font-size: 12px;
    border: 1px solid #dce0e6;
    border-radius: 3px;
    color: #495057;
    text-decoration: none;
    background: #fff;
    transition: all .15s;
}
.pagination .page-link:hover { background: #f0f2f5; border-color: #c0c4cc; }
.pagination .page-item.active .page-link {
    background: #4fc3f7;
    border-color: #4fc3f7;
    color: #fff;
}
.pagination .page-item.disabled .page-link {
    color: #ccc;
    cursor: default;
    background: #fafafa;
}
.pagination-info { font-size: 12px; color: #999; }

@media print {
    .sidebar, .topbar, .tab-bar, .sidebar-overlay,
    .table-toolbar, .form-actions, .action-links,
    .header-actions, .no-print { display: none !important; }
    .main-content { margin-left: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ===== 全局字号加大 ===== */
.table td, .table th, .table .small, small, .text-muted, .badge, .btn, .form-control, .nav-link span {
    font-size: 15px !important;
}
.table td .bi, .table th .bi { font-size: 15px !important; }
.btn-sm { font-size: 15px !important; padding: 5px 12px !important; }
.badge { font-size: 15px !important; }
.small, small { font-size: 15px !important; }
.card-header { font-size: 16px !important; }
.pagination-info { font-size: 15px !important; }

}