/* ============================================================
   CYBLSA - Design System
   360-Degree Evaluation System
   Palette derived from CYBLSA corporate logo
   ============================================================ */

/* ----------------------------------------------------------
   CSS Variables
   ---------------------------------------------------------- */
:root {
    /* Sidebar / Navigation — deep teal from logo */
    --color-sidebar: #07344A;
    --color-sidebar-hover: #0B4F6C;

    /* Page */
    --color-page-bg: #EFF3F6;
    --color-card: #FFFFFF;

    /* Primary — CYBLSA teal blue */
    --color-primary: #1A8DB8;
    --color-primary-hover: #14799F;
    --color-primary-light: rgba(26, 141, 184, 0.12);

    /* Accent — CYBLSA orange from logo dot */
    --color-accent: #E8862A;
    --color-accent-hover: #D07522;
    --color-accent-light: rgba(232, 134, 42, 0.12);

    /* Text */
    --color-text-primary: #0B2838;
    --color-text-secondary: #5A7282;
    --color-text-on-dark: #E1ECF1;

    /* Semantic */
    --color-success: #0F8A65;
    --color-warning: #E8862A;
    --color-danger: #D32F2F;
    --color-info: #1A8DB8;

    /* Borders */
    --color-border: #D6E0E6;
    --color-input-border: #B8C8D2;

    /* Surfaces */
    --color-table-header: #F4F7FA;
    --color-table-row-hover: #F4F7FA;
    --color-table-row-border: #EAF0F4;

    /* Scores */
    --color-score-1: #D32F2F;
    --color-score-2: #E8862A;
    --color-score-3: #1A8DB8;
    --color-score-4: #0F8A65;

    /* Layout */
    --sidebar-width: 260px;

    /* Typography */
    --font-heading: 'DM Sans', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

/* ----------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-page-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--color-text-primary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ----------------------------------------------------------
   Loading Screen
   ---------------------------------------------------------- */
.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--color-page-bg);
    gap: 16px;
}

.app-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.app-loading-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: 3px;
}

.app-loading-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------
   Blazor Error UI
   ---------------------------------------------------------- */
#blazor-error-ui {
    color-scheme: light only;
    background: #E6F4FA;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: #0B4F6C;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: var(--color-danger);
    padding: 1rem 1rem 1rem 1.5rem;
    color: white;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.blazor-error-boundary::after {
    content: "Ha ocurrido un error.";
}

/* ----------------------------------------------------------
   Layout System
   ---------------------------------------------------------- */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--color-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    min-height: 100vh;
    overflow-y: auto;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

/* ----------------------------------------------------------
   Sidebar Styles
   ---------------------------------------------------------- */
.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sidebar-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, #1A8DB8, #3BA5D0, #E8862A);
    border-radius: 1px;
}

.sidebar-logo-img {
    height: 36px;
    width: auto;
    transition: opacity 0.2s;
}

.sidebar-logo-img:hover {
    opacity: 0.85;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-logo span {
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 4px;
    flex: 1;
}

.sidebar-section {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.35);
    padding: 16px 16px 8px;
    font-weight: 600;
    user-select: none;
}

.nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--color-sidebar-hover);
    color: white;
}

.nav-item.active {
    background: var(--color-primary-light);
    color: #3BA5D0;
    font-weight: 500;
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item .nav-icon svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    opacity: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-sidebar-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-on-dark);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.8rem;
    color: var(--color-text-on-dark);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.sidebar-logout:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #FCA5A5;
}

/* ----------------------------------------------------------
   Cards
   ---------------------------------------------------------- */
.card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text-primary);
    margin: 0;
}

.card-subtitle {
    font-size: 0.825rem;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

/* Stat cards */
.stat-card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    color: var(--color-primary);
    margin-bottom: 4px;
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
    color: white;
}

.btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.btn-secondary:hover:not(:disabled) {
    background: #E5E7EB;
    color: #1F2937;
}

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

.btn-danger:hover:not(:disabled) {
    background: #B91C1C;
    color: white;
}

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

.btn-success:hover:not(:disabled) {
    background: #047857;
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: #F3F4F6;
    color: var(--color-text-primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
    line-height: 1.4;
}

/* Ensure variant classes work without .btn base */
.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-outline, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-icon {
    padding: 8px;
    aspect-ratio: 1;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ----------------------------------------------------------
   Tables
   ---------------------------------------------------------- */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-card);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--color-table-header);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-table-row-border);
    font-size: 0.875rem;
    color: var(--color-text-primary);
}

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

tbody tr:hover {
    background: var(--color-table-row-hover);
}

.table-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.table-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-secondary);
}

.table-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

/* ----------------------------------------------------------
   Forms
   ---------------------------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.875rem;
    color: #374151;
}

.form-label .required {
    color: var(--color-danger);
    margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: var(--font-body);
    color: var(--color-text-primary);
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.form-input::placeholder {
    color: #9CA3AF;
}

.form-input.invalid,
.form-select.invalid,
.form-textarea.invalid {
    border-color: var(--color-danger);
}

.form-input.invalid:focus,
.form-select.invalid:focus,
.form-textarea.invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

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

.form-hint {
    font-size: 0.775rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.form-error {
    font-size: 0.775rem;
    color: var(--color-danger);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    margin-top: 24px;
}

/* Blazor validation integration */
.validation-message {
    font-size: 0.775rem;
    color: var(--color-danger);
    margin-top: 4px;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
    border-color: var(--color-success);
}

.invalid {
    outline: none;
    border-color: var(--color-danger);
}

/* ----------------------------------------------------------
   Badges / Status
   ---------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-pending {
    background: #E6F4FA;
    color: #0B4F6C;
}

.badge-inprogress {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-completed {
    background: #D1FAE5;
    color: #065F46;
}

.badge-active {
    background: #D1FAE5;
    color: #065F46;
}

.badge-inactive {
    background: #F3F4F6;
    color: #6B7280;
}

.badge-primary {
    background: var(--color-primary-light);
    color: var(--color-primary-hover);
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* ----------------------------------------------------------
   Score Colors
   ---------------------------------------------------------- */
.score-1 { color: var(--color-score-1); }
.score-2 { color: var(--color-score-2); }
.score-3 { color: var(--color-score-3); }
.score-4 { color: var(--color-score-4); }

.score-bg-1 { background: var(--color-score-1); color: white; }
.score-bg-2 { background: var(--color-score-2); color: white; }
.score-bg-3 { background: var(--color-score-3); color: white; }
.score-bg-4 { background: var(--color-score-4); color: white; }

/* ----------------------------------------------------------
   Progress Bar
   ---------------------------------------------------------- */
.progress-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill-success {
    background: var(--color-success);
}

.progress-fill-danger {
    background: var(--color-danger);
}

/* ----------------------------------------------------------
   Modal
   ---------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeInOverlay 0.2s ease;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

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

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #F3F4F6;
    color: var(--color-text-primary);
}

.modal-body {
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

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

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ----------------------------------------------------------
   Toast / Notifications
   ---------------------------------------------------------- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 16px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 420px;
}

.toast-success {
    background: var(--color-success);
}

.toast-error {
    background: var(--color-danger);
}

.toast-warning {
    background: var(--color-warning);
}

.toast-info {
    background: var(--color-info);
}

.toast-dismiss {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.7;
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
}

.toast-dismiss:hover {
    opacity: 1;
}

/* ----------------------------------------------------------
   Evaluation Specific
   ---------------------------------------------------------- */
.eval-block {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 0;
    border-left: 4px solid var(--color-primary);
    overflow: hidden;
}

.eval-block-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
}

.eval-question {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-table-row-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.eval-question:last-child {
    border-bottom: none;
}

.eval-question-text {
    flex: 1;
    font-size: 0.9rem;
}

.eval-question-number {
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    min-width: 24px;
}

.score-selector {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.score-option {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 2px solid var(--color-border);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text-primary);
}

.score-option:hover {
    border-color: var(--color-primary);
    background: #E6F4FA;
}

.score-option.selected {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.score-option.na {
    font-size: 0.7rem;
    width: auto;
    padding: 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ----------------------------------------------------------
   Org Chart
   ---------------------------------------------------------- */
.org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
}

.org-node {
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    min-width: 180px;
    text-align: center;
    transition: all 0.2s ease;
}

.org-node:hover {
    box-shadow: var(--shadow-md);
}

.org-node.active {
    border-color: var(--color-primary);
}

.org-node-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.org-node-title {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.org-children {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding-top: 24px;
    position: relative;
}

.org-connector {
    width: 2px;
    height: 24px;
    background: var(--color-border);
    margin: 0 auto;
}

/* ----------------------------------------------------------
   Charts Placeholder
   ---------------------------------------------------------- */
.chart-container {
    aspect-ratio: 16 / 9;
    background: var(--color-table-header);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* ----------------------------------------------------------
   Employee Evaluation Layout (No Sidebar)
   ---------------------------------------------------------- */
.eval-layout {
    min-height: 100vh;
    background: var(--color-page-bg);
}

.eval-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px;
}

.eval-header {
    text-align: center;
    margin-bottom: 32px;
}

.eval-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.eval-header-logo .logo-icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
}

.eval-header-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.eval-header-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.eval-instructions {
    background: #E6F4FA;
    border-left: 4px solid var(--color-primary);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: #0B4F6C;
    line-height: 1.6;
}

.eval-stepper {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
}

.eval-step {
    width: 32px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.eval-step.completed {
    background: var(--color-success);
}

.eval-step.current {
    background: var(--color-primary);
}

.eval-thank-you {
    text-align: center;
    padding: 80px 32px;
}

.eval-thank-you-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #D1FAE5;
    color: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
}

.eval-thank-you h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.eval-thank-you p {
    color: var(--color-text-secondary);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto;
}

/* ----------------------------------------------------------
   Pagination
   ---------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    padding-top: 16px;
}

.pagination-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ----------------------------------------------------------
   Search / Filters Bar
   ---------------------------------------------------------- */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    width: 16px;
    height: 16px;
}

.search-input-wrapper .form-input {
    padding-left: 40px;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.5rem;
    }

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

    .eval-question {
        flex-direction: column;
        align-items: flex-start;
    }

    .score-selector {
        flex-wrap: wrap;
    }

    .eval-container {
        padding: 20px 16px;
    }

    .modal {
        width: 95%;
        padding: 24px;
        margin: 16px;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .search-bar {
        flex-direction: column;
    }

    .score-option {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    .table-container {
        border-radius: var(--radius-md);
    }

    th, td {
        padding: 10px 12px;
    }
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 101;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--color-card);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* ----------------------------------------------------------
   Animations
   ---------------------------------------------------------- */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.4s ease both;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }

/* ----------------------------------------------------------
   Utilities
   ---------------------------------------------------------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }

.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.1rem; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-0 { padding: 0; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-4 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.border { border: 1px solid var(--color-border); }
.border-t { border-top: 1px solid var(--color-border); }
.border-b { border-bottom: 1px solid var(--color-border); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* ----------------------------------------------------------
   Scrollbar Styling
   ---------------------------------------------------------- */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* ----------------------------------------------------------
   Print Styles
   ---------------------------------------------------------- */
@media print {
    .sidebar,
    .sidebar-footer,
    .mobile-menu-toggle,
    .toast-container,
    .btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
