/* Password toggle icon */
#togglePassword svg {
    vertical-align: middle;
    width: 24px;
    height: 24px;
    display: inline;
    fill: none;
    stroke: #888;
}
.report-summary h2 {
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #CC5500 url('../pictures/circus_field.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
}

h1 {
    color: #3E2723;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
}

h2 {
    color: #4E342E;
    margin-bottom: 20px;
    font-size: 1.6em;
    font-weight: 600;
}

.card {
    background: rgba(248, 249, 250, 0.15);
    padding: 25px;
    margin: 5px 0; /* Adjusted to move cards up by another 5px */
    border-radius: 10px;
    border: 1px solid #e9ecef;
    border-left: 4px solid #4CAF50;
    backdrop-filter: blur(5px);
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #B22222;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px 5px;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #8B2500 0%, #B22222 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #6B1D00 0%, #8B1A1A 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(178, 34, 34, 0.3);
}

/* Survey Sections */
.survey-section {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.survey-section h3 {
    color: #B22222;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #B22222;
}

.question {
    margin: 20px 0;
}

.question label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

/* Rating Scale */
.rating-scale {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.rating-scale input[type="radio"] {
    display: none;
}

.rating-scale label {
    padding: 10px 20px;
    background: #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    min-width: 50px;
}

.rating-scale input[type="radio"]:checked + label {
    background: #B22222;
    color: white;
    transform: scale(1.1);
}

.rating-scale label:hover {
    background: #dee2e6;
}

/* Messages */
.message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Thank You Page */
.thank-you-card {
    text-align: center;
    padding: 40px;
}

.access-code-box {
    background: #f8f9fa;
    padding: 30px;
    margin: 30px 0;
    border-radius: 8px;
}

.access-code {
    font-size: 24px;
    font-weight: bold;
    color: #B22222;
    padding: 20px;
    background: white;
    border-radius: 5px;
    margin: 15px 0;
    letter-spacing: 2px;
}

.small {
    font-size: 14px;
    color: #6c757d;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .rating-scale {
        flex-wrap: wrap;
    }
    
    .rating-scale label {
        min-width: 40px;
        padding: 8px 15px;
    }
}

/* Survey Selection Styles */
.surveys-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.survey-card {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(5px);
}

.survey-card:hover {
    border-color: #B22222;
    box-shadow: 0 4px 12px rgba(178, 34, 34, 0.2);
    transform: translateY(-2px);
}

.survey-card.active {
    border-color: #28a745;
}

.survey-card.completed {
    border-color: #6c757d;
    opacity: 0.8;
}

.survey-card.inactive {
    border-color: #dc3545;
    opacity: 0.6;
}

.survey-card .status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.survey-card .status-badge.active {
    background: #d4edda;
    color: #155724;
}

.survey-card .status-badge.completed {
    background: #d6d8db;
    color: #383d41;
}

.survey-card .status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.survey-card h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.5em;
}

.survey-meta {
    display: flex;
    gap: 20px;
    margin: 10px 0;
    color: #666;
    font-size: 0.9em;
}

.survey-description {
    margin: 15px 0;
    color: #555;
    line-height: 1.6;
}

.survey-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #B22222;
}

.stat-label {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.no-surveys {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-surveys h2 {
    color: #333;
    margin-bottom: 15px;
}

.logout-btn {
    float: right;
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.logout-btn:hover {
    background: #c82333;
}

.header {
    margin-bottom: 30px;
    overflow: auto;
}

.user-info {
    color: #666;
    margin-top: 10px;
}

/* ============================================
   REPORTS PAGE STYLES
   ============================================ */

/* Replace grid with professional list */
.reports-list {
    margin-top: 20px;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.report-item:hover {
    background: rgba(248, 249, 250, 0.3);
    border-color: #4CAF50;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.report-item.ai-report {
    border-left: 4px solid #B22222;
}

.report-item.ai-report:hover {
    border-left-color: #8B2500;
    background: rgba(255, 245, 245, 0.3);
}

.report-icon {
    font-size: 2em;
    min-width: 50px;
    text-align: center;
}

.report-info {
    flex: 1;
}

.report-info h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.report-info p {
    margin: 0;
    color: #000;
    font-size: 0.9em;
    line-height: 1.4;
}

.report-arrow {
    font-size: 1.5em;
    color: #bbb;
    transition: all 0.2s ease;
}

.report-item:hover .report-arrow {
    color: #4CAF50;
    transform: translateX(5px);
}

.report-item.ai-report:hover .report-arrow {
    color: #B22222;
}

#surveySelect {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
}

#surveySelect:focus {
    outline: none;
    border-color: #4CAF50;
}

#reportsContainer {
    margin-top: 30px;
}

#reportsContainer h2 {
    color: #333;
    margin-bottom: 20px;
}

/* ============================================
   REPORT VIEW PAGE STYLES
   ============================================ */

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.report-content {
    background: rgba(248, 249, 250, 0.15);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

.report-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.report-table th,
.report-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.report-table th {
    background: rgba(248, 249, 250, 0.25);
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    font-size: 1em;
    letter-spacing: 0.5px;
}

.report-table tbody tr {
    background: rgba(255, 255, 255, 0.25);
    transition: background-color 0.2s ease;
    color: #1a1a1a;
}

.report-table tbody tr:hover {
    background: rgba(248, 249, 250, 0.4);
}

.report-summary p {
    font-weight: 700;
    font-size: 1.15em;
}

.score-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9em;
}

.score-high { 
    background: #c8e6c9; 
    color: #2e7d32; 
}

.score-medium { 
    background: #fff9c4; 
    color: #f57f17; 
}

.score-low { 
    background: #ffcdd2; 
    color: #c62828; 
}

.chart-container {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* AI Report Styling */


.sentiment-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: capitalize;
    background: rgba(248, 249, 250, 0.25);
    color: #222 !important;
    min-width: 90px;
    text-align: center;
    display: inline-block;
}

.sentiment-badge.positive {
    background-color: #d4edda;
    color: #155724;
}

.sentiment-badge.negative {
    background-color: #f8d7da;
    color: #721c24;
}

.sentiment-badge.neutral {
    background-color: #e2e3e5;
    color: #383d41;
}


.priority-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(248, 249, 250, 0.25);
    color: #222 !important;
    min-width: 90px;
    text-align: center;
    display: inline-block;
}

.priority-badge.high {
    background-color: #f8d7da;
    color: #721c24;
}

.priority-badge.medium {
    background-color: #fff3cd;
    color: #856404;
}

.priority-badge.low {
    background-color: #d4edda;
    color: #155724;
}


.section-block {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255,255,255,0.25);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #222;
}

.section-block h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}


.sentiment-chart {
    padding: 20px;
    background: rgba(255,255,255,0.25);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #222;
}

.sentiment-bar {
    margin: 20px 0;
}

.sentiment-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.bar-container {
    width: 100%;
    height: 30px;
    background-color: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
}

.bar {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 15px;
}

.bar.positive {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.bar.negative {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

.bar.neutral {
    background: linear-gradient(90deg, #6c757d, #95a5a6);
}

.report-summary.alert {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
}

.report-summary.alert h2 {
    color: white;
}

.priority-high {
    background-color: #fff5f5;
}

.success-message {
    padding: 20px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    margin: 20px 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    border: 1px solid;
    display: inline-block;
    cursor: default;
}

.status-badge.complete {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.status-badge.incomplete {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #6c757d;
}

.error-message {
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin: 20px 0;
}

/* Admin Dashboard Styles */
.admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
}

.admin-dashboard header h1 {
    text-align: center;
    margin-bottom: 10px;
}

/* Compact Stats Cards */
.stats-cards-compact {
    display: flex;
    gap: 15px;
    margin: 20px 0 30px 0;
    flex-wrap: wrap;
}

.stat-card-compact {
    background: linear-gradient(135deg, #8B2500 0%, #B22222 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex: 1 1 calc(25% - 12px);
    min-width: 200px;
}

.stat-card-compact .stat-label,
.stat-card-compact .stat-value {
    font-size: 1.3em;
    font-weight: 600;
    color: white;
    margin: 0;
    padding: 0;
    display: inline-block;
    vertical-align: middle;
}

.stat-card-compact .stat-value {
    font-weight: 700;
}

/* Report Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: rgba(248, 249, 250, 0.15);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e9ecef;
    backdrop-filter: blur(5px);
}

.stat-card h3 {
    font-size: 2.5em;
    color: #B22222;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.stat-card p {
    font-size: 1em;
    color: #000;
    margin: 0;
    font-weight: 500;
}

/* Surveys List Section */
.surveys-list-section {
    margin: 30px 0;
}

.surveys-list-section h2 {
    margin-bottom: 15px;
    color: #3E2723;
}

.surveys-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.survey-list-item {
    background: rgba(248, 249, 250, 0.15);
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(2.5px);
}

.survey-list-item:hover {
    background: #e9ecef;
    border-color: #B22222;
    transform: translateX(5px);
}

.survey-list-item.selected {
    background: #ffe6e6;
    border-color: #B22222;
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(178, 34, 34, 0.2);
}

.survey-row.selected {
    background: #ffe6e6 !important;
    border-left: 4px solid #B22222;
    font-weight: 600;
}

.survey-row:hover {
    background: #f0f0f0;
    cursor: pointer;
}

.survey-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.survey-item-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2c3e50;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-active {
    background-color: #d4edda;
    color: #155724;
}

.badge-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.survey-item-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    font-size: 0.9em;
    color: #495057;
}

.no-surveys {
    padding: 40px;
    text-align: center;
    color: #6c757d;
    font-size: 1.1em;
}

/* Supervisors Section */
.supervisors-section {
    margin: 30px 0;
}

.supervisors-section h2 {
    margin-bottom: 15px;
    color: #3E2723;
}

.table-container {
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

.table-container th {
    background: linear-gradient(135deg, #8B2500 0%, #B22222 100%);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.table-container td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.table-container tbody tr:hover {
    background-color: #f8f9fa;
}

.btn-edit, .btn-delete, .btn-view {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.2s;
}

.btn-edit {
    background-color: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background-color: #ffca2c;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

.btn-view {
    background-color: #17a2b8;
    color: white;
}

.btn-view:hover {
    background-color: #138496;
}

/* Bottom Action Bar */
.bottom-action-bar {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 20px;
    margin: 30px -30px -30px -30px;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.bottom-action-bar .btn-primary {
    min-width: 180px;
}

.bottom-action-bar .btn-secondary {
    min-width: 180px;
}

.bottom-action-bar .btn-primary:disabled,
.bottom-action-bar .btn-secondary:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

.bottom-action-bar .btn-primary:disabled:hover,
.bottom-action-bar .btn-secondary:disabled:hover {
    background: #6c757d !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Supervisor/Org Management Page */
.mgmt-container {
    max-width: 900px;
    margin: 0 auto;
}

.mgmt-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 25px;
    margin: 20px 0;
    border-radius: 10px;
    border-left: 4px solid #B22222;
}

.mgmt-section h2 {
    margin-bottom: 20px;
    color: #3E2723;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: start;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #B22222;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Change Password Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 900px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.password-requirements {
    background: #fff3cd;
    padding: 10px;
    border-radius: 5px;
    margin: 15px 0;
}

.password-requirements ul {
    margin: 5px 0 0 20px;
}

.survey-details {
    margin-top: -15px; /* Move Survey Details card up by 15px */
}

.toggle-size-btn {
    color: #4E342E;
    font-size: 2.5em;
    transition: transform 0.3s;
    line-height: 1;
    padding: 0;
}

.toggle-size-btn:hover {
    color: #B22222;
    transform: scale(1.1);
}

.survey-details {
    transition: max-height 0.4s ease, margin-bottom 0.4s ease;
    overflow: hidden;
    max-height: 1000px;
    margin-bottom: 20px;
}

.survey-details.minimized {
    max-height: 180px;
    margin-bottom: 20px;
}

.survey-details + .card {
    transition: margin-top 0.4s ease;
}
