/* Survey System Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.65);
    pointer-events: none;
    z-index: -1;
}

.container {
    flex: 1;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Dashboard Cards */
.card.text-center h5 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 10px 0;
}

/* Progress Bars */
.progress {
    background-color: #e9ecef;
    border-radius: 4px;
    height: 24px;
}

.progress-bar {
    background-color: var(--primary-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.25rem;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #157347;
    border-color: #157347;
}

/* Badges */
.badge {
    padding: 0.4rem 0.6rem;
    font-weight: 500;
}

/* Tables */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d1e7dd;
    border-left-color: var(--success-color);
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: var(--danger-color);
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: var(--warning-color);
    color: #664d03;
}

.alert-info {
    background-color: #cfe2ff;
    border-left-color: var(--info-color);
    color: #084298;
}

/* Footer */
footer {
    margin-top: auto;
    background-color: rgba(255, 255, 255, 0.30);
    border-top: 2px solid var(--secondary-color);
    padding: 20px 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0;
    color: #333;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    .btn-lg {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    h1.display-4 {
        font-size: 1.75rem;
    }

    .lead {
        font-size: 0.95rem;
    }
}

/* Survey Vote Radio Buttons */
.form-check {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 12px !important;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.form-check:hover {
    background-color: #e9ecef;
    border-color: var(--primary-color);
}

.form-check-input:checked ~ .form-check-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Chart Container */
#resultChart {
    max-height: 300px;
    margin: 20px 0;
}

/* Options Container */
#options-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Admin Users Page Styles */
.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    margin-bottom: 30px;
    border-radius: 10px;
}

.admin-header h1 {
    margin: 0;
}

.user-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.user-info {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-details .username {
    font-weight: bold;
    font-size: 16px;
}

.user-details .email {
    color: #666;
    font-size: 14px;
}

.user-details .created {
    color: #999;
    font-size: 12px;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.role-select {
    width: 150px;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .user-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Profile Page Styles */
.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
    border-radius: 10px;
    text-align: center;
}

.profile-header .user-avatar {
    font-size: 48px;
    margin-bottom: 15px;
}

.profile-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.profile-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-group {
    margin-bottom: 20px;
}

.info-group label {
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.info-group .info-value {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    color: #666;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.form-group {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .profile-info {
        grid-template-columns: 1fr;
    }
}

/* PDF Export Styles */
.pdf-container {
    font-family: 'Poppins', sans-serif;
    padding: 30px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pdf-container h1, .pdf-container h2, .pdf-container h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.pdf-container h1 {
    font-size: 28px;
    font-weight: bold;
}

.pdf-container h2 {
    font-size: 24px;
    color: #34495e;
}

.pdf-container p {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.pdf-container .chart-container {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
}

.pdf-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #ffffff;
}

.pdf-container table, .pdf-container th, .pdf-container td {
    border: 1px solid #ddd;
}

.pdf-container th, .pdf-container td {
    padding: 12px;
    text-align: center;
    font-size: 14px;
}

.pdf-container th {
    background-color: #2c3e50;
    color: #ffffff;
}

.pdf-container tr:nth-child(even) {
    background-color: #f2f2f2;
}

.pdf-container tr:hover {
    background-color: #f1c40f;
    color: #ffffff;
}

/* Added responsive styles for better compatibility across devices */
@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 10px;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .card {
        margin-bottom: 1rem;
        padding: 1rem;
    }

    h1, h2, h3 {
        font-size: 1.2rem;
    }

    .form-check {
        padding: 10px;
    }

    .profile-info {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .profile-info {
        grid-template-columns: 1fr 1fr;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    h1, h2, h3 {
        font-size: 1.5rem;
    }
}

/* Added responsive table styles for better visibility on small devices */

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.table-responsive table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.table-responsive th, .table-responsive td {
    white-space: nowrap;
    text-align: left;
    padding: 0.75rem;
}

@media (max-width: 576px) {
    .table-responsive th, .table-responsive td {
        font-size: 0.875rem;
        padding: 0.5rem;
    }
}