:root {
    --purple-light: #C8A2C8;
    --purple-medium: #9370DB;
    --purple-dark: #6A4C93;
    --burgundy: #8B1538;
    --cream: #FFF8F0;
    --gray-dark: #2A2A2A;
    --gray-medium: #666666;
    --gray-light: #E5E5E5;
    --white: #FFFFFF;
    --success: #2ECC71;
    --warning: #F39C12;
    --danger: #E74C3C;
}

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

body {
    font-family: 'Epilogue', sans-serif;
    background: linear-gradient(135deg, var(--cream) 0%, #FFFFFF 100%);
    color: var(--gray-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 3px solid var(--purple-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    width: 80px;
    height: 80px;
    background: var(--purple-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--burgundy);
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(200, 162, 200, 0.3);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--burgundy);
    font-weight: 400;
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.85rem;
    color: var(--gray-medium);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu button {
    background: none;
    border: none;
    color: var(--gray-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    font-family: 'Epilogue', sans-serif;
    font-size: 1rem;
}

.nav-menu button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--purple-medium);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu button:hover::after,
.nav-menu button.active::after {
    width: 80%;
}

.nav-menu button.active {
    color: var(--purple-dark);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 3.5rem;
    color: var(--gray-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .highlight {
    color: var(--purple-dark);
    position: relative;
    display: inline-block;
}

.hero .highlight::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--purple-light);
    opacity: 0.3;
    z-index: -1;
    transform: skew(-12deg);
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray-medium);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.3s; }
.stat-card:nth-child(2) { animation-delay: 0.4s; }
.stat-card:nth-child(3) { animation-delay: 0.5s; }
.stat-card:nth-child(4) { animation-delay: 0.6s; }

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--purple-light), var(--purple-medium));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-medium);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Login Section */
.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 2rem auto;
}

.login-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Welcome Page */
.welcome-container {
    background: var(--white);
    border-radius: 20px;
    padding: 4rem 3rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 900px;
    margin: 3rem auto;
}

.welcome-container h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 2.5rem;
    color: var(--purple-dark);
    margin-bottom: 1rem;
}

.welcome-container > p {
    font-size: 1.2rem;
    color: var(--gray-medium);
    margin-bottom: 3rem;
}

.role-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.role-btn {
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--purple-medium) 100%);
    border: none;
    border-radius: 16px;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(147, 112, 219, 0.2);
    color: var(--white);
}

.role-btn:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(147, 112, 219, 0.4);
    background: linear-gradient(135deg, var(--purple-medium) 0%, var(--purple-dark) 100%);
}

.role-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.role-btn h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.role-btn p {
    font-size: 1rem;
    opacity: 0.95;
}

.back-to-welcome {
    display: inline-block;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: var(--gray-light);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-dark);
    transition: all 0.3s ease;
}

.back-to-welcome:hover {
    background: var(--gray-medium);
    color: var(--white);
}

.employee-id-field {
    background: linear-gradient(135deg, #f0e6ff 0%, #fff 100%);
    border: 2px solid var(--purple-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.employee-id-field label {
    font-weight: 600;
    color: var(--purple-dark);
}

.employee-id-field .required {
    color: var(--danger);
    font-weight: bold;
}

/* Rating Form */
.rating-form {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

.form-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--purple-light);
}

.form-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-field input,
.form-field textarea,
.form-field select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-family: 'Epilogue', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--purple-medium);
    box-shadow: 0 0 0 3px rgba(147, 112, 219, 0.1);
}

.form-field input:disabled,
.form-field textarea:disabled,
.form-field select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Rating Scale */
.rating-scale {
    background: linear-gradient(135deg, #F8F4FF 0%, #FFF8F0 100%);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.scale-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--purple-dark);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scale-items {
    display: grid;
    gap: 1rem;
}

.scale-item {
    display: grid;
    grid-template-columns: 60px 200px 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1rem;
    background: var(--white);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.scale-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.scale-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--purple-medium), var(--purple-dark));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
}

.scale-rating {
    font-weight: 600;
    color: var(--gray-dark);
}

.scale-description {
    color: var(--gray-medium);
    font-size: 0.9rem;
}

/* Performance Categories */
.performance-section {
    margin-top: 3rem;
}

.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--gray-dark);
    margin-bottom: 2rem;
}

.category-item {
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.category-item:hover {
    border-color: var(--purple-light);
    box-shadow: 0 4px 20px rgba(200, 162, 200, 0.15);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.category-info {
    flex: 1;
}

.category-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: var(--purple-light);
    color: var(--white);
    border-radius: 8px;
    text-align: center;
    line-height: 32px;
    font-weight: 700;
    margin-right: 1rem;
}

.category-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
}

.category-description {
    color: var(--gray-medium);
    font-size: 0.9rem;
    line-height: 1.6;
}

.rating-controls {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.rating-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--gray-light);
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-medium);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rating-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--purple-light), var(--purple-medium));
    transition: left 0.3s ease;
    z-index: 0;
}

.rating-btn span {
    position: relative;
    z-index: 1;
}

.rating-btn:hover::before {
    left: 0;
}

.rating-btn:hover {
    color: var(--white);
    border-color: var(--purple-medium);
}

.rating-btn.selected {
    background: linear-gradient(135deg, var(--purple-medium), var(--purple-dark));
    color: var(--white);
    border-color: var(--purple-dark);
}

.rating-btn.selected::before {
    display: none;
}

/* Overall Score */
.overall-score {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple-medium));
    color: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    margin: 3rem 0;
    text-align: center;
}

.overall-score h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.score-display {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.score-label {
    font-size: 1.2rem;
    opacity: 0.85;
}

/* Promotion Section */
.promotion-section {
    background: var(--cream);
    padding: 2.5rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.promotion-section h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Management Decision Section */
.management-section {
    background: #E8F5E9;
    padding: 2.5rem;
    border-radius: 16px;
    margin: 2rem 0;
    border-left: 4px solid var(--success);
}

.management-section h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

.admin-only-badge {
    display: inline-block;
    background: var(--warning);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 1rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-light);
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-family: 'Epilogue', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-dark);
    border: 2px solid var(--gray-light);
}

.btn-secondary:hover {
    background: var(--gray-light);
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple-medium), var(--purple-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(147, 112, 219, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(147, 112, 219, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #C0392B;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(72, 187, 120, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Employee Selection Button */
.employee-select-btn {
    width: 100%;
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: 'Epilogue', sans-serif;
}

.employee-select-btn:hover {
    background: linear-gradient(135deg, #f8f4ff 0%, #f0e6ff 100%);
    border-color: var(--purple-medium);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.2);
}

.employee-select-btn:active {
    transform: translateX(5px) scale(0.98);
}

/* Guidelines & Methodology */
.info-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.info-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
}

.info-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--purple-dark);
    margin: 2rem 0 1rem;
}

.info-card p {
    color: var(--gray-medium);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.info-card ul {
    margin-left: 1.5rem;
    color: var(--gray-medium);
    line-height: 1.8;
}

.info-card ul li {
    margin-bottom: 0.5rem;
}

.methodology-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: 12px;
}

.methodology-table th {
    background: var(--purple-dark);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.methodology-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.methodology-table tr:nth-child(even) {
    background: var(--cream);
}

.methodology-table tr:hover {
    background: rgba(200, 162, 200, 0.1);
}

/* Admin Panel */
.admin-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.rating-item {
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.rating-item:hover {
    border-color: var(--purple-light);
    box-shadow: 0 4px 20px rgba(200, 162, 200, 0.15);
}

.rating-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.rating-item-info h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
}

.rating-item-info p {
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.rating-item-score {
    text-align: center;
}

.rating-score-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--purple-dark);
}

.rating-score-label {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

.rating-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--gray-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-medium);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--gray-dark);
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.alert-error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* ─── TOAST NOTIFICATIONS ───────────────────────────────────── */
#toast-container {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
    display: flex; flex-direction: column; gap: 0.75rem; pointer-events: none;
}
.toast {
    padding: 0.9rem 1.4rem; border-radius: 10px; font-family: 'Epilogue', sans-serif;
    font-size: 0.92rem; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    pointer-events: all; max-width: 360px; opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease; color: #fff;
}
.toast-success { background: #1B7A3B; }
.toast-error   { background: #C0392B; }
.toast-warn    { background: #B7770D; }
.toast-info    { background: var(--purple-dark); }

/* ─── COMPARISON VIEW ───────────────────────────────────────── */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.comparison-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--gray-light);
}

.comparison-card.self {
    border-color: var(--purple-light);
}

.comparison-card.manager {
    border-color: #34495e;
}

.comparison-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-light);
}

.comparison-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.comparison-badge.self {
    background: var(--purple-light);
    color: var(--white);
}

.comparison-badge.manager {
    background: #34495e;
    color: var(--white);
}

.comparison-score {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--purple-dark);
    text-align: center;
    margin: 1rem 0;
}

.comparison-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.comparison-category-name {
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.comparison-rating {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--purple-dark);
}

.comparison-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem;
    color: var(--gray-dark);
}

.comparison-text {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--gray-light);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray-dark);
}

.comparison-empty {
    text-align: center;
    padding: 3rem;
    color: var(--gray-medium);
}

.comparison-list {
    max-height: 70vh;
    overflow-y: auto;
}

.comparison-item {
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comparison-item:hover {
    border-color: var(--purple-medium);
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.2);
}

.comparison-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comparison-employee-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-dark);
}

.comparison-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.comparison-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comparison-stat-label {
    font-size: 0.75rem;
    color: var(--gray-medium);
    text-transform: uppercase;
}

.comparison-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--purple-dark);
}

.comparison-keeper {
    margin-top: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2e7d32;
}

/* ─── KEEPER TEST MODAL ─────────────────────────────────────── */
.keeper-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 40, 0.6);
    backdrop-filter: blur(6px);
    z-index: 500;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem 1rem;
}
.keeper-modal.active { display: flex; }

.keeper-shell {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 720px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.25);
    overflow: hidden;
    margin: auto;
}

.keeper-header {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple-medium));
    padding: 2rem 2.5rem;
    color: var(--white);
}
.keeper-header .step-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 0.4rem;
}
.keeper-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.7rem;
    font-weight: 400;
    margin-bottom: 0.4rem;
}
.keeper-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.keeper-progress {
    display: flex;
    gap: 6px;
    padding: 1rem 2.5rem;
    background: #F8F4FF;
    border-bottom: 1px solid var(--gray-light);
    align-items: center;
}
.kt-dot {
    width: 28px;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-light);
    transition: background 0.3s ease;
}
.kt-dot.filled { background: var(--purple-medium); }
.kt-dot.active { background: var(--purple-dark); }
.kt-progress-label {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--gray-medium);
    font-weight: 600;
}

.keeper-body { padding: 2rem 2.5rem; }

/* Step visibility */
.kt-step { display: none; }
.kt-step.active { display: block; animation: fadeIn 0.3s ease; }

/* Section grouping */
.kt-section {
    border: 1.5px solid var(--gray-light);
    border-radius: 14px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.kt-section-header {
    background: #F8F4FF;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.kt-section-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--purple-light), var(--purple-medium));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.kt-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--purple-dark);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.kt-questions { padding: 0.25rem 0; }

/* Individual question row */
.kt-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gray-light);
}
.kt-question:first-child { border-top: none; }
.kt-question-text {
    font-size: 0.96rem;
    color: var(--gray-dark);
    line-height: 1.5;
    flex: 1;
}

.kt-yn-group {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}
.kt-yn-btn {
    width: 56px;
    height: 36px;
    border: 2px solid var(--gray-light);
    background: var(--white);
    border-radius: 8px;
    font-family: 'Epilogue', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-medium);
}
.kt-yn-btn:hover { border-color: var(--purple-medium); color: var(--purple-dark); }
.kt-yn-btn.selected-yes {
    background: #E8F5E9;
    border-color: var(--success);
    color: #1B7A3B;
}
.kt-yn-btn.selected-no {
    background: #FFF3F3;
    border-color: var(--danger);
    color: #C0392B;
}

/* Comment toggle */
.kt-comment-row {
    padding: 0.5rem 1.25rem 1rem;
    border-top: 1px dashed var(--gray-light);
}
.kt-comment-toggle {
    background: none;
    border: 1.5px dashed var(--purple-light);
    border-radius: 6px;
    padding: 0.35rem 0.85rem;
    font-family: 'Epilogue', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--purple-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}
.kt-comment-toggle:hover { background: #F8F4FF; }
.kt-comment-box {
    display: none;
    margin-top: 0.75rem;
}
.kt-comment-box.open { display: block; animation: fadeIn 0.2s ease; }
.kt-comment-box textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-family: 'Epilogue', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}
.kt-comment-box textarea:focus {
    outline: none;
    border-color: var(--purple-medium);
}

/* Final Keeper Question — standalone, prominent */
.kt-final-question {
    background: linear-gradient(135deg, #F8F4FF, #FFF8F0);
    border: 2px solid var(--purple-light);
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 1.5rem;
}
.kt-final-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--purple-dark);
    margin-bottom: 0.75rem;
}
.kt-final-question-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    color: var(--gray-dark);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}
.kt-final-yn {
    display: flex;
    gap: 0.75rem;
}
.kt-final-yn .kt-yn-btn {
    width: 90px;
    height: 44px;
    font-size: 0.95rem;
    border-radius: 10px;
}

/* Confirmation screen */
.kt-confirmation {
    text-align: center;
    padding: 1rem 0 1.5rem;
}
.kt-confirm-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--purple-light), var(--purple-medium));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}
.kt-confirm-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
}
.kt-confirm-sub {
    color: var(--gray-medium);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}
.kt-confirm-summary {
    background: var(--cream);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}
.kt-confirm-summary h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
.kt-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.9rem;
}
.kt-summary-row:last-child { border-bottom: none; }
.kt-summary-label { color: var(--gray-medium); }
.kt-summary-val-yes { font-weight: 700; color: #1B7A3B; }
.kt-summary-val-no { font-weight: 700; color: #C0392B; }
.kt-verdict-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 1rem;
}
.verdict-strong  { background: #D4EDDA; color: #155724; }
.verdict-retain  { background: #D1ECF1; color: #0C5460; }
.verdict-discuss { background: #FFF3CD; color: #856404; }
.verdict-warn    { background: #FFE8D0; color: #7B3F00; }
.verdict-exit    { background: #F8D7DA; color: #721c24; }

/* ─── KEEPER SCORE BUTTONS ──────────────────────────────────── */
.kt-score-options { display: flex; flex-direction: column; gap: 10px; margin-top: 1.25rem; }
.kt-score-btn {
    display: flex; align-items: center; gap: 16px;
    padding: 0.85rem 1.2rem;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left; width: 100%;
    font-family: 'Epilogue', sans-serif;
}
.kt-score-btn:hover { border-color: var(--purple-medium); background: #F8F4FF; }
.kt-score-num {
    width: 38px; height: 38px; border-radius: 50%;
    background: #F0EBF8;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 800; color: var(--purple-dark);
    flex-shrink: 0; transition: all 0.2s ease;
}
.kt-score-btn-label { font-size: 0.95rem; font-weight: 600; color: var(--gray-dark); transition: color 0.2s; }
.kt-score-check { margin-left: auto; font-size: 1.1rem; display: none; }

.kt-score-btn.score-5.selected { border-color: #28a745; background: #D4EDDA; }
.kt-score-btn.score-5.selected .kt-score-num { background: #28a745; color: #fff; }
.kt-score-btn.score-5.selected .kt-score-btn-label { color: #155724; }
.kt-score-btn.score-5.selected .kt-score-check { display: block; color: #155724; }

.kt-score-btn.score-4.selected { border-color: #17a2b8; background: #D1ECF1; }
.kt-score-btn.score-4.selected .kt-score-num { background: #17a2b8; color: #fff; }
.kt-score-btn.score-4.selected .kt-score-btn-label { color: #0C5460; }
.kt-score-btn.score-4.selected .kt-score-check { display: block; color: #0C5460; }

.kt-score-btn.score-3.selected { border-color: #ffc107; background: #FFF3CD; }
.kt-score-btn.score-3.selected .kt-score-num { background: #ffc107; color: #fff; }
.kt-score-btn.score-3.selected .kt-score-btn-label { color: #856404; }
.kt-score-btn.score-3.selected .kt-score-check { display: block; color: #856404; }

.kt-score-btn.score-2.selected { border-color: #fd7e14; background: #FFE8D0; }
.kt-score-btn.score-2.selected .kt-score-num { background: #fd7e14; color: #fff; }
.kt-score-btn.score-2.selected .kt-score-btn-label { color: #7B3F00; }
.kt-score-btn.score-2.selected .kt-score-check { display: block; color: #7B3F00; }

.kt-score-btn.score-1.selected { border-color: #dc3545; background: #F8D7DA; }
.kt-score-btn.score-0.selected { border-color: #ADB5BD; background: #F8F9FA; }
.kt-score-btn.score-0.selected .kt-score-num { background: #868E96; color: #fff; }
.kt-score-btn.score-0.selected .kt-score-btn-label { color: #343A40; }
.kt-score-btn.score-0.selected .kt-score-check { display: block; color: #343A40; }
/* Compact likert for keeper */
.kt-score-options .kt-score-btn { flex: 1; padding: 0; justify-content: center; min-height: 50px; }
.kt-score-btn.score-1.selected .kt-score-num { background: #dc3545; color: #fff; }
.kt-score-btn.score-1.selected .kt-score-btn-label { color: #721c24; }
.kt-score-btn.score-1.selected .kt-score-check { display: block; color: #721c24; }

/* Optional comment area */
.kt-optional-comment {
    margin-top: 1.5rem;
    border: 1.5px dashed var(--purple-light);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    background: #FAFAFA;
}
.kt-optional-label {
    font-size: 0.82rem; font-weight: 700; color: var(--purple-dark);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.6rem;
}
.kt-optional-hint { font-size: 0.85rem; color: var(--gray-medium); margin-bottom: 0.75rem; }
.kt-optional-comment textarea {
    width: 100%; padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light); border-radius: 8px;
    font-family: 'Epilogue', sans-serif; font-size: 0.9rem;
    resize: vertical; min-height: 90px; transition: border-color 0.2s ease;
    background: var(--white);
}
.kt-optional-comment textarea:focus { outline: none; border-color: var(--purple-medium); }

.keeper-footer {
    padding: 1.25rem 2.5rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .scale-item {
        grid-template-columns: 1fr;
    }

    .rating-controls {
        flex-wrap: wrap;
    }
}

/* ─── LIKERT SCALE ───────────────────────────────────────────── */
.likert-scale { gap: 5px !important; }
.likert-scale .rating-btn {
    min-width: 36px !important; width: auto !important;
    height: 40px !important; flex: 1;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
}
.likert-axis {
    display: flex; justify-content: space-between;
    font-size: 0.65rem; color: #aaa; margin-top: 4px;
    padding: 0 2px;
}

/* ─── AI UTILIZATION CATEGORY ────────────────────────────────── */
.ai-category {
    border: 2px solid var(--purple-dark) !important;
    border-radius: 14px !important;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(106,76,147,0.13);
}
.ai-cat-header {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple-medium));
    padding: 1rem 1.25rem;
}
.ai-cat-title-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 2px;
}
.ai-cat-name { color: #fff; font-weight: 700; font-size: 1rem; }
.ai-weight-badge {
    margin-left: auto; background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff; border-radius: 20px;
    padding: 2px 12px; font-size: 0.8rem; font-weight: 900;
}
.ai-cat-header .category-description { color: rgba(255,255,255,0.75) !important; font-size: 0.82rem; }
.ai-sub-rows { background: #fff; }
.ai-sub-row {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--gray-light);
}
.ai-sub-row:last-child { border-bottom: none; }
.ai-sub-info { margin-bottom: 8px; }
.ai-sub-label { font-weight: 700; font-size: 0.9rem; color: var(--gray-dark); display: block; }
.ai-sub-desc { font-size: 0.78rem; color: var(--gray-medium); }
.ai-avg-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, #4A3273, var(--purple-dark));
    border-top: 2px solid var(--purple-light);
}
.ai-avg-label { color: rgba(255,255,255,0.8); font-size: 0.82rem; font-weight: 600; }
.ai-avg-score {
    color: #fff; font-size: 1.6rem; font-weight: 900;
}

/* ─── KEEPER EMOTION PANEL ───────────────────────────────────── */
.kt-emotion-panel {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gray-light);
    animation: fadeIn 0.2s ease;
}
.kt-emotion-title {
    font-size: 1rem; font-weight: 800; margin-bottom: 4px;
}
.kt-emotion-desc { font-size: 0.88rem; line-height: 1.55; }
.kt-emotion-badge {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    border-radius: 20px; padding: 2px 10px; margin-left: 8px;
    vertical-align: middle;
}
.kt-retention-bar-wrap { margin-top: 10px; }
.kt-retention-bar-label {
    display: flex; justify-content: space-between;
    font-size: 0.68rem; opacity: 0.75; margin-bottom: 4px;
}
.kt-retention-bar-track {
    height: 6px; border-radius: 6px; overflow: hidden;
    background: rgba(255,255,255,0.3);
}
.kt-retention-bar-fill {
    height: 100%; border-radius: 6px;
    transition: width 0.4s ease;
    background: rgba(255,255,255,0.8);
}
.kt-score-note {
    margin-top: 8px; padding: 5px 10px;
    background: #FFF8F0; border: 1px solid #FFE0B2;
    border-radius: 7px; font-size: 0.71rem; color: #9E6B1A;
}
