/**
 * =========================================================================
 * PRACTICUM ENGINEERING - UNIFIED DESIGN SYSTEM & THEME
 * =========================================================================
 * Modern Executive Design Language for Employee Evaluation System
 */

:root {
    /* Brand Palette */
    --brand-primary: #1e40af;       /* Deep Indigo / Corporate Blue */
    --brand-primary-hover: #1d4ed8;
    --brand-primary-soft: #eff6ff;
    --brand-secondary: #0f766e;     /* Teal accent */
    --brand-accent: #2563eb;        /* Vibrant Royal Blue */
    
    /* Neutral & Backgrounds */
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-soft: #f1f5f9;
    --border-color: #e2e8f0;
    --border-color-focus: #93c5fd;
    
    /* Typography Colors */
    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Grade Color Palette */
    --grade-a: #059669;       /* Emerald */
    --grade-bplus: #2563eb;   /* Royal Blue */
    --grade-b: #0891b2;       /* Cyan */
    --grade-cplus: #d97706;   /* Amber */
    --grade-c: #ea580c;       /* Orange */
    --grade-d: #dc2626;       /* Red */
    --grade-f: #991b1b;       /* Dark Red */

    /* Elevations & Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

/* Base Typography & Background */
body {
    font-family: "Prompt", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: radial-gradient(circle at top left, #eff6ff 0, #f8fafc 45%, #f1f5f9 100%);
    color: var(--text-body);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* App Header & Navbar */
.app-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 0.65rem 1.25rem;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-heading);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: var(--bg-surface-soft);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-body);
}

.role-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    background: #dbeafe;
    color: #1e40af;
    text-transform: uppercase;
}

/* Unified Card Container */
.app-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.app-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.app-card-body {
    padding: 1.5rem;
}

/* Page Hero Banner */
.page-hero {
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.page-hero-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Menu Grid Cards (For All Role Portals) */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.portal-card {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem 1.25rem;
    text-decoration: none;
    color: var(--text-heading);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.portal-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.portal-card-code {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-accent);
    margin-bottom: 0.35rem;
}

.portal-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.45rem;
}

.portal-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.portal-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.portal-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-primary-soft);
    color: var(--brand-accent);
    font-weight: bold;
    transition: transform 0.2s ease;
}

.portal-card:hover .portal-card-arrow {
    transform: translateX(4px);
    background: var(--brand-accent);
    color: #ffffff;
}

/* Evaluation Form Specific Styles */
.eval-question-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.15s ease;
}

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

.eval-question-card.answered {
    border-left: 4px solid var(--brand-accent);
    background: #fafcff;
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--brand-primary-soft);
    color: var(--brand-accent);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.question-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-heading);
    margin: 0;
    line-height: 1.45;
}

.category-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.category-knowledge { background: #e0f2fe; color: #0369a1; }
.category-skill { background: #dcfce7; color: #15803d; }
.category-attitude { background: #fef3c7; color: #b45309; }
.category-general { background: #f1f5f9; color: #475569; }

/* Interactive Radio Pills (Rating 1 to 5) */
.rating-group {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .rating-group {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.25rem;
    }
}

.rating-pill-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.35rem;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 0.65rem;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    text-align: center;
}

.rating-pill-label:hover {
    border-color: var(--brand-accent);
    background: var(--brand-primary-soft);
}

.rating-pill-input {
    display: none;
}

.rating-pill-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.rating-pill-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.rating-pill-input:checked + .rating-pill-label {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.rating-pill-input:checked + .rating-pill-label .rating-pill-score {
    color: #ffffff;
}

.rating-pill-input:checked + .rating-pill-label .rating-pill-desc {
    color: rgba(255, 255, 255, 0.85);
}

/* Sticky Bottom Score Bar */
.sticky-score-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.08);
    padding: 0.85rem 1.5rem;
    z-index: 1010;
}

/* Grade Badges */
.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 9999px;
    padding: 0.35rem 0.9rem;
    font-size: 1rem;
    color: #ffffff;
}

.grade-a { background: var(--grade-a); }
.grade-bplus { background: var(--grade-bplus); }
.grade-b { background: var(--grade-b); }
.grade-cplus { background: var(--grade-cplus); }
.grade-c { background: var(--grade-c); }
.grade-d { background: var(--grade-d); }
.grade-f { background: var(--grade-f); }

/* Employee Avatar Container */
.emp-photo-box {
    width: 100%;
    height: 240px;
    background: #f1f5f9;
    border-radius: 0.75rem;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.emp-photo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
