:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #1abc9c;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --border-color: #dee2e6;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f5f8fa;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body > .container {
    flex: 1 0 auto;
}

.container {
    max-width: 98% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.navbar {
    background: var(--primary-color);
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
}

.nav-link {
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem 1rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--primary-color);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 0.5rem;
    }
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
}

.header-container {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 0.8rem 0;
    position: relative;
}

.header-top-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.header-tag-year, .header-tag-school {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.25rem 0.65rem;
    border-radius: 50rem;
    white-space: nowrap;
    line-height: 1;
}
.header-tag-year {
    color: #ffc107;
    border: 1px solid #ffc107;
}
.header-tag-school {
    color: #17a2b8;
    border: 1px solid #17a2b8;
}
.header-separator {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,.2);
    flex-shrink: 0;
    margin: 0 0.3rem;
}
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: auto;
}
.header-logo-link {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.header-brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
}
.header-brand:hover { color: #e0e0e0; }

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-wrap: wrap;
}

.header-nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 1.05rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.15s;
}
.header-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}
.header-nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.2);
    font-weight: 600;
}
.header-nav-link i {
    font-size: 1.15rem;
    vertical-align: -1px;
}

.header-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.header-user-badges {
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-user-toggle {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.header-user-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.user-dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    overflow: hidden;
    padding: 0;
    min-width: 220px;
    margin-top: 8px !important;
}
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
}
.user-dropdown-avatar {
    font-size: 2.2rem;
    line-height: 1;
    opacity: .9;
}
.user-dropdown-name {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 4px;
}
.user-dropdown-badges {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.user-dropdown-menu .dropdown-item {
    padding: 10px 16px;
    font-size: .88rem;
    transition: background .15s;
    display: flex;
    align-items: center;
}
.user-dropdown-menu .dropdown-item:hover {
    background: #f0f6ff;
}
.user-dropdown-menu .dropdown-item i {
    width: 18px;
    text-align: center;
}
.user-dropdown-menu .dropdown-divider {
    margin: 0;
}
.user-dropdown-menu .dropdown-header {
    padding: 8px 16px 4px;
    font-size: .75rem;
    color: #999;
}

.header-announcement {
    padding: 0;
}
.header-announcement-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 5px 1rem;
    font-size: .82rem;
    color: rgba(255,255,255,.9);
}
.header-announcement-icon {
    flex-shrink: 0;
    font-size: .85rem;
    opacity: .8;
    position: relative;
    display: inline-flex;
    align-items: center;
}
.header-announcement-icon .sound-wave {
    display: inline-flex;
    align-items: center;
    gap: 1.5px;
    margin-left: 2px;
    height: 14px;
}
.header-announcement-icon .sound-wave span {
    display: inline-block;
    width: 2px;
    border-radius: 1px;
    background: rgba(255,255,255,.7);
    animation: soundWave 1s ease-in-out infinite;
}
.header-announcement-icon .sound-wave span:nth-child(1) { height: 4px; animation-delay: 0s; }
.header-announcement-icon .sound-wave span:nth-child(2) { height: 8px; animation-delay: .15s; }
.header-announcement-icon .sound-wave span:nth-child(3) { height: 12px; animation-delay: .3s; }
.header-announcement-icon .sound-wave span:nth-child(4) { height: 8px; animation-delay: .45s; }
@keyframes soundWave {
    0%, 100% { opacity: .3; transform: scaleY(.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

.feedback-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,.25);
    transition: transform .2s, box-shadow .2s;
    z-index: 1000;
}
.feedback-fab:hover {
    transform: scale(1.12);
    box-shadow: 0 5px 18px rgba(0,0,0,.35);
}
.feedback-modal-content { border: none; border-radius: 16px; overflow: hidden; }
.feedback-modal-header { background: linear-gradient(135deg, #2c3e50, #3498db); color: #fff; border: none; }
.feedback-tabs .nav-link { font-size: .85rem; color: #666; border: none; padding: .4rem 1rem; }
.feedback-tabs .nav-link.active { color: #3498db; border-bottom: 2px solid #3498db; font-weight: 600; }
.feedback-category-group { display: flex; gap: 8px; flex-wrap: wrap; }
.feedback-category-opt { cursor: pointer; }
.feedback-category-opt input { display: none; }
.feedback-category-opt span {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 14px; border-radius: 20px; font-size: .85rem;
    border: 1px solid #ddd; color: #666; transition: all .15s;
}
.feedback-category-opt input:checked + span {
    border-color: #3498db; background: #ebf5fb; color: #3498db;
}
.feedback-history-list { max-height: 350px; overflow-y: auto; }
.feedback-history-item {
    padding: .8rem; border: 1px solid #eee; border-radius: 10px; margin-bottom: .6rem;
}
.feedback-history-item .fb-meta { font-size: .78rem; color: #999; margin-bottom: 4px; }
.feedback-history-item .fb-content { font-size: .9rem; }
.feedback-history-item .fb-reply {
    margin-top: 8px; padding: 8px 10px; background: #f0f7ff; border-radius: 8px;
    font-size: .82rem; color: #2c3e50;
}
.feedback-history-item .fb-reply::before { content: '管理员回复：'; font-weight: 600; }
.fb-status-badge { font-size: .7rem; padding: 2px 8px; border-radius: 10px; }
.fb-status-pending { background: #fff3cd; color: #856404; }
.fb-status-replied { background: #d4edda; color: #155724; }

.header-announcement-scroll {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-align: right;
}
.header-announcement-item {
    display: inline;
}
.header-announcement-text {
    opacity: .7;
    margin-left: 6px;
}
.header-announcement-nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-announcement-nav button {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    padding: 0 4px;
    cursor: pointer;
    font-size: .75rem;
    line-height: 1;
}
.header-announcement-nav button:hover { color: #fff; }
.header-announcement-counter {
    font-size: .7rem;
    opacity: .5;
    min-width: 28px;
    text-align: center;
}

.header-content {
    padding: 0.2rem 1rem 0 1rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 0.3rem;
}

.header-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.05rem;
    margin-top: 0.15rem;
}

.header-subtitle {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-bottom: 0.1rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

.card-header-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-outline-primary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    padding: 0.3rem 0.25rem;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.2);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.82rem;
}

.table thead th:last-child {
    border-right: none;
}

.table tbody td {
    padding: 0.25rem;
    vertical-align: middle;
    border-color: var(--border-color);
    border-right: 1px solid var(--border-color);
    font-size: 0.82rem;
}

.table tbody td:last-child {
    border-right: none;
}

.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--light-gray);
}

.footer {
    margin-top: auto;
    flex-shrink: 0;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    text-align: center;
}

.footer p {
    margin: 0;
}

.form-control, .form-select {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.alert {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: none;
}

.badge {
    font-size: 0.75rem;
    font-weight: normal;
}

.welcome-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

.welcome-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.welcome-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
    padding: 0 0.75rem;
}

.menu-item {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    color: var(--secondary-color);
}

.menu-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.menu-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-container {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.pagination {
    justify-content: center;
    margin-top: 1rem;
}

.upload-step-item {
    background: #f8f9fa;
    border-radius: 8px;
    height: 100%;
}

.upload-step-item h6 {
    color: var(--primary-color);
    font-weight: 600;
}

.page-item.active .page-link {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.page-link {
    color: var(--secondary-color);
}
