.required { color: #f5222d; }

.app { min-height: 100vh; }

.header {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
}

.logo-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.system-badge {
    background: #e6f7ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #1890ff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification {
    position: relative;
    cursor: pointer;
    color: #333;
    font-size: 20px;
}

.notification .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f5222d;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-dropdown {
    position: relative;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s;
}

.user-info:hover {
    background: #f5f5f5;
}

.username {
    font-size: 14px;
    font-weight: 500;
}

.role {
    font-size: 12px;
    opacity: 0.8;
}

.dropdown-icon {
    font-size: 10px;
    transition: transform 0.3s;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 150px;
    display: none;
    z-index: 1000;
    margin-top: 8px;
}

.dropdown-menu.active {
    display: block;
}

.user-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    color: #333;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 4px 0;
}

.logout-link {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.logout-link:hover {
    background: #f5f5f5;
}

.notification-panel {
    position: fixed;
    top: 60px;
    right: 24px;
    width: 360px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 1001;
}

.notification-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.notification-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.notification-empty {
    padding: 40px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.main {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 200px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    padding: 16px 0;
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f5f5f5;
    color: #1890ff;
}

.nav-item.active {
    background: #e6f7ff;
    color: #1890ff;
    border-left-color: #1890ff;
    font-weight: 500;
}

.nav-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-item .text {
    font-size: 14px;
}

.content {
    flex: 1;
    margin-left: 200px;
    padding: 24px;
    background: #f5f5f5;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    margin-right: 4px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
}

.hamburger-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .header {
        padding: 0 12px;
        height: 48px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .header-left .logo {
        display: none;
    }

    .header-left .logo-text {
        display: block;
        font-size: 15px;
        color: #fff;
    }

    .header-left .system-badge {
        display: none;
    }

    .notification {
        color: #fff;
    }

    .user-info {
        color: #fff;
    }

    .hamburger-btn span {
        background: #fff;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        position: fixed;
        top: 48px;
        left: 0;
        bottom: 0;
        z-index: 100;
        width: 220px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 99;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .content {
        margin-left: 0;
        padding: 12px;
    }

    .main {
        margin-top: 48px;
    }

    .notification-panel {
        right: 8px;
        width: calc(100% - 16px);
    }

    .role {
        display: none;
    }

    .toolbar {
        flex-wrap: wrap;
    }

    .toolbar .btn {
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
        font-size: 13px;
        padding: 6px 8px;
    }

    .filter-bar {
        flex-wrap: wrap;
    }

    .search-input {
        width: 100%;
        flex-basis: 100%;
    }

    .filter-bar .select {
        flex: 1 1 100%;
        min-width: 0;
    }

    .filter-bar .btn {
        flex-basis: 100%;
    }

    .card {
        border-radius: 0;
        margin-left: -12px;
        margin-right: -12px;
        margin-bottom: 8px;
    }

    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* 通用页面样式 */

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.toolbar {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.filter-bar {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    width: 200px;
}

.select {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
}

.card {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
}

.card-header .link {
    color: #1890ff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.card-header .link:hover {
    color: #40a9ff;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.card-body {
    padding: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.table th {
    background: #fafafa;
    font-weight: 500;
    color: #333;
}

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

.btn {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

.pagination {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
}

.page:hover {
    border-color: #1890ff;
}

.page.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.total {
    margin-left: 16px;
    color: #999;
}

.pagination-wrapper {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-info {
    font-size: 13px;
    color: #666;
}

.page-info b {
    color: #333;
    font-weight: 600;
}

.page-size-select {
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

.pagination-center {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn,
.page_btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled),
.page_btn:hover:not(:disabled) {
    border-color: #1890ff;
    color: #1890ff;
}

.page-btn:disabled,
.page_btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-number {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-number:hover,
.page_btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.page-number.active,
.page_btn.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.page-ellipsis {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jump-input {
    width: 60px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.jump-input:focus {
    outline: none;
    border-color: #1890ff;
}

.go-btn {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
    font-weight: 500;
}

.go-btn:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

@media (max-width: 768px) {
    .pagination-wrapper {
        flex-wrap: wrap;
    }
    .pagination-left, .pagination-right {
        width: 100%;
        justify-content: space-between;
    }
}

.tag {
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
    background: #f5f5f5;
}

.tag.success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.tag.error {
    background: #fff2f0;
    color: #f5222d;
    border: 1px solid #ffccc7;
}

.tag.warning {
    background: #fffbe6;
    color: #faad14;
    border: 1px solid #ffe58f;
}

.tag.info {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.link {
    color: #1890ff;
    text-decoration: none;
    cursor: pointer;
    padding: 2px 8px;
    border: none;
    background: none;
    font-size: 13px;
    transition: all 0.2s;
    border-radius: 4px;
}

.link:hover {
    color: #40a9ff;
    background: #e6f7ff;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.action-btn.primary {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.action-btn.primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-card.success { border-left: 4px solid #52c41a; }
.stat-card.warning { border-left: 4px solid #faad14; }
.stat-card.danger { border-left: 4px solid #f5222d; }

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #999;
}

/* 进度条样式 */
.progress {
    width: 100px;
    height: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #1890ff;
    border-radius: 4px;
    transition: width 0.3s;
}

/* 任务列表样式 */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
    border-left: 3px solid #d9d9d9;
}

.task-item.urgent {
    border-left-color: #f5222d;
    background: #fff1f0;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.task-meta {
    font-size: 12px;
    color: #999;
}

/* 快捷操作样式 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quick-actions .action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-actions .action-btn:hover {
    border-color: #1890ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
}

.quick-actions .action-btn .icon {
    font-size: 24px;
}

.quick-actions .action-btn .text {
    font-size: 14px;
    color: #666;
}

/* 标签页样式 - 药丸式设计 */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: #fff;
    padding: 4px;
    border-radius: 8px;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tabs .tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.tabs .tab:hover {
    background: #f5f5f5;
    color: #333;
}

.tabs .tab.active {
    background: #1890ff;
    color: #fff;
}

/* 内容标签页 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 子导航标签 */
.sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sub-tab {
    padding: 6px 16px;
    border: 1px solid #d9d9d9;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.sub-tab:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.sub-tab.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

/* 机构树布局 */
.org-container {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

.org-tree {
    flex: 0 0 300px;
}

.org-detail {
    flex: 1;
}

.tree-container {
    padding: 10px 0;
}

.org-node {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.org-node:hover {
    background: #f5f5f5;
}

.org-node.active {
    background: #e6f7ff;
    color: #1890ff;
}

.org-children {
    margin-left: 24px;
    border-left: 2px solid #e8e8e8;
    padding-left: 12px;
}

.node-icon {
    margin-right: 8px;
    font-size: 16px;
}

.node-name {
    flex: 1;
    font-size: 14px;
}

.node-action {
    width: 20px;
    height: 20px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.org-node:hover .node-action {
    opacity: 1;
}

.node-action:hover {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.card-list { display: none; }
.card-item { background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.card-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-item-title { font-size: 15px; font-weight: 600; color: #333; }
.card-item-body { font-size: 13px; color: #666; }
.card-item-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #f5f5f5; }
.card-item-row:last-child { border-bottom: none; }
.card-item-footer { margin-top: 12px; padding-top: 8px; border-top: 1px solid #f5f5f5; display: flex; gap: 12px; }

@media (max-width: 768px) {
    .card-list { display: block; }
    .card .table { display: none; }
}
