:root {
    --color-primary: #4285f4;
    --color-primary-light: #669df6;
    --color-primary-dark: #1a73e8;
    --color-success: #34a853;
    --color-success-light: #57bb75;
    --color-warning: #fbbc04;
    --color-warning-light: #fcc934;
    --color-danger: #ea4335;
    --color-danger-light: #ee6c60;
    --color-info: #4285f4;
    --color-bg: #f0f2f5;
    --color-surface: #ffffff;
    --color-text: #333333;
    --color-text-secondary: #666666;
    --color-text-muted: #999999;
    --color-border: #e8e8e8;
    --color-border-light: #f0f0f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.35s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.navbar {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    box-shadow: 0 2px 12px rgba(26, 115, 232, 0.25);
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand h1 {
    font-size: 20px;
    color: #ffffff;
    margin-right: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.nav-menu {
    display: flex;
    align-items: center;
    margin-left: 40px;
    flex: 1;
}

.nav-link {
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    position: relative;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.nav-user .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.nav-user .nav-link:hover {
    color: #ffffff;
}

.nav-user .btn-outline {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.nav-user .btn-outline:hover {
    border-color: #ffffff;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.main-content {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer {
    text-align: center;
    padding: 20px 16px;
    color: var(--color-text-muted);
    font-size: 12px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
}

.footer a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-text);
    padding-left: 12px;
    border-left: 4px solid var(--color-primary);
    line-height: 1.3;
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 16px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-light);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    font-weight: 500;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    background: var(--color-primary-light);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.35);
}

.btn-success {
    background: var(--color-success);
    color: #fff;
}

.btn-success:hover {
    background: var(--color-success-light);
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.35);
}

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

.btn-danger:hover {
    background: var(--color-danger-light);
    box-shadow: 0 2px 8px rgba(234, 67, 53, 0.35);
}

.btn-warning {
    background: var(--color-warning);
    color: #333;
}

.btn-warning:hover {
    background: var(--color-warning-light);
    box-shadow: 0 2px 8px rgba(251, 188, 4, 0.35);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(66, 133, 244, 0.04);
}

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

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--color-text);
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-normal);
    background: var(--color-surface);
    color: var(--color-text);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #bbb;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

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

table th,
table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 14px;
}

table th {
    background: #f8f9fb;
    font-weight: 600;
    color: var(--color-text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

table tbody tr:nth-child(even) {
    background: #fafbfc;
}

table tbody tr {
    transition: background var(--transition-fast);
}

table tbody tr:hover {
    background: #eef3fe;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #e6f4ea;
    color: var(--color-success);
}

.badge-warning {
    background: #fef7e0;
    color: #e37400;
}

.badge-danger {
    background: #fce8e6;
    color: var(--color-danger);
}

.badge-info {
    background: #e8f0fe;
    color: var(--color-primary);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.25s ease;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    color: var(--color-text);
    background: var(--color-bg);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: -24px;
    padding: 24px;
}

.login-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 400px;
    max-width: 90%;
    animation: cardSlideUp 0.4s ease;
}

.login-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 26px;
    color: var(--color-primary);
    font-weight: 700;
}

.login-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-size: 14px;
}

.login-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--color-border-light);
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    user-select: none;
}

.login-tab:hover {
    color: var(--color-primary);
}

.login-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

.login-subtab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 13px;
    color: #999;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    user-select: none;
}

.login-subtab:hover {
    color: var(--color-primary);
}

.login-subtab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

.login-panel {
    animation: cardSlideUp 0.3s ease;
}

.tab-bar {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--color-border-light);
}

.tab-item {
    padding: 8px 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-normal);
}

.tab-item:hover {
    color: var(--color-primary);
}

.tab-item.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.stat-card:nth-child(1)::before {
    background: linear-gradient(180deg, #4285f4, #669df6);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(180deg, #34a853, #57bb75);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(180deg, #fbbc04, #fcc934);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(180deg, #ea4335, #ee6c60);
}

.stat-card:nth-child(5)::before {
    background: linear-gradient(180deg, #ab47bc, #ce93d8);
}

.stat-card:nth-child(6)::before {
    background: linear-gradient(180deg, #00acc1, #4dd0e1);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    padding-left: 8px;
}

.stat-card:nth-child(2) .stat-value {
    color: var(--color-success);
}

.stat-card:nth-child(3) .stat-value {
    color: #e37400;
}

.stat-card:nth-child(4) .stat-value {
    color: var(--color-danger);
}

.stat-card:nth-child(5) .stat-value {
    color: #ab47bc;
}

.stat-card:nth-child(6) .stat-value {
    color: #00acc1;
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 4px;
    padding-left: 8px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}

.page-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes cardSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
    }

    .nav-brand h1 {
        font-size: 18px;
    }

    .nav-menu {
        margin-left: 0;
        width: 100%;
        overflow-x: auto;
        padding: 8px 0;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .main-content {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 22px;
    }

    .page-title {
        font-size: 20px;
    }

    .login-container {
        margin: -16px;
        padding: 16px;
    }

    .login-card {
        padding: 24px;
    }

    .card {
        padding: 16px;
    }

    table th,
    table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    .actions {
        flex-direction: column;
    }

    .actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .footer {
        padding: 16px 12px;
    }
}

.announcement-banner {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.announcement-banner-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.announcement-banner-text {
    white-space: nowrap;
    animation: scrollText 10s linear infinite;
    display: inline-block;
    padding-left: 100%;
}

@keyframes scrollText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.announcement-banner-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #856404;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.announcement-banner-close:hover {
    background: rgba(133, 100, 4, 0.1);
}

.nav-announcement-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-right: 8px;
}

.nav-announcement-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-announcement-icon {
    font-size: 18px;
    display: inline-block;
}

.nav-announcement-icon.ringing {
    animation: ring 1s ease-in-out infinite;
}

.nav-announcement-btn {
    position: relative;
}

.nav-announcement-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: var(--color-danger);
    border-radius: 50%;
    border: 2px solid white;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

/* 修复公告弹窗样式 */
#announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
}

#announcement-modal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

#announcement-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

#announcement-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 2001;
}

.announcement-item {
    background: #f8f9fb;
    border: 1px solid #e8e8e8;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    transition: all var(--transition-normal);
}

.announcement-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.announcement-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.announcement-date {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.announcement-content {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.announcement-priority-high {
    border-left: 4px solid var(--color-danger);
}

.announcement-priority-normal {
    border-left: 4px solid var(--color-primary);
}

.announcement-priority-low {
    border-left: 4px solid var(--color-text-muted);
}

.announcement-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.announcement-table {
    width: 100%;
}

.announcement-table th,
.announcement-table td {
    padding: 12px 16px;
}

.announcement-status-active {
    color: var(--color-success);
}

.announcement-status-inactive {
    color: var(--color-text-muted);
}
