/* 浦观律所管理系统样式 */
:root {
    --primary: #1a3a6b;
    --primary-light: #2d5aa0;
}

body {
    font-family: "Microsoft YaHei", "SimSun", sans-serif;
    background-color: #f5f6f8;
    font-size: 14px;
}

/* 两行导航栏 */
.nav-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2px;
}

.nav-item-group {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-group-title {
    display: inline-block;
    padding: 4px 8px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
    border-radius: 4px 4px 0 0;
}

.nav-group-title:hover {
    background: rgba(255,255,255,0.15);
}

.nav-sub-items {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 1px;
}

.nav-sub-link {
    display: inline-block;
    padding: 3px 8px;
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    text-decoration: none;
    border-radius: 3px;
    white-space: nowrap;
    transition: all 0.15s;
}

.nav-sub-link:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.nav-direct-link {
    display: inline-block;
    padding: 4px 10px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.15s;
}

.nav-direct-link:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* 导航下拉菜单 */
.nav-item-group .dropdown-toggle {
    cursor: pointer;
}
.nav-item-group .dropdown-menu {
    min-width: 160px;
    margin-top: 4px;
}
.nav-item-group .dropdown-item {
    font-size: 13px;
    padding: 6px 14px;
}
.nav-item-group .dropdown-item:hover {
    background-color: var(--primary);
    color: #fff;
}

/* 搜索框 */
.nav-search {
    display: flex;
    align-items: center;
}
.nav-search input {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 4px;
}
.nav-search input::placeholder {
    color: rgba(255,255,255,0.6);
}
.nav-search input:focus {
    background: rgba(255,255,255,0.9);
    color: #333;
    outline: none;
}

/* ========== 响应式设计 ========== */

/* 平板及以下 (≤991px) */
@media (max-width: 991px) {
    .nav-search input {
        width: 120px !important;
    }
    .nav-group-title {
        font-size: 12px;
        padding: 4px 6px;
    }
}

/* 手机横屏及以下 (≤767px) */
@media (max-width: 767px) {
    /* 导航栏 */
    .navbar-brand {
        font-size: 14px;
    }
    .nav-row {
        flex-direction: column;
        gap: 2px;
    }
    .nav-item-group {
        width: 100%;
    }
    .nav-group-title {
        display: block;
        width: 100%;
        padding: 8px 10px;
        font-size: 13px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-item-group .dropdown-menu {
        position: static !important;
        width: 100%;
        background: rgba(0,0,0,0.3);
        border: none;
        margin: 0;
    }
    .nav-item-group .dropdown-item {
        color: rgba(255,255,255,0.8);
        font-size: 13px;
        padding: 8px 24px;
    }
    .nav-direct-link {
        display: block;
        padding: 8px 10px;
        font-size: 13px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-search {
        width: 100%;
        padding: 6px 0;
    }
    .nav-search input {
        width: 100% !important;
    }

    /* 内容区域 */
    main.container-fluid {
        padding: 10px 8px !important;
    }
    h5 { font-size: 15px; }

    /* KPI卡片 */
    .card-body.py-3 { padding: 10px 6px !important; }
    .fs-3 { font-size: 1.25rem !important; }

    /* 表单 */
    .form-control-sm, .form-select-sm {
        font-size: 16px;  /* 防iOS缩放 */
        min-height: 38px;
    }
    .btn-sm {
        min-height: 36px;
        font-size: 13px;
    }

    /* 表格 */
    .table { font-size: 12px; }
    .table th, .table td {
        padding: 6px 4px;
        white-space: nowrap;
    }

    /* 页面标题区按钮组 */
    .d-flex.gap-2 .btn {
        font-size: 11px;
        padding: 4px 6px;
    }
}

/* 小手机 (≤575px) */
@media (max-width: 575px) {
    .navbar { font-size: 11px; }
    .navbar-brand { font-size: 13px; }

    /* 表格让文字更小 */
    .table { font-size: 11px; }
    .table th, .table td { padding: 4px 3px; }

    /* KPI卡片两列 */
    .col-6.col-md-3 { padding: 0 4px; }

    /* 隐藏次要列 */
    .hide-mobile { display: none !important; }
}

/* 触摸优化 */
@media (pointer: coarse) {
    .btn, .nav-sub-link, .nav-direct-link, .dropdown-item, .list-group-item-action {
        min-height: 44px;
    }
    a, button, .btn, [role="button"] {
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

/* 卡片样式 */
.card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

/* 表格样式 */
.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* 状态标签 */
.badge-pending { background-color: #ffc107; color: #000; }
.badge-approved { background-color: #28a745; }
.badge-rejected { background-color: #dc3545; }
.badge-in_progress { background-color: #17a2b8; }
.badge-closed { background-color: #6c757d; }
.badge-pending_archive { background-color: #fd7e14; }
.badge-archived { background-color: #495057; }

/* 文件拖放区 */
.dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #fafafa;
}

.dropzone:hover, .dropzone.dragover {
    border-color: #1a3a6b;
    background-color: #eef2f8;
}

/* 提醒列表 */
.reminder-list .list-group-item {
    border-left: 3px solid transparent;
}

.reminder-list .list-group-item.urgent {
    border-left-color: #dc3545;
}

.reminder-list .list-group-item.warning {
    border-left-color: #ffc107;
}

/* 打印样式 */
@media print {
    .navbar, .btn, form { display: none !important; }
    .card { border: none; box-shadow: none; }
}

/* 利益冲突结果 */
.conflict-match {
    padding: 10px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    margin-bottom: 8px;
    border-radius: 4px;
}

/* 归档材料检查清单 */
.material-checklist .form-check {
    margin-bottom: 4px;
}

.material-checklist .missing {
    color: #dc3545;
}

/* 快捷键提示 */
.kbd {
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 12px;
}
