/* Capa visual propia de Gestión Social sobre WowDash. */
:root {
    --gs-app-background: #f2f8f2;
    --primary-50: #edf7ef;
    --primary-100: #d9eddd;
    --primary-200: #b7dcbf;
    --primary-300: #89c294;
    --primary-400: #55a365;
    --primary-500: #2e8543;
    --primary-600: #076324;
    --primary-700: #07521f;
    --primary-800: #0a431c;
    --primary-900: #0b3719;
    --success-main: #168449;
    --success-600: #168449;
    --success-700: #0f6a3a;
    --gs-brand-blue: #076324;
    --gs-brand-green: #168449;
    --gs-brand-gold: #ae841e;
    --gs-brand-gradient: linear-gradient(135deg, #07521f 0%, #168449 100%);
    --gs-focus: #ae841e;
    --gs-sidebar-width: 264px;
    --bg-color: var(--gs-app-background);
    --border-color: #d9e6da;
    --input-form-light: #cfded1;
    color-scheme: only light;
}

html {
    scroll-behavior: smooth;
    background: var(--gs-app-background);
}

body.gs-app {
    min-width: 320px;
    background: var(--gs-app-background);
    font-family: Inter, Aptos, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.dashboard-main-body {
    background: var(--gs-app-background);
}

.gs-skip-link {
    position: fixed;
    z-index: 10000;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    color: #fff;
    background: #111827;
    border-radius: 8px;
    transform: translateY(-160%);
    transition: transform .18s ease;
}

.gs-skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--gs-focus) !important;
    outline-offset: 2px;
}

.gs-sidebar {
    width: var(--gs-sidebar-width);
    background: #fff;
    border-inline-end: 1px solid #dfeade;
    box-shadow: 10px 0 35px rgba(7, 82, 31, .035);
}

.gs-sidebar .sidebar-menu-area {
    height: calc(100vh - 112px);
    padding: 8px 14px 24px;
}

.gs-sidebar .sidebar-menu > li > a {
    min-height: 48px;
    margin-block: 4px;
    border-radius: 12px;
    color: var(--text-secondary-light);
    font-weight: 600;
}

.gs-sidebar .sidebar-menu > li > a:hover,
.gs-sidebar .sidebar-menu > li > a:focus-visible,
.gs-sidebar .sidebar-menu > li > a.active-page {
    color: var(--primary-700);
    background: linear-gradient(90deg, rgba(7, 99, 36, .13), rgba(174, 132, 30, .07));
}

.gs-sidebar .sidebar-menu .menu-icon {
    width: 24px;
    font-size: 1.35rem;
    text-align: center;
}

.gs-sidebar-label {
    padding: 18px 12px 6px;
    color: var(--neutral-500);
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gs-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 106px;
    padding: 12px 16px;
    color: var(--text-primary-light);
}

.gs-brand:hover {
    color: var(--text-primary-light);
}

.gs-brand-logo-wrap {
    display: grid;
    width: 104px;
    min-width: 0;
    flex: 0 0 104px;
    place-items: center;
}

.gs-brand-logo {
    display: block;
    width: 100%;
    max-width: 104px;
    height: auto;
    object-fit: contain;
}

.gs-brand-copy {
    min-width: 0;
}

.gs-brand-title {
    display: block;
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.15;
}

.gs-brand-subtitle {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary-light);
    font-size: .65rem;
    font-weight: 600;
}

.gs-sidebar .sidebar-close-btn {
    top: 14px;
    right: 12px;
}

@media (min-width: 1200px) {
    .gs-sidebar.active:hover {
        width: var(--gs-sidebar-width);
    }

    .gs-sidebar.active:not(:hover) .gs-brand {
        justify-content: center;
        padding-inline: 10px;
    }

    .gs-sidebar.active:not(:hover) .gs-brand-logo-wrap {
        width: 58px;
        flex-basis: 58px;
    }

    .gs-sidebar.active:not(:hover) .gs-brand-logo {
        max-width: 58px;
    }

    .gs-sidebar.active:not(:hover) .gs-brand-copy,
    .gs-sidebar.active:not(:hover) .gs-sidebar-label {
        display: none;
    }
}

.gs-main {
    margin-inline-start: var(--gs-sidebar-width);
}

.gs-main .navbar-header {
    min-height: 76px;
    padding: 13px 28px;
    background: rgba(255, 255, 255, .94) !important;
    border-bottom: 1px solid #dfeade;
    backdrop-filter: blur(12px);
}

.gs-topbar-title {
    margin: 0;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.gs-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--text-primary-light);
    background: var(--neutral-100);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.25rem;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.gs-icon-button:hover {
    color: var(--primary-700);
    background: var(--primary-50);
    transform: translateY(-1px);
}

.gs-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gs-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    color: #fff;
    background: var(--gs-brand-gradient);
    border-radius: 50%;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(7, 99, 36, .18);
}

.gs-user-name {
    overflow: hidden;
    max-width: 180px;
    color: var(--text-primary-light);
    font-size: .875rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gs-user-role {
    display: block;
    color: var(--text-secondary-light);
    font-size: .72rem;
    font-weight: 500;
}

.gs-page-header {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 22px 24px;
    background: linear-gradient(125deg, rgba(7, 99, 36, .10), rgba(174, 132, 30, .07));
    border: 1px solid rgba(7, 99, 36, .14);
    border-radius: 16px;
}

.gs-page-header::after {
    content: "";
    position: absolute;
    right: -55px;
    bottom: -75px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(174, 132, 30, .13), transparent 69%);
    border-radius: 50%;
    pointer-events: none;
}

.gs-page-title {
    margin: 0;
    color: var(--text-primary-light);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -.025em;
}

/* WowDash declara los tamaños globales de h1-h3 con !important. Estos
   encabezados pertenecen al sistema visual de Gestión Social y necesitan
   conservar una escala legible incluso con zoom o columnas estrechas. */
body.gs-app h1.gs-page-title {
    font-size: clamp(1.25rem, 2vw, 1.65rem) !important;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.gs-page-subtitle {
    max-width: 760px;
    margin: 6px 0 0;
    color: var(--text-secondary-light);
    font-size: .9rem;
}

.gs-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 10px 0 0;
    padding: 0;
    color: var(--text-secondary-light);
    font-size: .78rem;
    list-style: none;
}

.gs-breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-inline-start: 7px;
    color: var(--neutral-400);
}

.gs-card,
.gs-filter-card {
    background: var(--base);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .035);
}

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

.gs-card-header > div {
    min-width: 0;
}

.gs-card-title {
    margin: 0;
    color: var(--text-primary-light);
    font-size: 1rem;
    font-weight: 800;
}

body.gs-app h2.gs-card-title {
    font-size: clamp(1rem, .96rem + .18vw, 1.125rem) !important;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.gs-card-subtitle {
    margin: 3px 0 0;
    color: var(--text-secondary-light);
    font-size: .78rem;
}

.gs-card-body {
    padding: 22px;
}

.gs-filter-card {
    margin-bottom: 24px;
    padding: 18px;
}

.gs-metric-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    padding: 20px;
    background: var(--base);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .04);
}

.gs-metric-card::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: -30px;
    width: 100px;
    height: 100px;
    background: var(--gs-metric-soft, rgba(7, 99, 36, .1));
    border-radius: 50%;
}

.gs-metric-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.gs-metric-card-link:hover {
    color: inherit;
    border-color: var(--gs-metric-color, var(--primary-500));
    box-shadow: 0 13px 34px rgba(15, 23, 42, .09);
    transform: translateY(-2px);
}

.gs-metric-card-link:focus-visible {
    color: inherit;
    outline: 3px solid rgba(7, 99, 36, .28);
    outline-offset: 3px;
}

.gs-metric-action {
    position: absolute;
    z-index: 1;
    top: 20px;
    right: 20px;
    display: inline-grid;
    width: 28px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--gs-metric-color, var(--primary-600));
    background: var(--gs-metric-soft, var(--primary-50));
    border-radius: 50%;
    font-size: .95rem;
}

.gs-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--gs-metric-color, var(--primary-600));
    background: var(--gs-metric-soft, var(--primary-50));
    border-radius: 13px;
    font-size: 1.35rem;
}

.gs-tone-blue { --gs-metric-color: #07521f; --gs-metric-soft: rgba(7, 99, 36, .12); }
.gs-tone-green { --gs-metric-color: #168449; --gs-metric-soft: rgba(22, 132, 73, .12); }
.gs-tone-yellow { --gs-metric-color: #8a6714; --gs-metric-soft: rgba(174, 132, 30, .15); }
.gs-tone-red { --gs-metric-color: #c73f4e; --gs-metric-soft: rgba(199, 63, 78, .12); }
.gs-tone-purple { --gs-metric-color: #7251b5; --gs-metric-soft: rgba(114, 81, 181, .12); }

.gs-metric-label {
    display: block;
    margin-top: 16px;
    color: var(--text-secondary-light);
    font-size: .78rem;
    font-weight: 700;
}

.gs-metric-value {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 3px;
    color: var(--text-primary-light);
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -.035em;
}

.gs-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.gs-status::before {
    content: "";
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
}

.gs-status-success { color: #0f6a3a; background: rgba(22, 132, 73, .11); border-color: rgba(22, 132, 73, .2); }
.gs-status-warning { color: #795a10; background: rgba(174, 132, 30, .14); border-color: rgba(174, 132, 30, .24); }
.gs-status-danger { color: #b22f3d; background: rgba(199, 63, 78, .10); border-color: rgba(199, 63, 78, .2); }
.gs-status-info { color: #07521f; background: rgba(7, 99, 36, .11); border-color: rgba(7, 99, 36, .2); }
.gs-status-neutral { color: var(--neutral-600); background: var(--neutral-100); border-color: var(--border-color); }

.gs-progress {
    height: 8px;
    overflow: hidden;
    background: var(--neutral-200);
    border-radius: 999px;
}

.gs-progress-bar {
    min-width: 0;
    height: 100%;
    background: var(--gs-brand-gradient);
    border-radius: inherit;
}

.gs-table {
    margin: 0;
    color: var(--text-primary-light);
    vertical-align: middle;
}

.gs-table > :not(caption) > * > * {
    padding: 14px 16px;
    border-bottom-color: var(--border-color);
}

.gs-table thead th {
    color: var(--text-secondary-light);
    background: var(--neutral-50);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
    white-space: nowrap;
}

.gs-table tbody tr:last-child td {
    border-bottom: 0;
}

.gs-table tbody tr:hover {
    background: rgba(7, 99, 36, .035);
}

.gs-table-title {
    color: var(--text-primary-light);
    font-weight: 750;
}

.gs-table-meta {
    display: block;
    margin-top: 2px;
    color: var(--text-secondary-light);
    font-size: .74rem;
}

.gs-money {
    color: var(--text-primary-light);
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    white-space: nowrap;
}

.gs-empty-state {
    padding: 48px 24px;
    text-align: center;
}

.gs-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 18px;
    font-size: 1.8rem;
}

.gs-empty-state h3 {
    margin-bottom: 6px;
    font-size: 1rem;
    font-weight: 800;
}

body.gs-app .gs-empty-state h3 {
    font-size: 1rem !important;
    line-height: 1.35;
}

.gs-empty-state p {
    max-width: 480px;
    margin: 0 auto;
    color: var(--text-secondary-light);
    font-size: .86rem;
}

.gs-section-divider {
    margin: 28px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary-light);
    font-size: .88rem;
    font-weight: 800;
}

body.gs-app h3.gs-section-divider {
    font-size: .88rem !important;
    line-height: 1.35;
}

.gs-form-help {
    margin-top: 5px;
    color: var(--text-secondary-light);
    font-size: .75rem;
}

.gs-required::after {
    content: " *";
    color: var(--danger-600);
}

.form-control,
.form-select {
    min-height: 44px;
    color: var(--text-primary-light);
    background-color: var(--base);
    border-color: var(--border-color);
    border-radius: 10px;
}

textarea.form-control {
    min-height: 108px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(7, 99, 36, .13);
}

.gs-responsible-picker {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.gs-responsible-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.gs-responsible-search {
    width: min(100%, 390px);
}

.gs-responsible-search .input-group-text {
    color: var(--text-secondary-light);
    background: var(--neutral-50);
    border-color: var(--border-color);
    border-radius: 10px 0 0 10px;
}

.gs-responsible-count {
    flex: 0 0 auto;
    color: var(--primary-700);
    font-size: .74rem;
    font-weight: 800;
}

.gs-responsible-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: 330px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 6px 4px 4px;
    scrollbar-gutter: stable;
}

.gs-responsible-option {
    position: relative;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 13px;
    color: var(--text-primary-light);
    background: var(--neutral-50);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.gs-responsible-option[hidden] {
    display: none !important;
}

.gs-responsible-option:hover {
    border-color: var(--primary-400);
}

.gs-responsible-option:has(input:focus-visible) {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(7, 99, 36, .13);
}

.gs-responsible-option:has(input:checked) {
    background: linear-gradient(135deg, rgba(7, 99, 36, .09), rgba(174, 132, 30, .05));
    border-color: var(--primary-500);
}

.gs-responsible-option .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

.gs-responsible-avatar {
    display: inline-grid;
    width: 38px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 11px;
    font-size: .72rem;
    font-weight: 900;
}

.gs-responsible-copy {
    min-width: 0;
}

.gs-responsible-copy strong,
.gs-responsible-copy small {
    display: block;
    overflow-wrap: anywhere;
}

.gs-responsible-copy strong {
    font-size: .8rem;
    line-height: 1.35;
}

.gs-responsible-copy small {
    margin-top: 2px;
    color: var(--text-secondary-light);
    font-size: .69rem;
    line-height: 1.35;
}

.gs-responsible-mark {
    color: var(--success-600);
    font-size: 1.15rem;
    opacity: 0;
}

.gs-responsible-option:has(input:checked) .gs-responsible-mark {
    opacity: 1;
}

.gs-responsible-empty {
    grid-column: 1 / -1;
    padding: 16px;
    color: var(--text-secondary-light);
    background: var(--neutral-50);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    text-align: center;
}

.gs-responsible-picker.is-invalid .gs-responsible-option {
    border-color: rgba(199, 63, 78, .55);
}

.form-check-input:checked {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
}

.btn-primary,
.btn-primary-600,
.bg-primary-600 {
    background: var(--gs-brand-gradient) !important;
    border-color: transparent !important;
}

.btn-primary:hover,
.btn-primary-600:hover {
    filter: brightness(.93);
}

.gs-btn-soft {
    color: var(--primary-700);
    background: var(--primary-50);
    border: 1px solid rgba(7, 99, 36, .16);
}

.gs-btn-soft:hover {
    color: #fff;
    background: var(--primary-700);
}

.gs-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
}

.gs-alert-success { color: #0f6a3a; background: rgba(22, 132, 73, .1); border-color: rgba(22, 132, 73, .2); }
.gs-alert-danger { color: #a62d3a; background: rgba(199, 63, 78, .09); border-color: rgba(199, 63, 78, .18); }
.gs-alert-warning { color: #795a10; background: rgba(174, 132, 30, .12); border-color: rgba(174, 132, 30, .22); }

.gs-chart {
    min-height: 300px;
}

.gs-chart-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    padding: 24px;
    color: var(--text-secondary-light);
    background: var(--neutral-50);
    border: 1px dashed var(--neutral-300);
    border-radius: 12px;
    text-align: center;
}

.gs-builder-row {
    position: relative;
    overflow: hidden;
    padding: 20px;
    background: var(--neutral-50);
    border: 1px solid var(--border-color);
    border-radius: 14px;
}

.gs-builder-row + .gs-builder-row {
    margin-top: 14px;
}

.gs-builder-intro,
.gs-builder-row-header,
.gs-target-explanation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gs-builder-intro {
    padding: 11px 14px;
    color: var(--text-secondary-light);
    background: rgba(7, 99, 36, .06);
    border: 1px dashed rgba(7, 99, 36, .25);
    border-radius: 11px;
    font-size: .8rem;
}

.gs-builder-row-header {
    justify-content: space-between;
    margin: -20px -20px 18px;
    padding: 13px 16px;
    background: var(--base);
    border-bottom: 1px solid var(--border-color);
}

.gs-builder-row-header small {
    display: block;
    max-width: 540px;
    margin-top: 2px;
    color: var(--text-secondary-light);
    font-size: .72rem;
}

.gs-builder-number {
    display: inline-grid;
    width: 30px;
    aspect-ratio: 1;
    place-items: center;
    flex: 0 0 30px;
    color: #fff;
    background: var(--gs-brand-gradient);
    border-radius: 9px;
    font-size: .75rem;
    font-weight: 800;
}

.gs-switch-panel {
    padding: 11px 14px;
    background: var(--neutral-50);
    border: 1px solid var(--border-color);
    border-radius: 11px;
}

.gs-switch-panel small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary-light);
    font-size: .7rem;
}

.gs-tracking-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.gs-tracking-choice {
    position: relative;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: flex-start;
    gap: 12px;
    min-height: 126px;
    padding: 18px;
    color: var(--text-primary-light);
    background: var(--neutral-50);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.gs-tracking-choice:hover {
    border-color: var(--primary-400);
    transform: translateY(-1px);
}

.gs-tracking-choice:has(input:checked) {
    background: linear-gradient(135deg, rgba(7, 99, 36, .09), rgba(174, 132, 30, .06));
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(7, 99, 36, .09);
}

.gs-tracking-choice > input {
    margin-top: 8px;
}

.gs-tracking-choice-icon {
    display: inline-grid;
    width: 42px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 12px;
    font-size: 1.25rem;
}

.gs-tracking-choice strong,
.gs-tracking-choice small {
    display: block;
}

.gs-tracking-choice strong {
    margin: 3px 0 7px;
    font-size: .91rem;
}

.gs-tracking-choice small {
    color: var(--text-secondary-light);
    font-size: .76rem;
    line-height: 1.55;
}

.gs-tracking-choice-check {
    margin-top: 7px;
    color: var(--success-600);
    font-size: 1.2rem;
    opacity: 0;
}

.gs-tracking-choice:has(input:checked) .gs-tracking-choice-check {
    opacity: 1;
}

.gs-target-settings {
    padding: 18px;
    background: linear-gradient(135deg, rgba(7, 99, 36, .07), rgba(174, 132, 30, .04));
    border: 1px solid rgba(7, 99, 36, .2);
    border-radius: 14px;
}

.gs-target-explanation {
    align-items: flex-start;
    padding: 14px 16px;
    color: var(--text-primary-light);
    background: var(--base);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.gs-target-explanation > i {
    flex: 0 0 auto;
    color: var(--primary-600);
    font-size: 1.25rem;
}

.gs-target-explanation strong,
.gs-target-explanation span {
    display: block;
}

.gs-target-explanation strong {
    margin-bottom: 3px;
    font-size: .82rem;
}

.gs-target-explanation span {
    color: var(--text-secondary-light);
    font-size: .74rem;
    line-height: 1.5;
}

.gs-preview-field {
    padding: 18px;
    background: var(--neutral-50);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.gs-form-section {
    display: grid;
    gap: 16px;
}

.gs-preview-field legend {
    float: none;
    width: auto;
    margin-bottom: 0;
    font-size: .9rem;
}

.gs-preview-field-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.gs-field-type-badge {
    flex: 0 0 auto;
    padding: 4px 8px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 800;
}

.gs-choice-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.gs-choice-options--binary {
    grid-template-columns: repeat(2, minmax(120px, 220px));
}

.gs-choice-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    background: var(--base);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
}

.gs-choice-option:has(input:checked) {
    color: var(--primary-700);
    background: rgba(7, 99, 36, .08);
    border-color: var(--primary-500);
}

.gs-choice-option .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

.gs-file-input {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 13px;
    padding: 14px;
    background: var(--base);
    border: 1px dashed var(--primary-400);
    border-radius: 12px;
    cursor: pointer;
}

.gs-file-input-icon {
    display: inline-grid;
    width: 44px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 11px;
    font-size: 1.3rem;
}

.gs-file-input strong,
.gs-file-input small {
    display: block;
}

.gs-file-input strong {
    font-size: .83rem;
}

.gs-file-input small {
    margin-top: 2px;
    color: var(--text-secondary-light);
    font-size: .71rem;
}

.gs-file-input .form-control {
    grid-column: 1 / -1;
    cursor: pointer;
}

.gs-form-tracking {
    padding: 14px;
    background: var(--neutral-50);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.gs-form-tracking-label,
.gs-form-tracking-value,
.gs-form-tracking-help {
    display: block;
}

.gs-form-tracking-label {
    color: var(--text-secondary-light);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.gs-form-tracking-value {
    margin-top: 2px;
    color: var(--text-primary-light);
    font-size: .84rem;
}

.gs-form-tracking-help {
    margin-top: 7px;
    color: var(--text-secondary-light);
    font-size: .69rem;
    line-height: 1.45;
}

.gs-form-tracking-help span {
    white-space: nowrap;
}

.gs-form-tracking-icon {
    display: inline-grid;
    width: 36px;
    aspect-ratio: 1;
    place-items: center;
    flex: 0 0 36px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 10px;
    font-size: 1.05rem;
}

.gs-form-tracking--compact {
    min-width: 245px;
    padding: 11px 12px;
}

.gs-form-tracking--compact .gs-form-tracking-help {
    margin-top: 5px;
}

.gs-form-layout > *,
.gs-form-summary,
.gs-form-summary .gs-card,
.gs-detail-list > div {
    min-width: 0;
}

.gs-form-summary .gs-detail-list dd {
    overflow-wrap: anywhere;
}

.gs-review-guide {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 18px 22px 0;
    padding: 15px 16px;
    color: var(--text-primary-light);
    background: linear-gradient(135deg, rgba(7, 99, 36, .08), rgba(174, 132, 30, .05));
    border: 1px solid rgba(7, 99, 36, .2);
    border-radius: 13px;
}

.gs-review-guide-icon {
    display: inline-grid;
    width: 42px;
    aspect-ratio: 1;
    place-items: center;
    color: var(--primary-700);
    background: var(--base);
    border: 1px solid rgba(7, 99, 36, .18);
    border-radius: 12px;
    font-size: 1.25rem;
}

.gs-review-guide-copy {
    min-width: 0;
}

.gs-review-guide-copy > strong {
    display: block;
    margin-bottom: 4px;
    font-size: .84rem;
}

.gs-review-guide-copy p {
    margin: 0 0 3px;
    color: var(--text-secondary-light);
    font-size: .75rem;
    line-height: 1.55;
}

.gs-review-flow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 330px;
}

.gs-review-actions[open] {
    padding: 10px;
    background: var(--neutral-50);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.gs-answer-details > summary {
    color: var(--primary-700);
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.gs-answer-details > dl {
    display: grid;
    gap: 9px;
    margin: 10px 0 0;
}

.gs-answer-details dt {
    color: var(--text-secondary-light);
    font-size: .67rem;
}

.gs-answer-details dd {
    margin: 1px 0 0;
    color: var(--text-primary-light);
    font-size: .76rem;
}

.gs-attachment-grid {
    display: grid;
    gap: 10px;
    min-width: 270px;
}

.gs-attachment-card {
    overflow: hidden;
    background: var(--base);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.gs-attachment-preview {
    display: grid;
    min-height: 84px;
    place-items: center;
    overflow: hidden;
    background: var(--neutral-100);
    border-bottom: 1px solid var(--border-color);
}

.gs-attachment-preview--image {
    height: 132px;
}

.gs-attachment-preview--image a,
.gs-attachment-preview--image img,
.gs-attachment-preview--video video {
    width: 100%;
    height: 100%;
}

.gs-attachment-preview--image img {
    display: block;
    object-fit: cover;
}

.gs-attachment-preview--audio {
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 12px;
}

.gs-attachment-preview audio {
    width: 100%;
    min-width: 190px;
}

.gs-attachment-preview--video {
    height: 180px;
    background: #0f172a;
}

.gs-attachment-preview--video video {
    object-fit: contain;
}

.gs-attachment-media-icon {
    color: var(--primary-600);
    font-size: 1.4rem;
}

.gs-attachment-document {
    display: grid;
    place-items: center;
    gap: 3px;
    width: 100%;
    min-height: 88px;
    color: var(--primary-700);
    font-size: .72rem;
    font-weight: 800;
}

.gs-attachment-document i {
    font-size: 2rem;
}

.gs-attachment-body {
    padding: 11px;
}

.gs-attachment-field,
.gs-attachment-name,
.gs-attachment-meta {
    display: block;
}

.gs-attachment-field {
    margin-bottom: 3px;
    color: var(--primary-700);
    font-size: .64rem;
    font-weight: 800;
}

.gs-attachment-name {
    overflow: hidden;
    color: var(--text-primary-light);
    font-size: .75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gs-attachment-meta {
    margin-top: 2px;
    color: var(--text-secondary-light);
    font-size: .65rem;
}

.gs-attachment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.gs-inline-note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary-light);
    font-size: .85rem;
}

.gs-alert-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gs-alert-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    background: var(--neutral-50);
    border-inline-start: 4px solid var(--gs-alert-color, var(--primary-600));
    border-radius: 10px;
}

.gs-alert-overdue { --gs-alert-color: #c73f4e; }
.gs-alert-due-soon { --gs-alert-color: #f0a629; }
.gs-alert-on-track { --gs-alert-color: #168449; }
.gs-alert-completed { --gs-alert-color: #168449; }

.gs-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
    margin: 0;
}

.gs-detail-list dt {
    margin-bottom: 3px;
    color: var(--text-secondary-light);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.gs-detail-list dd {
    margin: 0;
    color: var(--text-primary-light);
    font-weight: 650;
}

.gs-mobile-overlay {
    position: fixed;
    z-index: 998;
    inset: 0;
    display: none;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(2px);
}

.gs-mobile-overlay.is-visible {
    display: block;
}

.gs-footer {
    color: var(--text-secondary-light);
    font-size: .78rem;
}

.gs-pagination .page-link {
    min-width: 38px;
    color: var(--text-primary-light);
    background: var(--base);
    border-color: var(--border-color);
    text-align: center;
}

.gs-pagination .active > .page-link {
    color: #fff;
    background: var(--primary-600);
    border-color: var(--primary-600);
}

@media (max-width: 1199.98px) {
    .gs-sidebar {
        transform: translateX(-100%);
        transition: transform .22s ease;
    }

    [dir="rtl"] .gs-sidebar {
        transform: translateX(100%);
    }

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

    .gs-main {
        margin-inline-start: 0;
    }
}

@media (max-width: 1399.98px) {
    .gs-form-summary .gs-detail-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .gs-main .navbar-header {
        min-height: 68px;
        padding: 10px 16px;
    }

    .dashboard-main-body {
        padding: 18px 14px;
    }

    .gs-page-header,
    .gs-card-body,
    .gs-card-header {
        padding: 17px;
    }

    .gs-user-chip .gs-user-name,
    .gs-user-chip .gs-user-role,
    .gs-topbar-title {
        display: none;
    }

    .gs-detail-list {
        grid-template-columns: 1fr;
    }

    .gs-form-summary .gs-detail-list {
        grid-template-columns: 1fr;
    }

    .gs-review-guide {
        grid-template-columns: auto minmax(0, 1fr);
        margin: 14px 14px 0;
    }

    .gs-review-flow {
        grid-column: 1 / -1;
        justify-content: flex-start;
        max-width: none;
    }

    .gs-responsible-picker-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .gs-responsible-search {
        width: 100%;
    }

    .gs-responsible-options {
        grid-template-columns: 1fr;
        max-height: 390px;
    }

    .gs-tracking-choice-grid,
    .gs-choice-options,
    .gs-choice-options--binary {
        grid-template-columns: 1fr;
    }

    .gs-tracking-choice {
        grid-template-columns: auto 1fr auto;
    }

    .gs-tracking-choice > input {
        grid-column: 1 / -1;
        margin: 0;
    }

    .gs-builder-row {
        padding: 16px;
    }

    .gs-builder-row-header {
        margin: -16px -16px 16px;
    }

    .gs-preview-field-header {
        display: block;
    }

    .gs-field-type-badge {
        display: inline-block;
        margin: 4px 0 6px;
    }

    .gs-attachment-grid,
    .gs-form-tracking--compact {
        min-width: 230px;
    }

    .gs-table > :not(caption) > * > * {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    .gs-sidebar,
    .navbar-header,
    .gs-page-actions,
    .d-footer,
    .gs-filter-card,
    .btn {
        display: none !important;
    }

    .gs-main {
        margin: 0 !important;
    }

    .dashboard-main-body {
        padding: 0 !important;
    }

    .gs-card,
    .gs-metric-card {
        break-inside: avoid;
        box-shadow: none;
    }
}

/* Authentication and error states */
.gs-auth-body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-primary-light);
    background: var(--gs-app-background);
    font-family: Inter, Aptos, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.gs-auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 46%) 1fr;
    width: 100%;
    min-width: 0;
}

.gs-auth-brand {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 64px clamp(36px, 6vw, 92px);
    color: var(--primary-900);
    background:
        radial-gradient(circle at 18% 18%, rgba(174, 132, 30, .14), transparent 31%),
        radial-gradient(circle at 82% 78%, rgba(7, 99, 36, .15), transparent 34%),
        linear-gradient(145deg, #f9fcf9 0%, #edf7ef 48%, #deeee1 100%);
    border-inline-end: 1px solid #d9e6da;
}

.gs-auth-brand::after {
    content: '';
    position: absolute;
    width: 360px;
    aspect-ratio: 1;
    right: -130px;
    bottom: -150px;
    border: 1px solid rgba(7, 99, 36, .12);
    border-radius: 50%;
    box-shadow: 0 0 0 52px rgba(7, 99, 36, .035), 0 0 0 104px rgba(174, 132, 30, .025);
}

.gs-auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 590px;
}

.gs-auth-logo {
    display: block;
    width: min(206px, 58%);
    max-width: 206px;
    height: auto;
    margin-bottom: 34px;
    object-fit: contain;
}

.gs-auth-logo-mobile {
    width: 82px;
    max-width: 82px;
    margin: 0;
}

.gs-auth-eyebrow {
    margin-bottom: 12px;
    color: inherit;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gs-auth-brand h1 {
    max-width: 560px;
    margin: 0 0 20px;
    color: var(--primary-900);
    font-size: clamp(2rem, 4.2vw, 3.75rem);
    line-height: 1.08;
}

body.gs-auth-body .gs-auth-brand h1 {
    font-size: clamp(2rem, 4.2vw, 3.75rem) !important;
}

.gs-auth-brand-content > p:not(.gs-auth-eyebrow) {
    max-width: 560px;
    color: #45584a;
    font-size: 1.05rem;
    line-height: 1.75;
}

.gs-auth-benefits {
    display: grid;
    gap: 14px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
}

.gs-auth-benefits li {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 600;
}

.gs-auth-benefits i {
    color: var(--primary-600);
    font-size: 1.25rem;
}

.gs-auth-panel {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    padding: 40px clamp(22px, 6vw, 96px);
    background: var(--gs-app-background);
}

.gs-auth-card {
    width: 100%;
    max-width: 470px;
    min-width: 0;
    padding: clamp(24px, 4vw, 42px);
    background: #fff;
    border: 1px solid #d9e6da;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(7, 82, 31, .08);
}

.gs-auth-title {
    margin: 0;
    color: var(--text-primary-light);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
}

body.gs-auth-body h2.gs-auth-title {
    font-size: clamp(1.75rem, 3vw, 2.35rem) !important;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.gs-auth-panel .gs-auth-eyebrow {
    color: var(--primary-600);
}

.gs-input-icon-wrap {
    position: relative;
}

.gs-input-icon-wrap > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-secondary-light);
    pointer-events: none;
}

.gs-input-icon-wrap .form-control {
    min-height: 50px;
    padding-left: 45px;
}

.gs-auth-submit {
    min-height: 50px;
    font-weight: 700;
}

.gs-auth-help {
    margin: 28px 0 0;
    color: var(--text-secondary-light);
    font-size: .83rem;
    line-height: 1.6;
    text-align: center;
}

.gs-error-state {
    max-width: 700px;
    margin: clamp(42px, 10vh, 110px) auto;
    padding: clamp(30px, 6vw, 64px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--gs-shadow);
    text-align: center;
}

.gs-error-icon {
    display: inline-grid;
    width: 82px;
    aspect-ratio: 1;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 24px;
    color: var(--primary-600);
    background: var(--primary-50);
    font-size: 2.4rem;
}

.gs-error-code {
    margin-bottom: 8px;
    color: var(--primary-600);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gs-error-state h1 {
    margin-bottom: 14px;
    color: var(--text-primary-light);
    font-size: clamp(1.75rem, 4vw, 2.6rem);
}

.gs-error-state > p:not(.gs-error-code) {
    max-width: 560px;
    margin: 0 auto 28px;
    color: var(--text-secondary-light);
    line-height: 1.7;
}

@media (max-width: 991.98px) {
    .gs-auth-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .gs-auth-brand {
        display: none;
    }

    .gs-auth-panel {
        min-height: 100vh;
    }
}

@media (max-width: 479.98px) {
    .gs-auth-panel {
        padding: 24px 16px;
    }

    .gs-auth-card {
        padding: 24px 22px;
        border-radius: 20px;
    }

    .gs-auth-card .d-flex,
    .gs-auth-card form,
    .gs-auth-card .form-control {
        min-width: 0;
        max-width: 100%;
    }
}
