:root {
    /* Color Palette */
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-bg: #f8f9fa;
    --dark-bg: #1a252f;
    --border-color: #e1e4e8;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;

    /* Layout & Spacing - Responsive */
    --sidebar-width: 260px;
    --header-height: 64px;
    
    /* Fluid Typography & Spacing */
    --font-size-base: clamp(0.9rem, 1vw + 0.5rem, 1rem);
    --font-size-lg: clamp(1.1rem, 1.2vw + 0.6rem, 1.25rem);
    --font-size-sm: clamp(0.75rem, 0.8vw + 0.4rem, 0.875rem);
    
    --spacing-xs: clamp(0.25rem, 0.5vw, 0.5rem);
    --spacing-sm: clamp(0.5rem, 1vw, 1rem);
    --spacing-md: clamp(1rem, 2vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 3vw, 2.5rem);
    
    /* Component Sizing */
    --input-height: clamp(40px, 8vw, 48px);
    --btn-height: clamp(40px, 8vw, 48px);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;

    /* Shadows & Transitions */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Win10 Standard Resolution Adaptations */
@media (min-width: 1366px) {
    :root {
        --font-size-base: 1rem;
        --input-height: 44px;
        --btn-height: 44px;
        --spacing-md: 1.25rem;
    }
}

@media (min-width: 1920px) {
    :root {
        --font-size-base: 1.1rem;
        --input-height: 50px;
        --btn-height: 50px;
        --spacing-md: 1.5rem;
        --spacing-lg: 3rem;
    }
}

@media (min-width: 2560px) {
    :root {
        --font-size-base: 1.25rem;
        --input-height: 60px;
        --btn-height: 60px;
        --spacing-md: 2rem;
        --spacing-lg: 4rem;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: var(--font-size-base);
    overflow-x: hidden;
}

/* Responsive Typography */
h1, .h1 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); margin-bottom: var(--spacing-md); font-weight: 700; }
h2, .h2 { font-size: clamp(1.5rem, 2vw + 0.8rem, 2rem); margin-bottom: var(--spacing-sm); font-weight: 600; }
h3, .h3 { font-size: clamp(1.25rem, 1.5vw + 0.6rem, 1.75rem); margin-bottom: var(--spacing-sm); font-weight: 600; }
h4, .h4 { font-size: clamp(1.1rem, 1.2vw + 0.5rem, 1.5rem); margin-bottom: var(--spacing-xs); font-weight: 600; }
h5, .h5 { font-size: var(--font-size-lg); margin-bottom: var(--spacing-xs); font-weight: 600; }
h6, .h6 { font-size: var(--font-size-base); font-weight: 600; margin-bottom: var(--spacing-xs); }


.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark-bg) 0%, #1e2d3d 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu {
    padding: 10px 0;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.08);
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-menu a:hover::before,
.sidebar-menu a.active::before {
    width: 100%;
}

.sidebar-menu a i {
    margin-right: 14px;
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.sidebar-menu a:hover i {
    transform: scale(1.1);
}

.sidebar-menu span {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.sidebar-menu .submenu {
    background: rgba(0,0,0,0.15);
    margin-top: 2px;
}

.sidebar-menu .submenu a {
    padding-left: 56px;
    font-size: 0.9rem;
    border-left-color: transparent;
}

.sidebar-menu .submenu a::before {
    display: none;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    background: var(--light-bg);
}

.top-navbar {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--light-bg);
    color: var(--primary-color);
    transform: rotate(180deg);
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
    margin-left: 8px;
}

.breadcrumb-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

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

.breadcrumb-item.active {
    color: var(--text-secondary);
    font-weight: 500;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--light-bg);
    border-radius: 30px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.user-info:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(74,144,226,0.3);
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-dropdown-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.user-info:hover .user-dropdown-icon {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.user-info:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-link:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.dropdown-link.logout {
    color: var(--danger-color);
}

.dropdown-link.logout:hover {
    background: #ffebee;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 200px;
    padding: 8px 40px 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input:focus {
    width: 300px;
    border-color: var(--primary-color);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.notifications {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    position: relative;
    transition: var(--transition);
}

.notification-btn:hover {
    color: var(--primary-color);
}

.notification-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.notifications:hover .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.notification-header h6 {
    margin: 0;
    font-weight: 600;
}

.mark-read {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--light-bg);
}

.notification-item.unread {
    background: rgba(74,144,226,0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    margin: 0 0 4px 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.notification-time {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.notification-footer {
    padding: 12px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Dashboard Grid Layout */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

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

.content-wrapper {
    padding: var(--spacing-lg);
    flex: 1;
    min-height: calc(100vh - var(--header-height));
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

@media (min-width: 1920px) {
    .content-wrapper {
        max-width: 1800px;
    }
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.card-body {
    padding: 24px;
}

.btn {
    height: var(--btn-height);
    padding: 0 var(--spacing-md);
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #2980b9);
    box-shadow: 0 4px 12px rgba(74,144,226,0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    box-shadow: 0 4px 12px rgba(39,174,96,0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    box-shadow: 0 4px 12px rgba(231,76,60,0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    box-shadow: 0 4px 12px rgba(243,156,18,0.4);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #2980b9);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    box-shadow: 0 4px 12px rgba(52,152,219,0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #6c757d);
    box-shadow: 0 4px 12px rgba(108,117,125,0.4);
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-group {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn-group .btn {
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

.btn-group .btn:first-child {
    border-radius: 8px 0 0 8px;
}

.btn-group .btn:last-child {
    border-radius: 0 8px 8px 0;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

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

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table thead th {
    background: linear-gradient(180deg, var(--light-bg) 0%, #e9ecef 100%);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.002);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-draft {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    box-shadow: 0 2px 8px rgba(187,222,251,0.4);
}

.status-reviewing {
    background: linear-gradient(135deg, #fff3e0, #ffeaa7);
    color: #f57c00;
    box-shadow: 0 2px 8px rgba(255,234,167,0.4);
}

.status-published {
    background: linear-gradient(135deg, #e8f5e9, #a8e6cf);
    color: #388e3c;
    box-shadow: 0 2px 8px rgba(168,230,207,0.4);
}

.status-rejected {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #d32f2f;
    box-shadow: 0 2px 8px rgba(255,205,210,0.4);
}

.version-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--light-bg);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.paper-id {
    color: var(--text-secondary);
    font-weight: 600;
}

.paper-title {
    color: var(--text-primary);
}

.author-info,
.date-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    opacity: 0.5;
}

.empty-state h4 {
    margin: 16px 0 8px 0;
    color: var(--text-primary);
}

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0;
}

.page-item {
    list-style: none;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.page-item .page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-color: transparent;
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert i {
    font-size: 1.5rem;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #27ae60;
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: #e74c3c;
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #f39c12;
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border-color: #3498db;
    color: #0c5460;
}

.form-control {
    width: 100%;
    height: var(--input-height);
    padding: 0 var(--spacing-sm);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-base);
    transition: var(--transition);
    background: white;
    display: flex;
    align-items: center;
    /* Edge/Win10 Focus Ring Optimization */
    outline-offset: 2px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74,144,226,0.1);
    outline: none;
    transform: translateY(-1px);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.search-form {
    margin-bottom: 24px;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.3s ease-in-out;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.logout-link {
    color: rgba(255,255,255,0.7);
}

.logout-link:hover {
    color: var(--danger-color);
    background: rgba(231,76,60,0.1);
}

.divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 12px 0;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    .card {
        padding: 2rem;
    }
}

@media (max-width: 1200px) {
    .sidebar {
        width: 220px;
    }
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .navbar-right .user-name {
        display: none;
    }
    .content-wrapper {
        padding: 16px;
    }
    .search-box input {
        width: 150px;
    }
    .search-box input:focus {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        padding: 0 16px;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .card-body {
        padding: 16px;
    }
    .table th,
    .table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    .status-badge {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .btn i {
        display: none;
    }
    .pagination-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    /* 强制 .col-half 宽度为 100% */
    .col-half {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px; /* 基准字体大小调整 */
    }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    
    .content-wrapper {
        padding: 12px;
    }
    .card {
        border-radius: 8px;
    }
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .search-box {
        display: none;
    }
}

@media (max-width: 320px) {
    .content-wrapper {
        padding: 8px;
    }
    .card {
        border-radius: 0;
        margin: 0 -8px; /* 负边距抵消padding，增加内容显示宽度 */
    }
    .btn {
        padding: 8px 12px; /* 小屏幕适当减小，但保持可点击性 */
        font-size: 0.8rem;
    }
}

/* 骨架屏加载效果 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.animate-in {
    animation: slideInUp 0.6s ease-out;
}

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

/* 统计卡片动画 */
.stat-card {
    transition: var(--transition);
}

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

.stat-icon {
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

/* 活动项动画 */
.activity-item {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

.activity-item:nth-child(1) { animation-delay: 0.1s; }
.activity-item:nth-child(2) { animation-delay: 0.2s; }
.activity-item:nth-child(3) { animation-delay: 0.3s; }
.activity-item:nth-child(4) { animation-delay: 0.4s; }
.activity-item:nth-child(5) { animation-delay: 0.5s; }

/* 表单输入焦点增强 */
.form-control:focus {
    transform: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
}

/* 按钮加载状态 */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.2em;
    height: 1.2em;
    margin-left: -0.6em;
    margin-top: -0.6em;
    border: 2px solid #fff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

/* 按钮点击效果 */
.btn:active {
    transform: scale(0.98);
}

/* 表格行悬停增强 */
.table tbody tr {
    cursor: pointer;
}

.table tbody tr:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 卡片悬停增强 */
.card {
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.card:hover::before {
    left: 100%;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

#backToTop.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 模态框美化 */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.modal-header .close {
    padding: 1rem;
    margin: -1rem -1rem -1rem auto;
}

/* 加载遮罩优化 */
.loading-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-text {
    font-weight: 500;
    letter-spacing: 1px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    }
    .main-content {
        background: #1a252f;
    }
    .card {
        background: #2c3e50;
        border-color: #3d4f5f;
    }
    .card-header {
        background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    }
    .card-header h3,
    .table th,
    .table td {
        color: #e9ecef;
    }
    .top-navbar {
        background: #2c3e50;
        border-color: #3d4f5f;
    }
    .form-control {
        background: #1a252f;
        border-color: #3d4f5f;
        color: #e9ecef;
    }
    .user-info {
        background: #2c3e50;
    }
    .skeleton {
        background: linear-gradient(90deg, #2c3e50 25%, #3d4f5f 50%, #2c3e50 75%);
        background-size: 200% 100%;
    }

    /* ===== 网站全局底栏 Footer ===== */
    .site-footer {
        background: var(--dark-bg);
        color: rgba(255, 255, 255, 0.75);
        border-top: 3px solid var(--primary-color);
        padding: clamp(1.25rem, 3vw, 1.75rem) 1rem;
        margin-top: auto;
    }

    .site-footer-inner {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem 1.5rem;
    }

    .footer-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        color: #fff;
        font-size: clamp(0.9rem, 2.2vw, 1rem);
    }

    .footer-brand i {
        color: var(--primary-color);
    }

    .footer-meta {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: clamp(0.8rem, 2vw, 0.9rem);
        color: rgba(255, 255, 255, 0.6);
    }

    .footer-icp {
        color: rgba(255, 255, 255, 0.85);
    }

    .footer-sep {
        opacity: 0.4;
    }

    @media (max-width: 600px) {
        .site-footer-inner {
            flex-direction: column;
            align-items: flex-start;
            text-align: left;
        }
    }
}