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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c5530 0%, #1a3a1d 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
}
.header h1 { font-size: 28px; margin-bottom: 10px; }
.header p { opacity: 0.9; }

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 20px;
}
.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c5530;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #444;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2c5530;
    outline: none;
    box-shadow: 0 0 0 3px rgba(44,85,48,0.1);
}
.form-group textarea { min-height: 100px; resize: vertical; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.btn-primary {
    background: #2c5530;
    color: white;
}
.btn-primary:hover { background: #1a3a1d; }
.btn-secondary {
    background: #e0e0e0;
    color: #333;
}
.btn-secondary:hover { background: #d0d0d0; }
.btn-danger {
    background: #d32f2f;
    color: white;
}
.btn-danger:hover { background: #b71c1c; }
.btn-success {
    background: #388e3c;
    color: white;
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Questions */
.question-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #2c5530;
}
.question-item.hidden { display: none; }
.question-number {
    display: inline-block;
    background: #2c5530;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}
.question-text {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}
.question-ref {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

/* Section Header */
.section-header {
    background: linear-gradient(135deg, #2c5530 0%, #3d7342 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 30px 0 15px;
    font-weight: 600;
}

/* Score Box */
.score-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #2c5530;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin: 20px 0;
}
.score-value {
    font-size: 48px;
    font-weight: 700;
    color: #2c5530;
}
.score-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}
.score-level {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 10px;
}
.score-low { background: #c8e6c9; color: #2e7d32; }
.score-medium { background: #fff3e0; color: #f57c00; }
.score-high { background: #ffcdd2; color: #c62828; }
.score-very-high { background: #b71c1c; color: white; }

/* Table */
.table-wrapper { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
th {
    background: #f5f5f5;
    font-weight: 600;
    color: #444;
}
tr:hover { background: #fafafa; }

/* Status badges */
.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.status-draft { background: #fff3e0; color: #f57c00; }
.status-submitted { background: #e8f5e9; color: #2e7d32; }
.status-pending { background: #e3f2fd; color: #1976d2; }

/* Autosave indicator */
.autosave-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}
.autosave-indicator.show { opacity: 1; }
.autosave-indicator.success { background: #388e3c; }
.autosave-indicator.error { background: #d32f2f; }

/* Progress bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    z-index: 1001;
}
.progress-bar-fill {
    height: 100%;
    background: #2c5530;
    transition: width 0.3s;
}

/* Navigation */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    transform: translateY(-20px);
    transition: transform 0.3s;
}
.modal-overlay.show .modal {
    transform: translateY(0);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 15px; }
    .card { padding: 20px; }
    .header h1 { font-size: 22px; }
    .nav-buttons { flex-direction: column; gap: 10px; }
    .nav-buttons .btn { width: 100%; text-align: center; }
}

/* Admin sidebar */
.admin-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 250px;
    background: #1a3a1d;
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
}
.sidebar-logo {
    padding: 20px;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-menu { list-style: none; margin-top: 20px; }
.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}
.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
}
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
}

/* Question list in admin */
.question-list-item:hover {
    background: #f5f5f5;
}
.question-list-item.active {
    background: #e8f5e9;
    border-left: 3px solid #2c5530;
}