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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 15px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.header h1 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.2;
}

.header p {
    font-size: 0.9em;
    color: #7f8c8d;
}

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

.home-btn {
    padding: 8px 14px;
    background: linear-gradient(135deg, #276dae 0%, #5f2299 100%);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85em;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    border: none;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(39, 77, 174, 0.5);
    background: linear-gradient(135deg, #2a2299 0%, #1e2d84 100%);
}

.disclaimer {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.85em;
    text-align: left;
}

.stats-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h3 {
    font-size: 0.75em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 1.8em;
    font-weight: bold;
}

.stat-card .percentage {
    font-size: 1em;
    margin-top: 5px;
    opacity: 0.95;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60 0%, #667eea 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8em;
}

.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #bdc3c7;
}

.filter-section {
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.9em;
}

.filter-btn {
    padding: 8px 12px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85em;
    font-weight: bold;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.filter-btn:hover {
    border-color: #667eea;
}

.category-container {
    margin-bottom: 20px;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.category-header:hover {
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.category-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.category-icon {
    font-size: 1.5em;
    min-width: 30px;
}

.category-info {
    flex: 1;
}

.category-family {
    font-size: 1.4em;
    font-weight: bold;
}

.category-stats {
    font-size: 0.85em;
    opacity: 0.9;
}

.category-toggle {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    min-width: 30px;
    text-align: right;
}

.category-toggle.expanded {
    transform: rotate(180deg);
}

.category-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

.category-body.collapsed {
    display: none;
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

.control-item {
    background: white;
    border-left: 4px solid #667eea;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.control-item.met { border-left-color: #27ae60; background: #f0fdf4; }
.control-item.not-met { border-left-color: #e74c3c; background: #fef2f2; }
.control-item.na { border-left-color: #95a5a6; background: #f3f4f6; }
.control-item.other { border-left-color: #f39c12; background: #fffbf0; }
.control-item.hidden { display: none; }

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.control-id {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.05em;
    min-width: 80px;
}

.control-title {
    font-weight: 600;
    color: #333;
    font-size: 1em;
    margin-bottom: 5px;
}

.control-description {
    color: #555;
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 0.9em;
    background: white;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

/* === NEW STYLES FOR ASSESSMENT OBJECTIVES === */
.objectives-section {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0 15px 0;
    border: 1px solid #e9ecef;
    border-left: 4px solid #95a5a6;
}

.objectives-header {
    font-size: 0.8em;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.objective-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 4px;
    border-radius: 4px;
}

.objective-item:hover {
    background: #fff;
}

/* Custom Checkbox */
.checkbox-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    width: 100%;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    top: 2px;
    height: 18px;
    width: 18px;
    min-width: 18px;
    background-color: #fff;
    border: 2px solid #bdc3c7;
    border-radius: 3px;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.checkbox-wrapper:hover input ~ .checkmark {
    border-color: #667eea;
}

.checkbox-wrapper input:checked ~ .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked ~ .checkmark:after {
    display: block;
}

.objective-text {
    font-size: 0.85em;
    color: #34495e;
    line-height: 1.4;
    padding-top: 1px;
}

.checkbox-wrapper input:checked ~ .objective-text {
    color: #7f8c8d;
    text-decoration: line-through;
}

/* === END NEW STYLES === */

.control-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    background: #667eea;
    color: white;
}

.control-status-badge.met { background: #27ae60; }
.control-status-badge.not-met { background: #e74c3c; }
.control-status-badge.na { background: #95a5a6; }
.control-status-badge.other { background: #f39c12; }

.control-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.status-btn {
    padding: 8px 10px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.85em;
}

.status-btn:hover { border-color: #667eea; }
.status-btn.selected { background: #667eea; color: white; border-color: #667eea; }
.status-btn.met.selected { background: #27ae60; border-color: #27ae60; }
.status-btn.not-met.selected { background: #e74c3c; border-color: #e74c3c; }
.status-btn.na.selected { background: #95a5a6; border-color: #95a5a6; }
.status-btn.other.selected { background: #f39c12; border-color: #f39c12; }

.notes-section { margin-top: auto; }
.notes-label { font-size: 0.85em; font-weight: bold; color: #555; margin-bottom: 5px; display: block; }
.notes-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.85em;
    resize: vertical;
    min-height: 50px;
}
.notes-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 5px rgba(102, 126, 234, 0.3); }

.expand-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.expand-controls-label { font-weight: bold; color: #2c3e50; font-size: 0.9em; align-self: center; }
.expand-btn {
    padding: 8px 12px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85em;
    font-weight: bold;
}
.expand-btn:hover { background: #667eea; color: white; }

/* Responsiveness */
@media (min-width: 600px) {
    body { padding: 15px; }
    .container { border-radius: 15px; padding: 25px; }
    .header h1 { font-size: 2em; }
    .stats-box { grid-template-columns: repeat(4, 1fr); }
    .control-actions { grid-template-columns: repeat(4, 1fr); }
    .actions { grid-template-columns: repeat(3, 1fr); }
    .category-body { grid-template-columns: repeat(2, 1fr); max-height: 700px; }
}

@media (min-width: 900px) {
    body { padding: 20px; }
    .container { border-radius: 20px; padding: 40px; }
    .header h1 { font-size: 2.5em; }
    .stat-card { padding: 20px; }
    .stat-card .value { font-size: 2.2em; }
    .control-item { padding: 20px; }
    .category-body { grid-template-columns: repeat(2, 1fr); max-height: 800px; }
}

@media (max-width: 599px) {
    .header-top { justify-content: center; }
    .home-btn { width: 100%; justify-content: center; }
}