:root {
    --primary-color: #2c5282;
    --primary-light: #4299e1;
    --secondary-color: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --danger-color: #e53e3e;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 0.5rem;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar-portal {
    background: linear-gradient(135deg, #2c5282 0%, #2b6cb0 100%);
    box-shadow: var(--shadow-md);
}

.navbar-portal .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.3px;
}

.navbar-portal .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem;
    transition: background 0.2s, color 0.2s;
}

.navbar-portal .nav-link:hover,
.navbar-portal .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
}

main {
    flex: 1;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.75rem;
}

.page-header p {
    color: var(--text-muted);
    margin-bottom: 0;
}

.card-portal {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    background: var(--bg-white);
}

.card-portal:hover {
    box-shadow: var(--shadow-md);
}

.card-portal .card-title {
    font-weight: 600;
    color: var(--text-dark);
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.badge-category {
    background-color: #ebf4ff;
    color: var(--primary-color);
    font-weight: 500;
}

.table-portal {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.table-portal .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

.table-portal .table {
    margin-bottom: 0;
    min-width: 42rem;
}

.table-portal .table thead {
    background-color: #edf2f7;
}

.table-portal th {
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2b6cb0;
    border-color: #2b6cb0;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ebf8ff 0%, #f7fafc 50%, #edf2f7 100%);
}

.login-card {
    max-width: 420px;
    width: 100%;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.login-card .card-header {
    background: linear-gradient(135deg, #2c5282 0%, #2b6cb0 100%);
    color: white;
    border-radius: 1rem 1rem 0 0 !important;
    padding: 2rem;
    text-align: center;
    border: none;
}

.login-card .card-header h2 {
    margin: 0;
    font-weight: 700;
}

.news-card .card-text {
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.admin-sidebar-card {
    position: sticky;
    top: 1rem;
}

.admin-sidebar-card .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.admin-sidebar-card .list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.admin-sidebar-card .list-group-item:hover:not(.active) {
    background-color: #edf2f7;
}

.progress {
    height: 1.25rem;
    border-radius: 0.5rem;
    background-color: #edf2f7;
}

.progress-bar {
    background: linear-gradient(90deg, #4299e1, #2c5282);
    font-size: 0.75rem;
    font-weight: 600;
}

.poll-result-item {
    margin-bottom: 1.25rem;
}

.poll-result-item:last-child {
    margin-bottom: 0;
}

.footer-portal {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.user-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
}

.content-box {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(66, 153, 225, 0.25);
}

.alert-portal {
    border-radius: var(--radius);
    border: none;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .table-portal .table-responsive {
        max-width: 100%;
    }

    .table-portal .table {
        min-width: 36rem;
    }

    .table-portal .table th,
    .table-portal .table td {
        white-space: nowrap;
    }
}
