@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    
    /* Branding Accent colors */
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --border-color: #e2e8f0;
    --border-focus: #6366f1;
    --focus-ring: rgba(99, 102, 241, 0.15);
    
    --success: #10b981;
    --danger: #ef4444;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background decorative details to feel modern and premium */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: 5%;
    right: 5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.app-container {
    width: 100%;
    max-width: 800px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

/* Sticky Header styling */
.sticky-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 1000;
    padding: 0.75rem 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.partner-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 640px) {
    .sticky-header {
        padding: 0.5rem 1rem;
    }
    
    .header-logo {
        height: 46px;
    }
    
    .partner-logo {
        height: 48px;
    }
    
    .header-right {
        gap: 0.75rem;
    }
}

/* Header Branding styling */
.brand-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease-out;
}

.brand-logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.brand-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-top: 0.25rem;
}

.brand-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Main Form Card */
.form-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glowing Top Indicator Bar */
.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--accent-gradient);
}

.form-body {
    padding: 2.5rem;
}

/* Section Header styling */
.section-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

/* Form Layout Grid */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .form-body {
        padding: 1.5rem;
    }
}

/* Input Fields styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.form-group.full-width {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .form-group.full-width {
        grid-column: span 1;
    }
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-label .required-star {
    color: var(--danger);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition-normal);
}

.form-input:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.form-input:focus {
    border-color: var(--border-focus);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.form-input[readonly] {
    background-color: #f1f5f9;
    border-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-input[readonly]:hover {
    background-color: #f1f5f9;
    border-color: var(--border-color);
}

.form-input[readonly]:focus {
    box-shadow: none;
    border-color: var(--border-color);
    background-color: #f1f5f9;
}

/* Special styling for Date / Email/ Text inputs with indicators */
.form-input::placeholder {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Date picker calendar icon customization standard styling */
.form-input[type="date"] {
    color: var(--text-main);
}
.form-input[type="date"]:invalid {
    color: var(--text-light);
}

/* Footer & Buttons */
.form-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    background-size: 200% 100%;
    background-position: 0% 0%;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background-position: 100% 0%;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Status Messages & Tooltips */
.error-msg {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
    align-items: center;
    gap: 0.25rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Clean feedback classes */
.form-input.is-valid {
    border-color: var(--success);
    background-color: rgba(16, 185, 129, 0.02);
}

.form-input.is-invalid {
    border-color: var(--danger);
    background-color: rgba(239, 68, 68, 0.02);
}

/* Section 2: Appraisal Questions */
.section-questions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border-color);
}

/* Rating Scale Box */
.rating-instruction-box {
    background: rgba(99, 102, 241, 0.03);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.rating-instruction-box h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-scale-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .rating-scale-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.rating-scale-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: #ffffff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.rating-scale-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.2);
}

.rating-stars {
    display: inline-flex;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
}

.rating-stars svg {
    width: 15px;
    height: 15px;
    fill: #eab308; /* yellow-500 */
    stroke: #eab308;
}

/* Questions styling */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.question-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: var(--transition-normal);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.question-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

.question-card.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.question-card.is-valid {
    border-color: var(--success);
}

.question-num {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 28px;
    height: 28px;
    background: rgba(99, 102, 241, 0.06);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.question-content {
    padding-left: 2.25rem;
}

.question-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

/* Star Rating Selector */
.star-rating-block {
    margin-bottom: 1.5rem;
}

.star-rating-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.star-rating-label span {
    color: var(--danger);
}

.star-rating {
    display: inline-flex;
    gap: 0.35rem;
    flex-direction: row;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.15rem;
    color: var(--text-light);
    transition: transform 0.1s ease, color 0.15s ease;
}

.star-btn:hover {
    transform: scale(1.2);
}

.star-btn:active {
    transform: scale(0.9);
}

.star-btn svg {
    width: 28px;
    height: 28px;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.5px;
    transition: fill 0.15s ease, stroke 0.15s ease;
}

.star-btn.is-active svg {
    color: #eab308; /* yellow-500 */
    fill: #eab308;
    stroke: #eab308;
}

.star-btn.is-hovered svg {
    color: #facc15; /* yellow-400 */
    fill: #facc15;
    stroke: #facc15;
}

/* Comment Box */
.comment-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-label span {
    color: var(--danger);
}

.char-counter {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.char-counter.is-valid {
    color: var(--success);
    background: rgba(16, 185, 129, 0.08);
}

.char-counter.is-invalid {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

.comment-textarea {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    resize: vertical;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition-normal);
}

.comment-textarea:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.comment-textarea:focus {
    border-color: var(--border-focus);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Section 3: Goals for the Next Review Period */
.section-goals {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border-color);
}

.goals-table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.goals-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-size: 0.9rem;
    text-align: left;
}

.goals-table th {
    background-color: #fafbfc;
    color: var(--text-muted);
    font-weight: 700;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goals-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.goals-table tr:last-child td {
    border-bottom: none;
}

.goal-area-label {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
}

/* Inputs inside table cells */
.table-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition-normal);
}

.table-input:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.table-input:focus {
    border-color: var(--border-focus);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.table-input.is-invalid {
    border-color: var(--danger);
    background-color: rgba(239, 68, 68, 0.02);
}

.table-input.is-valid {
    border-color: var(--success);
    background-color: rgba(16, 185, 129, 0.02);
}

.table-textarea {
    min-height: 55px;
    height: 60px;
    resize: vertical;
    padding: 0.5rem 0.75rem;
    line-height: 1.45;
}

/* Section 4 & 5 Styles */
.section-final-comments,
.section-sign-off {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border-color);
}

.field-instruction {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: -0.25rem;
    margin-bottom: 0.5rem;
}

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

.sign-off-table td {
    padding: 0.75rem 1.25rem;
}


