/*
   DESIGN SYSTEM - LVA-M Autoevaluacion
   Base solida de estilos.
*/

:root {
    --color-bg: #f5f6f8;
    --color-surface: #ffffff;
    --color-border: #e8eaef;
    --color-border-light: #f0f1f5;
    --color-text: #2b2d33;
    --color-text-secondary: #6b6f78;
    --color-text-muted: #9a9faa;
    --color-primary: #3b5cf0;
    --color-primary-hover: #2e4bd6;
    --color-primary-light: #eef1fd;
    --color-primary-gradient: linear-gradient(180deg, #4c6ef5 0%, #3b5cf0 50%, #2e4bd6 100%);
    --color-success: #22b07d;
    --color-success-hover: #1a9a6c;
    --color-success-light: #eafaf4;
    --color-warning: #f59e0b;
    --color-warning-light: #fffbeb;
    --color-danger: #ef4444;
    --color-danger-light: #fef2f2;
    --color-info: #6366f1;
    --color-info-light: #eef2ff;

/* -------------------------------------------------- */
    --shadow-card: 0px 1px 2px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 0px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0px 2px 4px rgba(0, 0, 0, 0.06), 0px 8px 16px rgba(0, 0, 0, 0.06);
    --shadow-input: 0px 1px 0px #efefef, 0px 1px 0.5px rgba(239, 239, 239, 0.5);
    --shadow-btn: 0px 0.5px 0.5px #efefef, 0px 1px 0.5px rgba(239, 239, 239, 0.5);

/* -------------------------------------------------- */
    --radius-sm: 7px;
    --radius-md: 9px;
    --radius-lg: 12px;
    --radius-xl: 16px;

/* -------------------------------------------------- */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

/* -------------------------------------------------- */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

/* -------------------------------------------------- */
    --navbar-height: 56px;
}

/* -------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    height: 100%;
}
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a {
    color: var(--color-primary);
    text-decoration: none;
}
a:hover {
    color: var(--color-primary-hover);
}
/* 
   NAVBAR

/* -------------------------------------------------- */
.navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    height: var(--navbar-height);
    position: sticky;
    top: 0;
    z-index: 50;
}
.navbar-inner {
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    color: var(--color-text);
}
.navbar-brand:hover {
    color: var(--color-text);
}
.navbar-brand-dot {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
}
.app-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.app-icon-sm {
    width: 20px;
    height: 20px;
}
.app-icon-lg {
    width: 36px;
    height: 36px;
}
.navbar-subtitle {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-normal);
}
.navbar-logo {
    height: 28px;
    width: auto;
}
.user-menu {
    position: relative;
}
.user-avatar-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.user-avatar-button:hover .user-avatar,
.user-avatar-button:focus-visible .user-avatar {
    background: #dce3fb;
    box-shadow: 0 0 0 3px rgba(59, 92, 240, 0.15);
}
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card-hover);
    min-width: 200px;
    z-index: 100;
    overflow: hidden;
    animation: dropdownFadeIn 0.15s ease;
}
.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
    border-left: 1px solid var(--color-border-light);
    transform: rotate(45deg);
    border-top-left-radius: 3px;
}
.user-dropdown.hidden {
    display: none;
}
.user-dropdown-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    background: #fafbfc;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.user-dropdown-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    flex-shrink: 0;
}
.user-dropdown-header-info {
    flex: 1;
    min-width: 0;
}
.user-dropdown-name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    word-break: break-word;
    line-height: 1.2;
}
.user-dropdown-role {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}
.user-dropdown-items {
    padding: var(--space-xs) 0;
}
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}
.user-dropdown-item:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.user-dropdown-item-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}
.user-dropdown-item:hover .user-dropdown-item-icon {
    opacity: 1;
}
.user-dropdown-item.danger:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}
.user-dropdown-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: var(--space-xs) 0;
}
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 
   MODAL CLOSE BUTTON

/* -------------------------------------------------- */
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}
.modal-close:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}
/* 
   LAYOUT

/* -------------------------------------------------- */
.container {
    padding: var(--space-lg);
    flex: 1;
    width: 100%;
}

/* -------------------------------------------------- */
.app-layout {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    padding: var(--space-lg);
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}
.app-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--navbar-height) + var(--space-lg));
    align-self: flex-start;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--navbar-height) - var(--space-lg) * 2);
    max-height: calc(100vh - var(--navbar-height) - var(--space-lg) * 2);
}
.app-sidebar-nav {
    overflow-y: auto;
    flex-shrink: 1;
    min-height: 0;
}
.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.app-sidebar-footer {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-light);
}
.app-sidebar-section {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: var(--space-md) var(--space-md) var(--space-xs);
}
.app-sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}
.app-sidebar-link:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}
.app-sidebar-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}
.app-sidebar-link .app-sidebar-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}
.app-sidebar-link.active .app-sidebar-icon {
    opacity: 1;
}
.app-sidebar-back {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    padding: 6px var(--space-md);
    margin-bottom: 2px;
}
.app-main {
    flex: 1;
    min-width: 0;
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}
.page-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    letter-spacing: -0.3px;
}
/* 
   DASHBOARD

/* -------------------------------------------------- */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}
.dashboard-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    letter-spacing: -0.3px;
    margin: 0;
}
.dashboard-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 4px 0 0 0;
}
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}
.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-card-icon.blue {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.stat-card-icon.green {
    background: var(--color-success-light);
    color: var(--color-success);
}
.stat-card-icon.purple {
    background: var(--color-info-light);
    color: var(--color-info);
}
.stat-card-icon.orange {
    background: var(--color-warning-light);
    color: var(--color-warning);
}
.stat-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.stat-card-value {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    line-height: 1;
}
.stat-card-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-weight-medium);
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}
.section-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin: 0;
}
.section-count {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}
.evaluation-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.evaluation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}
.evaluation-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    gap: var(--space-sm);
}
.evaluation-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.evaluation-card-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin: 0 0 6px 0;
    line-height: 1.3;
}
.evaluation-card-company {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-md) 0;
}
.evaluation-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: var(--space-md);
}
.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.metric-value {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}
.metric-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.evaluation-card-progress {
    margin-bottom: var(--space-md);
}
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.progress-text {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}
.evaluation-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.evaluation-card-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.badge-success {
    background: var(--color-success-light);
    color: var(--color-success);
}
.badge-neutral {
    background: var(--color-border-light);
    color: var(--color-text-secondary);
}
.empty-state {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--color-border);
}
.empty-state-icon {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}
.empty-state-text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin: 0 0 4px 0;
}
.empty-state-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0;
}
@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    .evaluation-card-metrics {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 480px) {
    .stats-summary {
        grid-template-columns: 1fr;
    }
}
/* 
   CARDS

/* -------------------------------------------------- */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-light);
}
.card-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}
.card-header-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.card-body {
    padding: var(--space-md) 20px;
}
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--color-border-light);
    background: #fafbfc;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* -------------------------------------------------- */
.card-accent {
    border-top: 3px solid var(--color-primary);
}
.card-success-accent {
    border-top: 3px solid var(--color-success);
}
.card-warning-accent {
    border-top: 3px solid var(--color-warning);
}

/* -------------------------------------------------- */
.card-colored {
    border: none;
    overflow: hidden;
}
.card-colored .card-colored-header {
    padding: 14px 20px;
    color: #fff;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
}
.card-colored .card-colored-header.primary {
    background: var(--color-primary);
}
.card-colored .card-colored-header.success {
    background: var(--color-success);
}
.card-colored .card-colored-header.warning {
    background: var(--color-warning);
    color: #7c2d12;
}
.card-colored .card-body {
    padding: 20px;
}

/* -------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
}
.card-interactive {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card-interactive:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.card-interactive .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.evaluation-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}
.evaluation-card-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.evaluation-card-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    line-height: 1.3;
    margin-bottom: 6px;
}
.evaluation-card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}
.evaluation-card-stats {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}
.evaluation-card-stat {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    background: #f4f6f9;
    padding: 4px 10px;
    border-radius: 20px;
}
.evaluation-card-progress {
    margin-bottom: var(--space-md);
}
.evaluation-card-progress-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 6px;
}
.evaluation-card-footer {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.evaluation-card-action {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
}
.evaluation-card-arrow {
    color: var(--color-primary);
    transition: transform 0.15s ease;
}
.card-interactive:hover .evaluation-card-arrow {
    transform: translateX(4px);
}
/* 
   BUTTONS

/* -------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    font-family: var(--font-family);
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
.btn-primary {
    background: var(--color-primary-gradient);
    box-shadow: var(--shadow-btn);
    color: #fff;
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #5b7bf7 0%, #4c6ef5 50%, #3b5cf0 100%);
    color: #fff;
}
.btn-secondary {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 50%, #f3f4f6 100%);
    box-shadow: var(--shadow-btn);
    color: #4b5563;
    border: 1px solid #e5e7eb;
}
.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 50%, #e5e7eb 100%);
    color: #1f2937;
}
.btn-success {
    background: var(--color-success);
    color: #fff;
}
.btn-success:hover:not(:disabled) {
    background: var(--color-success-hover);
}
.btn-danger {
    background: linear-gradient(180deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
    box-shadow: var(--shadow-btn);
    color: #fff;
}
.btn-danger:hover:not(:disabled) {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: #fff;
}
.btn-outline {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}
.btn-outline:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
}
.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}
.btn-ghost:hover:not(:disabled) {
    background: #f3f4f6;
}
.btn-sm {
    padding: 5px 12px;
    font-size: var(--font-size-xs);
    border-radius: 6px;
}
.btn-lg {
    padding: 12px 28px;
    font-size: var(--font-size-base);
}
.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
/* 
   INPUTS

/* -------------------------------------------------- */
.input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-input);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}
.input::placeholder {
    color: var(--color-text-muted);
}
.input:focus {
    border-color: var(--color-primary);
    box-shadow: 0px 0px 0px 3px var(--color-primary-light);
}
.input-sm {
    height: 32px;
    font-size: var(--font-size-xs);
}
.input-readonly {
    background: #f9fafb;
    cursor: pointer;
    color: var(--color-text-secondary);
}

/* -------------------------------------------------- */
.ui-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}
.ui-select-trigger {
    width: 100%;
    height: 38px;
    padding: 0 32px 0 12px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-input);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    user-select: none;
}
.ui-select-trigger:hover {
    border-color: var(--color-primary);
}
.ui-select-trigger:focus {
    border-color: var(--color-primary);
    box-shadow: 0px 0px 0px 3px var(--color-primary-light);
}
.ui-select-trigger::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--color-text-secondary);
    transition: transform 0.2s ease;
}
.ui-select--open .ui-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}
.ui-select-trigger.changed {
    border-color: var(--color-success);
    background: var(--color-success-light);
}
.ui-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card-hover);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.ui-select--open .ui-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ui-select-option {
    padding: 10px 12px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    border-bottom: 1px solid var(--color-border-light);
}
.ui-select-option:last-child {
    border-bottom: none;
}
.ui-select-option:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.ui-select-option.selected {
    background: var(--color-primary);
    color: #fff;
    font-weight: var(--font-weight-medium);
}
.ui-select-option--disabled {
    color: var(--color-text-muted);
    cursor: not-allowed;
}
.ui-select-option--disabled:hover {
    background: var(--color-surface);
    color: var(--color-text-muted);
}
.ui-select--sm .ui-select-trigger {
    height: 32px;
    font-size: var(--font-size-xs);
    padding: 0 28px 0 10px;
}
.ui-select--sm .ui-select-option {
    padding: 8px 10px;
    font-size: var(--font-size-xs);
}

/* -------------------------------------------------- */
.ui-select--excel {
    width: 100%;
}
.ui-select--excel .ui-select-trigger {
    height: 32px;
    font-size: var(--font-size-sm);
    padding: 0 28px 0 10px;
}
.ui-select--excel .ui-select-trigger::after {
    right: 8px;
    border-top-width: 4px;
    border-left-width: 4px;
    border-right-width: 4px;
}
.input-group {
    display: flex;
    gap: var(--space-sm);
}
.input-group .input {
    flex: 1;
}
.input-with-icon {
    position: relative;
}
.input-with-icon .input {
    padding-left: 36px;
}
.input-with-icon .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}
label.input-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    margin-bottom: 6px;
}
/* 
   BADGES

/* -------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    border-radius: 99px;
    line-height: 1.6;
}
.badge-neutral {
    background: #f3f4f6;
    color: #6b7280;
}
.badge-success {
    background: var(--color-success-light);
    color: var(--color-success);
}
.badge-warning {
    background: var(--color-warning-light);
    color: #92400e;
}
.badge-danger {
    background: var(--color-danger-light);
    color: var(--color-danger);
}
.badge-info {
    background: var(--color-info-light);
    color: var(--color-info);
}
/* 
   TABLES

/* -------------------------------------------------- */
.table-wrapper {
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th {
    text-align: left;
    padding: 10px 16px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #f9fafb;
    border-bottom: 1px solid var(--color-border);
}
.table td {
    padding: 12px 16px;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border-light);
}
.table tbody tr:hover {
    background: #f9fafb;
}
.table tbody tr:last-child td {
    border-bottom: none;
}
/* 
   GRID OVERLAY (fullscreen spreadsheet editor)

/* -------------------------------------------------- */
/* Tabs dentro del modal Agregar Participantes */
.add-modal-tab {
    background: transparent;
    border: none;
    padding: 4px 14px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.12s, color 0.12s;
    font-family: var(--font-family);
}
.add-modal-tab:hover { background: var(--color-border-light); color: var(--color-text); }
.add-modal-tab.active { background: var(--color-primary); color: #fff; }

.grid-overlay {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.18s ease;
}
.grid-overlay-panel {
    background: var(--color-surface);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.grid-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 8px var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    min-height: 40px;
}
.grid-overlay-header-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 0;
}
.grid-overlay-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    white-space: nowrap;
}
.grid-overlay-hint {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.grid-overlay-body {
    flex: 1;
    overflow: auto;
    padding: var(--space-md) var(--space-xl);
    background: var(--color-bg);
}
.grid-overlay-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    gap: var(--space-md);
    flex-wrap: wrap;
}
.grid-overlay-status {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.grid-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--color-border-light);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    border-radius: 999px;
}
.grid-status-pill::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-text-muted);
}
.grid-status-active {
    background: var(--color-success-light);
    color: var(--color-success);
}
.grid-status-active::before {
    background: var(--color-success);
}
.grid-status-warn {
    font-size: var(--font-size-sm);
    color: var(--color-danger);
    font-weight: var(--font-weight-medium);
}
.grid-spreadsheet-wrapper {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: auto;
    box-shadow: var(--shadow-card);
}
.grid-spreadsheet {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    min-width: 900px;
}
.grid-spreadsheet thead th {
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-semibold);
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 5;
    white-space: nowrap;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.grid-required {
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}
.grid-col-num {
    width: 50px;
    text-align: center !important;
}
.grid-col-action {
    width: 50px;
}
.grid-cell-num {
    text-align: center;
    color: var(--color-text-muted);
    font-weight: var(--font-weight-semibold);
    background: var(--color-bg);
    font-size: var(--font-size-xs);
}
.grid-cell {
    padding: 0;
    border-bottom: 1px solid var(--color-border-light);
    border-right: 1px solid var(--color-border-light);
    position: relative;
}
.grid-cell:last-child {
    border-right: none;
}
.grid-row:hover .grid-cell {
    background: #f8f9fc;
}
.grid-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    outline: none;
    box-sizing: border-box;
}
.grid-input:focus {
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--color-primary);
}
.grid-input::placeholder {
    color: var(--color-text-muted);
}
.grid-input-error {
    background: var(--color-danger-light) !important;
}
.grid-input-error:focus {
    box-shadow: inset 0 0 0 2px var(--color-danger) !important;
}
/* Solo pintar rojo despues de interaccion del usuario (no de inicio).
   :user-invalid aplica solo si el usuario ya interacted con el input. */
.grid-input:required:user-invalid:not(:focus) {
    background: var(--color-danger-light) !important;
}
.grid-input:required:user-invalid:not(:focus):focus {
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--color-danger) !important;
}
input.grid-input:user-invalid:not(:focus):not(:placeholder-shown) + .grid-input-icon,
.grid-input.is-invalid:not(:focus):not(:placeholder-shown) {
    color: var(--color-danger);
}
/* Fila se pone roja solo si hay inputs requeridos invalidos luego de interaccion,
   y el usuario no esta focused dentro. */
.grid-row:has(.grid-input:required:user-invalid):not(:focus-within) {
    background: var(--color-danger-light);
}
.grid-row:has(.grid-input:required:user-invalid):not(:focus-within) .grid-cell {
    background: var(--color-danger-light);
}
.grid-input-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6f78' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    cursor: pointer;
}

/* Custom dropdown (replaces <select> for the add-modal role field) */
.grid-cell-select { padding: 0; }
.grid-cselect { position: relative; }
.grid-cselect-trigger {
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px 12px;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    outline: none;
    box-sizing: border-box;
    border-radius: 0;
    transition: background 0.15s ease;
    font-weight: var(--font-weight-semibold);
}
.grid-cselect-trigger:hover,
.grid-cselect-trigger:focus-visible {
    background: #fff;
}
.grid-cselect.open .grid-cselect-trigger {
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--color-primary);
}
.grid-cselect.invalid .grid-cselect-trigger {
    background: var(--color-danger-light);
    box-shadow: inset 0 0 0 2px var(--color-danger);
    color: var(--color-danger);
}
.grid-cselect.invalid .grid-cselect-trigger:hover {
    background: var(--color-danger-light);
}
.grid-cselect-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.grid-cselect-label.placeholder {
    color: var(--color-danger);
    font-style: italic;
}
.grid-cselect-arrow {
    color: var(--color-text-muted);
    transition: transform 0.18s ease, color 0.18s ease;
    flex-shrink: 0;
}
.grid-cselect.open .grid-cselect-arrow {
    transform: rotate(180deg);
    color: var(--color-primary);
}
.grid-cselect-menu {
    position: fixed;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 2000;
    overflow: hidden;
    padding: 4px;
    animation: gridCselectFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 140px;
}
@keyframes gridCselectFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.grid-cselect-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.12s ease, color 0.12s ease;
}
.grid-cselect-option:hover {
    background: var(--color-bg);
}
.grid-cselect-option.selected {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}
.grid-cselect-check {
    opacity: 0;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--color-primary);
    transition: opacity 0.12s ease;
}
.grid-cselect-option.selected .grid-cselect-check {
    opacity: 1;
}

/* Autocomplete input (used for Area with existing suggestions) */
.grid-cell-cinput { padding: 0; }
.grid-cinput { position: relative; }
.grid-cinput input.grid-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    outline: none;
    box-sizing: border-box;
}
.grid-cinput-menu {
    position: fixed;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 2000;
    overflow: hidden;
    padding: 4px;
    animation: gridCselectFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 240px;
    overflow-y: auto;
}
.grid-cinput-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.12s ease, color 0.12s ease;
}
.grid-cinput-option:hover,
.grid-cinput-option.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
/* Subtitle line in participant dropdown options (email) */
.grid-cinput-option span.grid-cinput-sub {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: normal;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.grid-cinput-option:hover span.grid-cinput-sub,
.grid-cinput-option.active span.grid-cinput-sub {
    color: var(--color-primary);
}
.grid-cinput-option mark {
    background: transparent;
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}
.grid-cinput-empty {
    padding: 8px 12px;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-style: italic;
}

/* En el modal de asignación el dropdown debe mostrarse sobre todo sin scroll */
#assignmentModal .modal-body {
    overflow: visible !important;
}
#assignmentModal .modal-content {
    transform: none !important;
}

.grid-cell-action {
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
    padding: 4px;
    background: var(--color-bg);
}
.grid-row-delete {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.grid-row-delete:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}
.grid-textarea {
    font-family: var(--font-family);
    min-height: 32px;
    resize: vertical;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@media (max-width: 768px) {
    /* Tabs dentro del modal Agregar Participantes */
.add-modal-tab {
    background: transparent;
    border: none;
    padding: 4px 14px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.12s, color 0.12s;
    font-family: var(--font-family);
}
.add-modal-tab:hover { background: var(--color-border-light); color: var(--color-text); }
.add-modal-tab.active { background: var(--color-primary); color: #fff; }

.grid-overlay {
        top: var(--navbar-height);
    }
    .grid-overlay-header,
    .grid-overlay-body,
    .grid-overlay-footer {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    .grid-overlay-hint {
        display: none;
    }
}
/* 
   FORMS

/* -------------------------------------------------- */
.form-group {
    margin-bottom: var(--space-md);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}
.form-actions {
    display: flex;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
}
/* 
   ALERTS

/* -------------------------------------------------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}
.alert-danger {
    background: var(--color-danger-light);
    color: var(--color-danger);
    border: 1px solid #fecaca;
}
.alert-info {
    background: var(--color-info-light);
    color: var(--color-info);
    border: 1px solid #c7d2fe;
}
.alert-success {
    background: var(--color-success-light);
    color: var(--color-success);
    border: 1px solid #a7f3d0;
}
/* 
   EMPTY STATE

/* -------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state-icon {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: var(--space-md);
}
.empty-state-text {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    margin-bottom: var(--space-lg);
}
/* 
   AUTH (Login page)

/* -------------------------------------------------- */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}
.auth-card {
    width: 100%;
    max-width: 380px;
}
.auth-card .card-body {
    padding: 28px;
}
/* 
   ERROR PAGES (404, 500, etc.)

/* -------------------------------------------------- */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100vh - var(--navbar-height) - var(--space-xl) * 2);
    padding: var(--space-xl) var(--space-md);
}
.error-page-code {
    font-size: 96px;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    letter-spacing: -2px;
    opacity: 0.85;
}
.error-page-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0 0 var(--space-sm) 0;
}
.error-page-message {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    max-width: 480px;
    margin: 0 0 var(--space-xl) 0;
    line-height: 1.5;
}
.error-page-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
}
/* 
   UTILITIES

/* -------------------------------------------------- */
.flex {
    display: flex;
}
.flex-col {
    flex-direction: column;
}
.flex-wrap {
    flex-wrap: wrap;
}
.items-center {
    align-items: center;
}
.justify-between {
    justify-content: space-between;
}
.justify-center {
    justify-content: center;
}
.gap-xs {
    gap: var(--space-xs);
}
.gap-sm {
    gap: var(--space-sm);
}
.gap-md {
    gap: var(--space-md);
}
.gap-lg {
    gap: var(--space-lg);
}
.text-muted {
    color: var(--color-text-muted);
}
.text-secondary {
    color: var(--color-text-secondary);
}
.text-sm {
    font-size: var(--font-size-sm);
}
.text-xs {
    font-size: var(--font-size-xs);
}
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}
.font-semibold {
    font-weight: var(--font-weight-semibold);
}
.font-bold {
    font-weight: var(--font-weight-bold);
}
.mt-sm {
    margin-top: var(--space-sm);
}
.mt-md {
    margin-top: var(--space-md);
}
.mt-lg {
    margin-top: var(--space-lg);
}
.mb-sm {
    margin-bottom: var(--space-sm);
}
.mb-md {
    margin-bottom: var(--space-md);
}
.mb-lg {
    margin-bottom: var(--space-lg);
}
.mb-xl {
    margin-bottom: var(--space-xl);
}
.ml-auto {
    margin-left: auto;
}
.mr-sm {
    margin-right: var(--space-sm);
}
.w-full {
    width: 100%;
}
.w-fit {
    width: fit-content;
}
.max-w-sm {
    max-width: 380px;
}
.max-w-md {
    max-width: 480px;
}
.max-w-lg {
    max-width: 640px;
}
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 
   DASHBOARD TABS

/* -------------------------------------------------- */
.dashboard-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-lg);
    border-bottom: 2px solid var(--color-border);
}
.dashboard-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    border-radius: 6px 6px 0 0;
}
.dashboard-tab:hover {
    color: var(--color-text);
    background: #f9fafb;
}
.dashboard-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: var(--color-primary-light);
}
/* 
   STATS

/* -------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}
.stat-bar-row {
    margin-bottom: 14px;
}
.stat-bar-row:last-child {
    margin-bottom: 0;
}
.stat-bar-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.stat-bar-track {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}
.stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.stat-bar-fill.fort {
    background: var(--color-success);
}
.stat-bar-fill.opp {
    background: var(--color-warning);
}
.stat-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
}
.stat-insight:last-child {
    border-bottom: none;
}
.stat-insight-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: 6px;
    flex-shrink: 0;
}
/* 
   RESULT PAGE

/* -------------------------------------------------- */
.result-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    color: #fff;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}
.result-hero-content {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.result-hero-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}
.result-hero-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}
.result-hero-subtitle {
    font-size: var(--font-size-base);
    margin: 0 0 4px 0;
    opacity: 0.95;
}
.result-hero-date {
    font-size: var(--font-size-sm);
    margin: 0;
    opacity: 0.85;
}
.result-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}
.result-section {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-light);
    padding: var(--space-xl);
}
.result-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}
.result-section-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.result-section-icon-blue {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.result-section-icon-green {
    background: var(--color-success-light);
    color: var(--color-success);
}
.result-section-icon-orange {
    background: var(--color-warning-light);
    color: var(--color-warning);
}
.result-section-body {
    flex: 1;
    min-width: 0;
}
.result-section-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0 0 var(--space-md) 0;
    letter-spacing: -0.3px;
}
.result-paragraph {
    font-size: var(--font-size-base);
    line-height: 1.8;
    color: var(--color-text);
    margin: 0;
}
.result-fortalezas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}
.result-fortaleza-card {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    border: 1px solid var(--color-border-light);
}
.result-fortaleza-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}
.result-fortaleza-level {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}
.result-fortaleza-count {
    background: var(--color-success);
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    padding: 2px 8px;
    border-radius: 12px;
}
.result-fortaleza-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.result-fortaleza-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}
.result-fortaleza-item svg {
    color: var(--color-success);
    flex-shrink: 0;
}
.result-recs-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.result-rec-card {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    border: 1px solid var(--color-border-light);
    border-left: 3px solid var(--color-warning);
}
.result-rec-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
.result-rec-number {
    width: 24px;
    height: 24px;
    background: var(--color-warning);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
}
.result-rec-name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}
.result-rec-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0;
    padding-left: 32px;
}
.result-hero-filter {
    margin-left: auto;
}
.result-hero-select {
    padding: 8px 32px 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    appearance: none;
    backdrop-filter: blur(10px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.result-hero-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
}
.result-hero-select option {
    color: var(--color-text);
    background: var(--color-surface);
}
.result-insights-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.result-insight-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
}
.result-insight-item:last-child {
    border-bottom: none;
}
.result-insight-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: 6px;
    flex-shrink: 0;
}
.result-bars-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.result-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}
.result-bar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.result-bar-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.result-bar-name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}
.result-bar-pct {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-left: auto;
    flex-shrink: 0;
}
.result-bar-track {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}
.result-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.result-bar-fill-fort {
    background: var(--color-success);
}
.result-bar-fill-opp {
    background: var(--color-warning);
}
.eval-progress-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.eval-progress-bar-wrapper {
    flex: 1;
}
.eval-progress-bar {
    width: 100%;
    height: 10px;
    background: #f3f4f6;
    border-radius: 5px;
    overflow: hidden;
}
.eval-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 5px;
    transition: width 0.6s ease;
}
.eval-progress-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}
.eval-progress-value {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: 1;
}
.eval-progress-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 4px;
}
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}
.quick-access-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-light);
    padding: var(--space-lg);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.quick-access-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}
.quick-access-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.quick-access-icon-blue {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.quick-access-icon-green {
    background: var(--color-success-light);
    color: var(--color-success);
}
.quick-access-icon-purple {
    background: var(--color-info-light);
    color: var(--color-info);
}
.quick-access-icon-orange {
    background: var(--color-warning-light);
    color: var(--color-warning);
}
.quick-access-body {
    flex: 1;
    min-width: 0;
}
.quick-access-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0 0 4px 0;
}
.quick-access-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-sm) 0;
}
.quick-access-action {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
@media (max-width: 768px) {
    .result-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    .result-hero-filter {
        margin-left: 0;
        width: 100%;
    }
    .result-hero-select {
        width: 100%;
    }
    .result-fortalezas-grid {
        grid-template-columns: 1fr;
    }
    .result-stats-grid {
        grid-template-columns: 1fr;
    }
    .eval-progress-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }
    .eval-progress-count {
        flex-direction: row;
        gap: var(--space-sm);
        align-items: baseline;
    }
    .quick-access-grid {
        grid-template-columns: 1fr;
    }
}
/* 
   AREA FILTER

/* -------------------------------------------------- */
.area-filter-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.area-filter-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
}
.area-filter-select {
    padding: 6px 32px 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    background: var(--color-surface);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6f78' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.area-filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
.area-active-filter {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 16px;
    background: var(--color-primary-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-primary);
    border-style: dashed;
}
.area-clear-filter {
    margin-left: auto;
    font-size: var(--font-size-xs);
    color: var(--color-primary);
    text-decoration: underline;
    cursor: pointer;
}
.area-clear-filter:hover {
    color: var(--color-primary-hover);
}
/* 
   UPLOAD AREA

/* -------------------------------------------------- */
.upload-area {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--color-primary-light);
    border: 2px dashed var(--color-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}
.upload-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    color: var(--color-primary);
}
.upload-content {
    flex: 1;
}
.upload-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
}
.upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
.upload-input+label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}
.upload-input:focus+label {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
.upload-filename {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-style: italic;
}
.upload-format-info {
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
}
.format-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}
.format-column {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.format-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
}
.format-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}
/* 
   EVALUATION SIDEBAR LAYOUT

/* -------------------------------------------------- */
.evaluation-layout {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
}
.evaluation-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: var(--space-lg);
}
.evaluation-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.evaluation-sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}
.evaluation-sidebar-link:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}
.evaluation-sidebar-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}
.evaluation-sidebar-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}
.evaluation-sidebar-link.active .evaluation-sidebar-icon {
    opacity: 1;
}
.evaluation-main {
    flex: 1;
    min-width: 0;
}
.evaluation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}
.evaluation-header-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.evaluation-header-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0;
}
.evaluation-header-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0;
}
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        position: static;
        padding: var(--space-sm);
        border-bottom: 1px solid var(--color-border-light);
        height: auto;
        max-height: none;
        top: auto;
    }
    .app-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        gap: var(--space-xs);
    }
    .app-sidebar-section {
        display: none;
    }
    .app-sidebar-link {
        white-space: nowrap;
        padding: 8px var(--space-sm);
        font-size: var(--font-size-xs);
    }
    .app-sidebar-footer {
        display: none;
    }
    .evaluation-layout {
        flex-direction: column;
    }
    .evaluation-sidebar {
        width: 100%;
        position: static;
    }
    .evaluation-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: var(--space-xs);
    }
    .evaluation-sidebar-link {
        white-space: nowrap;
    }
}
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .submit-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .submit-bar-stats {
        justify-content: center;
    }
    .hide-mobile {
        display: none;
    }
}

/* -------------------------------------------------- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 520px;
    max-height: 82vh;
    margin: var(--space-lg);
    transform: scale(0.95);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    margin: 0;
}
.modal.active .modal-content {
    transform: scale(1);
}
.modal-header {
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.modal-header-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0;
}
.modal-body {
    padding: 0 var(--space-lg) var(--space-lg);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    flex-shrink: 0;
    background: #fafbfc;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

select.form-select {
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-input);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6f78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}
select.form-select:hover {
    border-color: var(--color-primary);
}
select.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0px 0px 0px 3px var(--color-primary-light);
}
select.form-select-sm {
    height: 32px;
    padding: 0 28px 0 10px;
    font-size: var(--font-size-xs);
    background-position: right 8px center;
    background-size: 14px;
}
/* 
   TOAST

/* -------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
}
.editor-toast-container {
    position: absolute;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    font-size: 13.5px;
    font-weight: 500;
    color: #0f172a;
    min-width: 320px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.toast-hiding {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: all 0.2s ease;
}
.toast-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.toast-success .toast-icon {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}
.toast-error .toast-icon {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}
.toast-warning .toast-icon {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}
.toast-info .toast-icon {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}
.toast-success {
    border-color: #dcfce7;
}
.toast-error {
    border-color: #fee2e2;
}
.toast-warning {
    border-color: #fef3c7;
}
.toast-info {
    border-color: #dbeafe;
}
.toast-message {
    flex: 1;
    line-height: 1.45;
    word-break: break-word;
    font-weight: 500;
    color: #1e293b;
}
.toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    margin: 0;
}
.toast-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}
/* 
   EXCEL-STYLE EDITABLE TABLES (variables, competencias, etc.)

/* -------------------------------------------------- */
.excel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg);
    flex-wrap: wrap;
    gap: var(--space-sm);
}
.variables-table-wrapper {
    overflow-x: auto;
}
.excel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}
.excel-table th {
    background: var(--color-bg);
    padding: 8px 10px;
    text-align: left;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}
.excel-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
.excel-table tbody tr:hover {
    background: var(--color-primary-light);
}
.excel-table tbody tr.group-header-row:hover {
    background: var(--color-info-light);
}
.group-header-row {
    background: var(--color-bg);
}
.group-badge-cell {
    padding: 10px !important;
    width: 80px;
}
.group-name-cell {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}
.editable-cell {
    cursor: text;
    position: relative;
    min-height: 32px;
    padding: 0 !important;
}
.editable-cell input,
.editable-cell textarea {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    padding: 6px 10px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--color-text);
    outline: none;
    box-sizing: border-box;
    border-radius: 4px;
    transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
    resize: vertical;
}
.editable-cell input:hover,
.editable-cell textarea:hover {
    background: #fff;
    border-color: var(--color-border);
}
.editable-cell input:focus,
.editable-cell textarea:focus {
    background: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 92, 240, 0.12);
}
.editable-cell input.cell-saved,
.editable-cell textarea.cell-saved {
    background: var(--color-success-light);
    border-color: var(--color-success);
}
.desc-cell textarea {
    min-height: 38px;
    line-height: 1.4;
}
.cell-saved {
    animation: cellSaved 0.4s ease;
}
@keyframes cellSaved {
    0% {
        background: var(--color-success-light);
    }
    100% {
        background: transparent;
    }
}
.company-part-item:hover { background: var(--color-bg); }

/* Perspective switcher in assignments toolbar */
.perspective-toggle-group {
    display: inline-flex;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}
.perspective-btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    color: #64748b;
    transition: background 0.15s ease-in-out, color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.perspective-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}
.perspective-btn.active {
    background: #ffffff;
    color: #0284c7;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Highlight for search matches in assignment detail rows */
tr.search-match-highlight {
    background-color: #fef08a !important;
    transition: background-color 0.2s ease-in-out;
}
tr.search-match-highlight td {
    background-color: #fef08a !important;
}

