@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --bg: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --muted-strong: #475569;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --accent: #c8102e;
    --accent-dark: #991b1b;
    --accent-button: #b91c1c;
    --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.08);
    --header-height: 76px;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
    background-color: var(--bg);
}

body.app-body,
body.login-body-simple {
    background-image:
        linear-gradient(rgba(241, 245, 249, 0.86), rgba(241, 245, 249, 0.86)),
        url("../img/fondo-innovacion.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

h1,
h2,
h3,
p {
    letter-spacing: 0;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e5e7eb;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.navbar {
    max-width: 72rem;
    min-height: var(--header-height);
    padding: 0 24px;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 156px;
    line-height: 0;
}

.brand-logo {
    display: block;
    width: 156px;
    max-width: 156px;
    height: auto;
    max-height: 26px;
    object-fit: contain;
}

.brand-light {
    color: #171717;
    font-weight: 500;
}

.brand-red {
    color: var(--accent);
    font-weight: 800;
}

.brand-bold {
    color: #171717;
    font-weight: 800;
}

.nav-menu {
    gap: 20px;
}

.nav-link {
    min-height: var(--header-height);
    padding: 0 0 2px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link::after {
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 0;
    background: var(--accent);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 1200;
    display: none;
    min-width: 260px;
    max-height: calc(100vh - 120px);
    overflow: visible;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: grid;
    gap: 2px;
}

.nav-dropdown-menu a,
.nav-dropdown-disabled,
.nav-flyout-label {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.nav-flyout {
    position: relative;
}

.nav-flyout::after {
    content: "";
    position: absolute;
    top: 0;
    left: 100%;
    width: 10px;
    height: 100%;
}

.nav-flyout-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
}

.nav-flyout-label::after {
    content: ">";
    margin-left: 24px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.nav-flyout-menu {
    position: absolute;
    top: -8px;
    left: calc(100% + 8px);
    z-index: 1210;
    display: none;
    min-width: 230px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.nav-flyout:hover .nav-flyout-menu,
.nav-flyout:focus-within .nav-flyout-menu {
    display: grid;
    gap: 2px;
}

.nav-flyout:hover .nav-flyout-label,
.nav-flyout:focus-within .nav-flyout-label {
    background: var(--surface-soft);
    color: var(--accent);
}

.nav-dropdown-disabled {
    color: #94a3b8;
    cursor: not-allowed;
    background: #f8fafc;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus {
    background: var(--surface-soft);
    color: var(--accent);
}

.navbar-actions {
    gap: 10px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 600;
}

.user-chip-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
    flex: 0 0 auto;
}

.user-chip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-chip-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-sidebar {
    position: fixed;
    top: var(--header-height);
    left: max(20px, calc((100vw - 72rem) / 2 - 236px));
    z-index: 900;
    display: flex;
    flex-direction: column;
    width: 220px;
    height: calc(100vh - var(--header-height) - 12px);
    max-height: calc(100vh - var(--header-height) - 12px);
    overflow: hidden;
    padding: 14px 10px;
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

.workflow-sidebar-title {
    flex: 0 0 auto;
    padding: 4px 8px 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.workflow-sidebar .workflow-sidebar-title {
    display: block;
    margin: 0 0 4px;
    padding: 4px 8px 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.workflow-sidebar .workflow-sidebar-title:hover,
.workflow-sidebar .workflow-sidebar-title:focus {
    color: var(--accent);
    background: transparent;
}

.workflow-sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}

.workflow-sidebar-section {
    margin: 4px 0;
}

.workflow-sidebar-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    list-style: none;
}

.workflow-sidebar-section summary::-webkit-details-marker {
    display: none;
}

.workflow-sidebar-section summary::after {
    content: ">";
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    transform: rotate(0deg);
    transition: transform 0.15s ease;
}

.workflow-sidebar-section[open] summary::after {
    transform: rotate(90deg);
}

.workflow-sidebar-section summary:hover {
    background: var(--surface-soft);
    color: var(--accent);
}

.workflow-sidebar-section a,
.workflow-sidebar-section > span {
    position: relative;
    margin: 2px 0 2px 10px;
    padding-left: 14px;
    border-left: 2px solid #e2e8f0;
}

.workflow-sidebar-section a::before,
.workflow-sidebar-section > span::before {
    content: "";
    position: absolute;
    left: -3px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
    transform: translateY(-50%);
}

.workflow-sidebar-section a:hover,
.workflow-sidebar-section a:focus {
    border-left-color: var(--accent);
}

.workflow-sidebar-section a:hover::before,
.workflow-sidebar-section a:focus::before {
    background: var(--accent);
}

.workflow-sidebar a,
.workflow-sidebar span {
    display: block;
    padding: 5px 8px;
    border-radius: 7px;
    color: var(--text);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}

.workflow-sidebar a:hover,
.workflow-sidebar a:focus {
    background: var(--surface-soft);
    color: var(--accent);
}

.workflow-sidebar span {
    color: #94a3b8;
    background: transparent;
    cursor: not-allowed;
}

.workflow-sidebar .workflow-sidebar-section a,
.workflow-sidebar .workflow-sidebar-section > span {
    margin: 2px 0 2px 10px;
    padding-left: 14px;
}

.workflow-sidebar-upload-box {
    flex: 0 0 auto;
    margin: 10px 4px 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.workflow-sidebar-upload-box a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border: 1px solid #c4b5fd;
    border-radius: 8px;
    background: #f7f5ff;
    color: #5b21b6;
    text-decoration: none;
}

.workflow-sidebar-upload-box a:hover,
.workflow-sidebar-upload-box a:focus {
    background: #ede9fe;
    border-color: #a78bfa;
    color: #5b21b6;
}

.workflow-sidebar-upload-box a span {
    padding: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.workflow-sidebar-upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #ede9fe;
    color: #5b21b6;
    flex: 0 0 auto;
}

.workflow-sidebar-upload-icon::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-top: 3px solid currentColor;
    border-left: 3px solid currentColor;
    transform: rotate(45deg);
}

.workflow-sidebar-upload-icon::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 9px;
    width: 3px;
    height: 12px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: -6px 8px 0 -1px currentColor, 6px 8px 0 -1px currentColor;
}

.workflow-sidebar-upload-box strong,
.workflow-sidebar-upload-box small {
    display: block;
    line-height: 1.15;
}

.workflow-sidebar-upload-box strong {
    font-size: 12px;
}

.workflow-sidebar-upload-box small {
    margin-top: 2px;
    color: #7c3aed;
    font-size: 10px;
    font-weight: 700;
}

.main-wrapper {
    max-width: 72rem;
    margin: 0 auto;
    padding: calc(var(--header-height) + 48px) 24px 48px;
}

body.app-body:has(.workflow-sidebar) .main-wrapper {
    margin-left: max(252px, calc((100vw - 72rem) / 2));
    margin-right: 10px;
    max-width: none;
}

.landing-home {
    min-height: calc(100vh - var(--header-height) - 96px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.landing-panel {
    width: 100%;
    max-width: 56rem;
    padding: 32px 32px 80px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    backdrop-filter: blur(12px);
}

.landing-content {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.landing-logo-wrap {
    width: 100%;
    max-width: 39.67rem;
    margin: 24px 0 0;
}

.landing-logo {
    display: block;
    width: 100%;
    height: auto;
}

.landing-subtitle {
    max-width: 42rem;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.55;
}

.landing-actions {
    display: flex;
    width: 100%;
    max-width: 32rem;
    justify-content: center;
    gap: 12px;
}

.landing-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.landing-button:hover,
.landing-button:focus {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.landing-button-primary {
    border-color: var(--accent-button);
    background: var(--accent-button);
    color: #ffffff;
}

.landing-message {
    width: 100%;
    max-width: 42rem;
    padding: 24px;
    border: 1px dashed #f1f5f9;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.uandes-container {
    max-width: 72rem;
    margin: 0 auto;
}

.page-hero,
.dashboard-hero {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.page-kicker {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title,
.dashboard-title,
.form-page-title {
    margin: 0;
    color: var(--text);
    font-size: 36px;
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: 0;
}

.page-subtitle,
.dashboard-subtitle {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted-strong);
    font-size: 16px;
    line-height: 1.6;
}

.card,
.app-card,
.table-card,
.form-card,
.login-card-ref,
.uandes-table-wrapper,
.forms-menu-list,
.project-menu-card,
.folder-content,
.tabbed-form-card {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
}

.card-grid,
.project-cards-grid {
    margin: 0;
    padding: 0;
    gap: 18px;
}

.app-card,
.project-menu-card,
.card {
    padding: 24px;
}

.app-card:hover,
.project-menu-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.app-card h3,
.project-menu-content h3,
.folder-panel-title,
.form-card h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 19px;
    font-weight: 700;
}

.app-card p,
.project-menu-content p,
.form-card p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 14px;
    line-height: 1.55;
}

.card-action,
.form-back-link,
.form-cancel-link,
.uandes-back {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.btn,
.btn-view,
.uandes-btn-view,
.uandes-btn-back,
.uandes-btn-filter,
.menu-enter-btn,
.login-submit {
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
    transform: none;
}

.btn-primary,
.btn-success,
.btn-view,
.uandes-btn-view,
.uandes-btn-filter,
.menu-enter-btn,
.login-submit {
    background: var(--accent-button);
    border-color: var(--accent-button);
    color: #ffffff;
}

.btn-primary:hover,
.btn-success:hover,
.btn-view:hover,
.uandes-btn-view:hover,
.uandes-btn-filter:hover,
.menu-enter-btn:hover,
.login-submit:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #ffffff;
    transform: none;
}

.btn-secondary,
.btn-outline-secondary,
.uandes-btn-back {
    background: #ffffff;
    border: 1px solid var(--border);
    color: #334155;
}

.btn-secondary:hover,
.btn-outline-secondary:hover,
.uandes-btn-back:hover {
    background: var(--surface-soft);
    border-color: var(--border-strong);
    color: var(--text);
    transform: none;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="password"],
select,
textarea,
.textarea,
.uandes-filter-input,
.uandes-filter-select,
.uandes-filter-input-hybrid,
.form-group input,
.form-group select,
.form-group textarea {
    min-height: 38px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px 12px;
    background: #ffffff;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}

label,
.form-group label,
.login-field label,
.tabbed-form-field label {
    margin-bottom: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

input:focus,
textarea:focus,
select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

.uandes-header,
.form-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: 0;
}

.uandes-title {
    margin: 0 auto 0 0;
    color: var(--text);
    font-size: 30px;
    font-weight: 700;
}

.uandes-table-wrapper {
    padding: 0;
    overflow: auto;
}

.uandes-table,
.table-card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.uandes-table th,
.table-card th,
th {
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface-soft);
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    text-transform: none;
}

.uandes-table td,
.table-card td,
td {
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
}

.uandes-table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

.uandes-table tbody tr:hover td {
    background: var(--surface-soft);
}

.uandes-filter-row th {
    background: #ffffff;
    padding: 10px 12px;
}

.uandes-filter-input,
.uandes-filter-select,
.uandes-filter-input-hybrid {
    height: 34px;
    font-size: 12px;
}

.uandes-pagination {
    margin: 0 0 18px;
}

.pagination-horizontal {
    padding: 0;
    background: transparent;
    gap: 8px;
}

.app-body:has(.uandes-list-container) {
    height: 100vh;
    overflow: hidden;
}

.main-wrapper:has(.uandes-list-container) {
    height: 100vh;
    padding: calc(var(--header-height) + 8px) 20px 12px;
    overflow: hidden;
    box-sizing: border-box;
}

body.app-body:has(.workflow-sidebar) .main-wrapper:has(.uandes-list-container) {
    max-width: none;
}

.uandes-list-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    margin-bottom: 8px;
    padding: 10px 0;
    flex-wrap: wrap;
}

.uandes-list-container {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.uandes-list-header .uandes-title {
    margin-right: auto;
}

.uandes-list-header .btn-add {
    white-space: nowrap;
}

.uandes-table-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.uandes-filter-form {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.app-body:has(.uandes-form-container) {
    height: 100vh;
    overflow: hidden;
}

.main-wrapper:has(.uandes-form-container) {
    height: 100vh;
    padding: calc(var(--header-height) + 8px) 20px 12px;
    overflow: hidden;
    box-sizing: border-box;
}

body.app-body:has(.workflow-sidebar) .main-wrapper:has(.uandes-form-container) {
    max-width: none;
}

.uandes-form-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.uandes-form-container > .uandes-header {
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.uandes-form-container .crud-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.uandes-form-container .folder-form-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    margin-top: 0;
}

.uandes-form-container .folder-tabs {
    flex: 0 0 auto;
}

.uandes-form-container .folder-content,
.uandes-form-container .form-card {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.uandes-form-container .form-actions {
    flex: 0 0 auto;
    margin-top: 10px;
}

.uandes-table thead th {
    position: sticky;
    z-index: 20;
}

.uandes-table .uandes-th-row th {
    top: 0;
    padding: 6px 8px;
    height: 54px;
    min-height: 54px;
    line-height: 1.15;
    font-size: 12px;
    vertical-align: middle;
}

.uandes-table .uandes-filter-row th {
    top: 54px;
    padding: 2px 6px;
    height: 28px;
    background: #ffffff;
    vertical-align: middle;
}

.form-group input[type="checkbox"],
.form-check-input,
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    align-self: flex-start;
}

.uandes-table .uandes-filter-input,
.uandes-table .uandes-filter-select,
.uandes-table .uandes-filter-input-hybrid {
    height: 26px;
    min-height: 26px;
    font-size: 12px;
    padding: 2px 6px;
}

.uandes-filter-status {
    min-width: 70px;
    text-align: center;
}

.uandes-filter-status span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    min-width: 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 11px;
    font-weight: 700;
}

.page-link {
    border-radius: 8px;
    border-color: var(--border);
    background: #ffffff;
    color: #334155;
    font-size: 13px;
}

.folder-tabs {
    gap: 0;
    margin-left: 0;
}

.form-completion-summary {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.form-completion-summary-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.form-completion-count {
    color: #111827;
    font-size: 13px;
}

.form-completion-bar {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.form-completion-bar-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--accent-button);
    transition: width 0.18s ease;
}

.folder-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    text-shadow: none;
    box-shadow: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.folder-tab-label {
    white-space: nowrap;
}

.folder-tab-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.folder-tab-status[hidden] {
    display: none;
}

.folder-tab.active {
    position: relative;
    z-index: 2;
    border-color: var(--accent-button);
    background: #ffffff;
    color: #111827;
    box-shadow:
        inset 0 3px 0 var(--accent-button),
        inset 0 -4px 0 #ffffff,
        0 -1px 0 rgba(127, 29, 29, 0.10);
}

.folder-tab.tab-empty .folder-tab-status {
    background: #ffffff;
    color: #334155;
}

.folder-tab.tab-partial .folder-tab-status {
    background: #ffffff;
    color: #334155;
}

.folder-tab.tab-complete .folder-tab-status {
    background: #ffffff;
    color: #334155;
}

.folder-tab.tab-error .folder-tab-status {
    background: #fff7f8;
    color: #7f1d1d;
}

.folder-tab.tab-empty {
    background: #f8fafc;
    border-color: var(--border);
    color: #334155;
}

.folder-tab.tab-no-required {
    background: #f8fafc;
    border-color: var(--border);
    color: #334155;
}

.folder-tab.tab-no-required .folder-tab-status {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

.folder-tab.tab-partial {
    background: #f8fafc;
    border-color: var(--border);
    color: #334155;
}

.folder-tab.tab-complete {
    background: #f8fafc;
    border-color: var(--border);
    color: #334155;
}

.folder-tab.tab-error {
    background: #fff7f8;
    border-color: #d71920;
    color: #7f1d1d;
}

.folder-tab:hover,
.folder-tab:focus {
    border-color: var(--accent-button);
    filter: brightness(0.98);
}

.folder-tab.active.tab-empty,
.folder-tab.active.tab-partial {
    color: #111827;
}

.folder-tab.active.tab-no-required {
    color: #111827;
}

.folder-tab.active.tab-complete,
.folder-tab.active.tab-error {
    color: #111827;
}

.folder-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 4px;
    background: #ffffff;
}

.folder-content {
    border-radius: 0 12px 12px 12px;
    padding: 24px;
}

.form-grid {
    gap: 18px;
}

.form-help-text,
.form-group small,
.tabbed-form-field small {
    color: var(--muted);
    font-size: 12px;
}

.field-help-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border: 1px solid #f3bdc5;
    border-radius: 999px;
    background: #fff1f3;
    color: var(--accent);
    font-size: 11px;
    cursor: help;
    vertical-align: middle;
}

.form-error,
.field-error,
.login-alert {
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
}

.forms-menu-list {
    overflow: auto;
}

.app-body:has(.manual-menu-container) {
    height: 100vh;
    overflow: hidden;
}

.main-wrapper:has(.manual-menu-container) {
    height: 100vh;
    padding: calc(var(--header-height) + 8px) 20px 12px;
    overflow: hidden;
    box-sizing: border-box;
}

body.app-body:has(.workflow-sidebar) .main-wrapper:has(.manual-menu-container) {
    max-width: none;
}

.manual-menu-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.manual-menu-container .dashboard-hero {
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.manual-menu-container .forms-menu-list {
    flex: 1 1 auto;
    min-height: 0;
}

.forms-menu-group {
    padding: 12px 18px 8px;
    border-bottom: 1px solid #e5e7eb;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.forms-menu-row {
    grid-template-columns: 54px 190px 1fr 150px;
    min-height: 74px;
    padding: 14px 18px;
}

.forms-menu-progress {
    height: 8px;
    width: 64px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.forms-menu-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.forms-menu-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.forms-menu-link:hover {
    background: var(--surface-soft);
}

.forms-menu-link:hover .forms-menu-title {
    color: var(--accent);
}

.forms-menu-icon,
.project-menu-icon,
.form-page-icon {
    background: var(--surface-soft);
    color: var(--accent);
    box-shadow: none;
}

.forms-menu-title {
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
}

.forms-menu-description {
    color: var(--muted-strong);
    font-size: 14px;
}

.forms-menu-status {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
}

.forms-menu-row-disabled {
    opacity: 1;
    background: #f8fafc;
}

.forms-menu-row-disabled .forms-menu-progress span {
    background: #cbd5e1;
}

.forms-menu-row-disabled .forms-menu-title,
.forms-menu-row-disabled .forms-menu-description {
    color: #94a3b8;
}

.login-main-simple {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.login-card-ref {
    width: min(100%, 440px);
    padding: 28px;
}

.login-brand-simple {
    margin-bottom: 22px;
    text-align: left;
    font-size: 1.25rem;
    letter-spacing: 0;
}

.login-brand-logo {
    display: block;
    width: min(100%, 280px);
    height: auto;
}

.login-card-ref h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
}

.login-intro,
.login-help {
    color: var(--muted-strong);
    font-size: 14px;
}

.login-help {
    background: var(--surface-soft);
    border-color: var(--border);
}

.login-submit {
    min-height: 42px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-kpi {
    padding: 22px;
    text-align: left;
}

.dashboard-kpi-value {
    margin: 0;
    color: var(--text);
    font-size: 48px;
    line-height: 1;
    font-weight: 700;
}

.dashboard-kpi-label {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.main-wrapper:has(.home-dashboard) {
    height: 100vh;
    max-width: none;
    padding: var(--header-height) 0 0;
    overflow: hidden;
    box-sizing: border-box;
}

.app-body:has(.home-dashboard) {
    height: 100vh;
    overflow: hidden;
}

.home-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    height: calc(100vh - var(--header-height));
    min-height: 0;
    background: rgba(248, 250, 252, 0.92);
    overflow: hidden;
}

.home-dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding: 28px 16px;
    border-right: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
    overflow: auto;
}

.home-sidebar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #475569;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.home-sidebar-item:hover,
.home-sidebar-item:focus,
.home-sidebar-item.active {
    border-color: #f2b5bd;
    background: #fff1f3;
    color: var(--accent);
}

.home-sidebar-disabled {
    color: #94a3b8;
    cursor: default;
}

.home-sidebar-disabled:hover,
.home-sidebar-disabled:focus {
    border-color: transparent;
    background: transparent;
    color: #94a3b8;
}

.home-sidebar-upload {
    margin-top: 8px;
    border-color: #c4b5fd;
    background: #f7f5ff;
    color: #5b21b6;
}

.home-sidebar-upload:hover,
.home-sidebar-upload:focus {
    border-color: #a78bfa;
    background: #ede9fe;
    color: #5b21b6;
}

.home-sidebar-icon {
    width: 22px;
    text-align: center;
    color: currentColor;
    font-size: 19px;
}

.home-help-card {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    margin-top: auto;
    padding: 12px;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    background: #f5f3ff;
    color: #334155;
}

.home-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 0;
    border-radius: 999px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 13px;
    font-weight: 900;
}

.home-help-card strong {
    display: block;
    font-size: 12px;
    line-height: 1.2;
}

.home-help-card p {
    grid-column: 1 / -1;
    margin: 6px 0 10px;
    color: var(--muted-strong);
    font-size: 11px;
    line-height: 1.35;
}

.home-help-card a {
    grid-column: 1 / -1;
    display: inline-flex;
    justify-content: center;
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #c4b5fd;
    border-radius: 8px;
    color: #5b21b6;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.home-dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
    padding: 34px 28px;
    min-width: 0;
    overflow: hidden;
}

.home-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.home-welcome h1 {
    margin: 0;
    color: var(--text);
    font-size: 25px;
    line-height: 1.2;
    font-weight: 800;
}

.home-welcome p {
    margin: 8px 0 0;
    color: var(--muted-strong);
    font-size: 15px;
}

.home-portfolio-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 230px;
    padding: 14px 18px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: #111827;
    box-shadow: var(--shadow-sm);
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
}

.nav-portfolio-link {
    min-width: 0;
    min-height: auto;
    padding: 10px 14px;
    border-color: #334155;
    font-size: 13px;
}

.nav-portfolio-link .home-portfolio-link-icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
}

.home-portfolio-link:hover,
.home-portfolio-link:focus {
    border-color: var(--accent);
    color: var(--accent);
    background: #ffffff;
}

.home-portfolio-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.home-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    gap: 10px;
}

.home-kpi-card,
.home-panel,
.home-portfolio-banner {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

.home-kpi-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 12px;
}

.home-kpi-icon,
.home-quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.home-kpi-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    flex: 0 0 auto;
}

.home-kpi-label {
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.home-kpi-value {
    margin-top: 2px;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
}

.home-kpi-caption {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.home-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.85fr);
    gap: 18px;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.home-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 18px;
}

.home-panel-header {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.home-panel h2,
.home-portfolio-banner h2 {
    margin: 0;
    color: var(--text);
    font-size: 19px;
    line-height: 1.25;
    font-weight: 800;
}

.home-panel p,
.home-portfolio-banner p {
    margin: 6px 0 0;
    color: var(--muted-strong);
    font-size: 13px;
}

.home-tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    border: 1px solid #f3bdc5;
    border-radius: 999px;
    background: #fff1f3;
    color: var(--accent);
    font-size: 12px;
    vertical-align: middle;
    cursor: help;
}

.codebook-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.codebook-button-group div {
    margin: 0;
}

.codebook-button-group label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.codebook-button-group input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.codebook-button-group label:has(input:checked) {
    border-color: var(--accent);
    background: #c9181d;
    color: #ffffff;
}

.codebook-button-group label:hover {
    border-color: var(--accent);
}

.folder-panel .form-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.folder-panel .form-group {
    grid-column: span 2;
}

.folder-panel .form-group:has(.codebook-button-group) {
    grid-column: span 1;
}

.folder-panel .form-field-postulacion_periodo,
.folder-panel .form-field-resolucion_periodo,
.folder-panel .form-field-fecha_inicio,
.folder-panel .form-field-fecha_fin,
.folder-panel .form-field-proyecto_oco,
.folder-panel .form-field-fecha_primera_declaracion,
.folder-panel .form-field-d1_link,
.folder-panel .form-field-fecha_segunda_declaracion,
.folder-panel .form-field-d2_link {
    grid-column: span 1;
}

.folder-panel .declaration-pair {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(240px, 1fr);
    grid-column: span 2;
    gap: 14px;
    align-items: end;
}

.folder-panel .declaration-pair > .form-group,
.folder-panel .declaration-pair > .declaration-link-field {
    min-width: 0;
}

.folder-panel .declaration-link-field {
    display: flex;
    flex-direction: column;
}

.folder-panel .declaration-pair label {
    margin-bottom: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.folder-panel input[type="date"],
.folder-panel input[type="month"],
.folder-panel .compact-field {
    max-width: 220px;
}

.home-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding: 2px 4px 2px 2px;
}

.home-quick-card-wrap {
    position: relative;
    min-width: 0;
}

.home-quick-card {
    display: flex;
    min-height: 58px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 34px 8px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
}

.home-quick-card > span:not(.home-quick-icon) {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.home-pin-button {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #dbe2ea;
    border-radius: 999px;
    background: #ffffff;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.home-quick-grid.is-editing .home-pin-button {
    display: inline-flex;
}

.home-quick-card-wrap.is-pinned .home-pin-button {
    border-color: #fecaca;
    color: var(--accent);
}

.home-edit-pins {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.home-edit-pins:hover,
.home-edit-pins:focus {
    border-color: var(--border-strong);
    background: var(--surface-soft);
}

.home-quick-card small {
    display: block;
    margin-top: -6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.home-quick-card:hover,
.home-quick-card:focus {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.home-quick-icon {
    width: 24px;
    height: 24px;
    font-size: 13px;
    flex: 0 0 auto;
}

.home-activity-list {
    display: grid;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding-right: 4px;
}

.home-activity-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.home-activity-dot {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #dcfce7;
    position: relative;
}

.home-activity-dot::after {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: inherit;
    background: #22c55e;
}

.home-activity-item strong {
    color: #334155;
    font-size: 14px;
}

.home-activity-item p {
    margin: 2px 0 0;
}

.home-activity-item time {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.home-empty-state {
    padding: 22px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.home-area-list {
    display: grid;
    gap: 12px;
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}

.home-area-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.home-area-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text);
}

.home-area-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    font-weight: 900;
}

.home-area-links {
    display: grid;
    gap: 6px;
}

.home-area-links a,
.home-area-links span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 32px;
    padding: 7px 9px;
    border-radius: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.home-area-links a {
    background: #f8fafc;
}

.home-area-links a:hover,
.home-area-links a:focus {
    background: #fff1f3;
    color: var(--accent);
}

.home-area-links span {
    color: #94a3b8;
    background: transparent;
}

.home-area-links small {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.home-portfolio-banner {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-color: #c4b5fd;
    background: #f7f5ff;
}

.home-portfolio-banner a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #5b35d5;
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    text-decoration: none;
}

.home-tone-red {
    background: #ffe4ea;
    color: #c8102e;
}

.home-tone-blue {
    background: #e8f1ff;
    color: #2563eb;
}

.home-tone-green {
    background: #dcfce7;
    color: #16a34a;
}

.home-tone-orange {
    background: #ffedd5;
    color: #ea580c;
}

.home-tone-purple {
    background: #ede9fe;
    color: #6d28d9;
}

.home-tone-yellow {
    background: #fef3c7;
    color: #d97706;
}

.home-tone-slate {
    background: #f1f5f9;
    color: #475569;
}

@media (max-width: 1500px) {
    .home-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .home-quick-card {
        min-height: 58px;
        align-items: center;
        flex-direction: row;
        justify-content: flex-start;
        padding: 7px 36px 7px 10px;
        text-align: left;
        font-size: 12px;
    }

    .home-quick-card > span:not(.home-quick-icon) {
        min-width: 0;
        max-width: calc(100% - 4px);
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .home-quick-card small {
        display: none;
    }

    .home-quick-icon {
        display: inline-flex;
        width: 22px;
        height: 22px;
        font-size: 13px;
    }

    .home-pin-button {
        top: 50%;
        right: 9px;
        width: 21px;
        height: 21px;
        font-size: 12px;
        transform: translateY(-50%);
    }
}

@media (max-width: 960px) {
    :root {
        --header-height: auto;
    }

    .site-header {
        position: sticky;
    }

    .navbar {
        align-items: stretch;
        flex-direction: column;
        min-height: auto;
        padding: 16px 24px;
        gap: 12px;
    }

    .nav-link {
        min-height: 38px;
    }

    .nav-dropdown-menu {
        position: static;
        min-width: min(100%, 280px);
        max-height: 220px;
        margin-top: 4px;
        overflow: auto;
    }

    .nav-flyout-menu {
        position: static;
        display: grid;
        min-width: 0;
        margin: 2px 0 8px 12px;
        box-shadow: none;
    }

    .nav-flyout-label::after {
        content: "v";
    }

    .navbar-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .workflow-sidebar {
        position: static;
        width: auto;
        max-height: none;
        margin: 0 20px;
        display: flex;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        border-radius: 10px;
        padding: 8px;
    }

    .workflow-sidebar-title,
    .workflow-sidebar-section,
    .workflow-sidebar-section summary {
        flex: 0 0 auto;
        margin: 0;
        align-self: center;
        white-space: nowrap;
    }

    .workflow-sidebar a,
    .workflow-sidebar span {
        flex: 0 0 auto;
        padding: 5px 7px;
        font-size: 11px;
        line-height: 1.15;
        white-space: nowrap;
    }

    .workflow-sidebar-upload-box {
        flex: 0 0 auto;
        margin: 0 0 0 8px;
        padding: 0 0 0 8px;
        border-top: 0;
        border-left: 1px solid var(--border);
    }

    .workflow-sidebar-upload-box a {
        min-height: 32px;
        padding: 5px 8px;
    }

    .workflow-sidebar-upload-icon {
        width: 22px;
        height: 22px;
    }

    .workflow-sidebar-upload-icon::before {
        left: 7px;
        top: 6px;
        width: 7px;
        height: 7px;
        border-width: 2px 0 0 2px;
    }

    .workflow-sidebar-upload-icon::after {
        left: 10px;
        top: 8px;
        width: 2px;
        height: 9px;
        box-shadow: -5px 6px 0 -1px currentColor, 5px 6px 0 -1px currentColor;
    }

    .workflow-sidebar-upload-box strong {
        font-size: 11px;
    }

    .workflow-sidebar-upload-box small {
        display: none;
    }

    .workflow-sidebar-section summary {
        padding: 5px 7px;
        font-size: 10px;
        line-height: 1.1;
    }

    .main-wrapper {
        padding: 32px 20px;
    }

    body.app-body:has(.workflow-sidebar) .main-wrapper {
        margin: 0 auto;
        max-width: 72rem;
    }

    .app-body:has(.manual-menu-container) {
        height: auto;
        overflow: auto;
    }

    .main-wrapper:has(.manual-menu-container) {
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 32px 20px;
    }

    .manual-menu-container {
        height: auto;
    }

    .manual-menu-container .forms-menu-list {
        max-height: 70vh;
    }

    .app-body:has(.uandes-list-container) {
        height: auto;
        overflow: auto;
    }

    .app-body:has(.uandes-form-container) {
        height: auto;
        overflow: auto;
    }

    .main-wrapper:has(.uandes-list-container) {
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 32px 20px;
    }

    .main-wrapper:has(.uandes-form-container) {
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 32px 20px;
    }

    .uandes-list-container {
        height: auto;
    }

    .uandes-form-container {
        height: auto;
    }

    .uandes-filter-form {
        display: block;
    }

    .uandes-form-container .crud-form,
    .uandes-form-container .folder-form-card {
        display: block;
    }

    .uandes-table-wrapper {
        max-height: 70vh;
    }

    .uandes-form-container .folder-content,
    .uandes-form-container .form-card {
        max-height: 70vh;
    }

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

    .main-wrapper:has(.home-dashboard) {
        height: auto;
        padding: 0;
        overflow: visible;
    }

    .app-body:has(.home-dashboard) {
        height: auto;
        overflow: auto;
    }

    .home-dashboard {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .home-dashboard-sidebar {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .home-sidebar-item {
        flex: 0 0 auto;
    }

    .home-help-card {
        display: none;
    }

    .home-dashboard-main {
        padding: 24px 18px;
        overflow: visible;
    }

    .folder-panel .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .folder-panel .form-group,
    .folder-panel .form-group:has(.codebook-button-group) {
        grid-column: span 1;
    }

    .home-welcome {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .home-portfolio-link {
        width: 100%;
        min-width: 0;
        padding: 12px 14px;
    }

    .home-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-content-grid {
        grid-template-columns: 1fr;
    }

    .home-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }

    .home-quick-card {
        min-height: 54px;
    }

    .home-activity-list {
        max-height: none;
    }

    .home-portfolio-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .landing-home {
        min-height: calc(100vh - 64px);
        padding: 32px 0;
    }

    .landing-panel {
        padding: 24px 24px 48px;
    }

    .landing-content {
        gap: 24px;
    }

    .landing-logo-wrap {
        margin-top: 12px;
    }

    .landing-subtitle {
        font-size: 16px;
    }

    .landing-actions {
        width: 100%;
        flex-direction: column;
    }

    .landing-button {
        min-height: 44px;
        font-size: 14px;
    }

    .landing-message {
        padding: 24px;
        font-size: 14px;
    }

    .forms-menu-row {
        grid-template-columns: 54px 1fr;
    }

    .forms-menu-progress {
        display: none;
    }
}

@media (max-width: 640px) {
    .page-title,
    .dashboard-title,
    .form-page-title {
        font-size: 30px;
    }

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

    .login-card-ref {
        padding: 24px;
    }

    .home-kpi-grid,
    .home-quick-grid {
        grid-template-columns: 1fr;
    }
}
