/* 管理后台样式 */
:root {
    --primary: #0d6efd;
    --danger: #dc3545;
    --sidebar-w: 200px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f1f3f5;
    margin: 0;
    min-height: 100vh;
}

.app-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d6efd 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.app-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.app-nav {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
}

.app-nav .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background .15s, color .15s;
}

.app-nav .nav-link:hover {
    background: #e9ecef;
    color: var(--primary);
}

.app-nav .nav-link.active {
    background: var(--primary);
    color: #fff;
}

.app-main {
    flex: 1;
    padding: 1.5rem;
}

.panel {
    display: none;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.panel.active {
    display: block;
}

.panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.panel-head h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.table-wrap {
    overflow-x: auto;
}

.panel .table {
    margin-bottom: 0;
}

.panel .table th {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.panel .table td {
    vertical-align: middle;
}

.pagination-wrap {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #eee;
}

.pagination-wrap .pagination {
    margin: 0;
}

.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.15);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

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

.btn-outline-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

@media (max-width: 768px) {
    .app-nav {
        flex-wrap: wrap;
    }
    .panel-head {
        flex-direction: column;
        align-items: stretch;
    }
    .panel-actions {
        justify-content: flex-start;
    }
}
