.grs-wrap {
    --grs-bg: #ffffff;
    --grs-soft-bg: #f7fbfb;
    --grs-border: #d9e5e8;
    --grs-border-strong: #b9ccd2;
    --grs-text: #33251f;
    --grs-muted: #6f625d;
    --grs-accent: #00a99c;
    --grs-accent-dark: #008f85;
    --grs-pink: #ed125f;
    --grs-ink: #0d4f6a;
    --grs-success: #0f7b3f;
    --grs-warning: #8a4b08;
    --grs-error: #b42318;
    --grs-row: #fbfdfd;
    max-width: 100%;
    color: var(--grs-text);
    font-size: 16px;
    line-height: 1.45;
}

.grs-wrap,
.grs-wrap * { box-sizing: border-box; }
.grs-wrap a { color: var(--grs-ink); }
.grs-section { margin: 0 0 1.25rem; }

.grs-list-section {
    margin-top: 0.35rem;
    overflow: hidden;
    border: 1px solid var(--grs-border);
    border-radius: 18px;
    background: var(--grs-bg);
    box-shadow: 0 12px 28px rgba(13, 79, 106, 0.08);
}

.grs-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    border-bottom: 1px solid var(--grs-border);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%);
}

.grs-list-section h2,
.grs-submit-section h3 { margin: 0; color: var(--grs-text); line-height: 1.2; }
.grs-list-section h2 { font-size: clamp(1.25rem, 2vw, 1.7rem); font-weight: 850; }
.grs-list-subtitle,
.grs-help-text { margin: 0.32rem 0 0; color: var(--grs-muted); font-size: 0.94rem; }

.grs-table-search-wrap { flex: 0 1 280px; min-width: 220px; }
.grs-table-search-wrap label,
.grs-field label,
.grs-choice-label {
    display: block;
    margin: 0 0 0.25rem;
    color: var(--grs-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.grs-table-search,
.grs-wrap .grs-field input,
.grs-wrap .grs-field select {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--grs-border-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--grs-text);
    font: inherit;
    font-size: 0.94rem;
    line-height: 1.2;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.grs-table-search { border-radius: 999px; }

.grs-table-search:focus,
.grs-wrap .grs-field input:focus,
.grs-wrap .grs-field select:focus {
    border-color: var(--grs-accent);
    box-shadow: 0 0 0 3px rgba(0, 169, 156, 0.18);
    outline: none;
}

.grs-table-wrap { overflow-x: auto; padding: 0; }
.grs-table { width: 100%; min-width: 720px; border: 0; border-collapse: collapse; border-spacing: 0; background: #fff; table-layout: fixed; }
.grs-table th,
.grs-table td { padding: 0.95rem 1rem; border: 0; border-bottom: 1px solid var(--grs-border); text-align: left; vertical-align: top; }
.grs-table th:nth-child(1), .grs-table td:nth-child(1) { width: 28%; }
.grs-table th:nth-child(2), .grs-table td:nth-child(2) { width: 26%; }
.grs-table th:nth-child(3), .grs-table td:nth-child(3) { width: 28%; }
.grs-table th:nth-child(4), .grs-table td:nth-child(4) { width: 18%; }
.grs-table th { background: #ffffff; color: var(--grs-muted); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.035em; text-transform: uppercase; }
.grs-table td { color: var(--grs-text); font-size: 0.96rem; }
.grs-table tbody tr:nth-child(even) td { background: var(--grs-row); }
.grs-table tbody tr:hover td { background: #effafa; }
.grs-table tr:last-child td { border-bottom: 0; }
.grs-table td:first-child { font-weight: 850; }
.grs-report-link { font-weight: 800; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.grs-report-link:hover,
.grs-report-link:focus { color: var(--grs-accent-dark); text-decoration-thickness: 2px; }

.grs-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    letter-spacing: inherit;
    line-height: 1.2;
    text-align: left;
    text-transform: inherit;
}
.grs-sort-button::after { content: "↕"; color: var(--grs-border-strong); font-size: 0.82rem; line-height: 1; }
.grs-sort-button.is-asc::after { content: "↑"; color: var(--grs-accent-dark); }
.grs-sort-button.is-desc::after { content: "↓"; color: var(--grs-accent-dark); }

.grs-is-hidden,
.grs-table tr[hidden],
.grs-no-results[hidden],
.grs-recent-deadlines[hidden],
.grs-edit-gate[hidden],
.grs-field[hidden],
.grs-field-grid[hidden] { display: none !important; }

.grs-recent-deadlines { padding: 0.9rem 1rem 0; border-bottom: 1px solid var(--grs-border); background: #fff; }
.grs-recent-title { margin: 0 0 0.5rem; color: var(--grs-pink); font-size: 0.86rem; font-weight: 900; letter-spacing: 0.03em; text-transform: uppercase; }
.grs-recent-table-wrap { border: 1px solid rgba(237, 18, 95, 0.22); border-radius: 14px; margin-bottom: 0.9rem; }
.grs-recent-table th,
.grs-recent-table td { color: var(--grs-pink); }

.grs-submit-section,
.grs-filter-panel {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--grs-border);
    border-radius: 16px;
    background: var(--grs-soft-bg);
}
.grs-edit-gate { margin-top: 1rem; }
.grs-unlock-note { margin: 0 0 0.75rem; color: var(--grs-success); font-weight: 800; }
.grs-field-grid,
.grs-filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.85rem; align-items: end; }
.grs-field { margin: 0; }
.grs-entry-type-field label { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0.35rem 1rem 0.25rem 0; font-weight: 700; text-transform: none; letter-spacing: normal; color: var(--grs-text); }
.grs-entry-type-field input { width: auto; min-height: auto; }
.grs-actions { margin: 1rem 0 0; }
.grs-filter-actions { display: flex; align-items: center; gap: 0.75rem; }

.grs-wrap .grs-button,
.grs-wrap button.grs-button,
.grs-wrap a.grs-button,
.grs-wrap input[type="submit"].grs-button,
.grs-wrap .grs-actions .grs-button,
.grs-wrap .grs-submit-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 0.68rem 1.05rem !important;
    border: 1px solid #00a99c !important;
    border-radius: 999px !important;
    background: #00a99c !important;
    color: #ffffff !important;
    text-decoration: none !important;
    cursor: pointer !important;
    font: inherit !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}
.grs-wrap .grs-button:hover,
.grs-wrap .grs-button:focus,
.grs-wrap .grs-submit-button:hover,
.grs-wrap .grs-submit-button:focus {
    background: #008f85 !important;
    border-color: #008f85 !important;
    color: #ffffff !important;
}

.grs-reset-link { font-weight: 800; }
.grs-no-results,
.grs-empty,
.grs-notice { margin: 1rem; padding: 0.75rem 0.9rem; border-radius: 12px; font-weight: 700; }
.grs-notice-success { background: #ecfdf3; color: var(--grs-success); }
.grs-notice-warning { background: #fff8e6; color: var(--grs-warning); }
.grs-notice-error { background: #fff0f0; color: var(--grs-error); }
.grs-hp { display: none !important; visibility: hidden !important; }
.grs-date-pill { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 999px; background: #edf7f6; color: var(--grs-text); font-weight: 800; }
.grs-date-pill-custom { background: #f3f0ff; }

@media (max-width: 760px) {
    .grs-list-header { display: block; }
    .grs-table { min-width: 0; }
    .grs-table thead { display: none; }
    .grs-table tr { display: block; border-bottom: 1px solid var(--grs-border); }
    .grs-table td { display: grid; grid-template-columns: 42% 1fr; gap: 0.75rem; border-bottom: 0; }
    .grs-table td::before { content: attr(data-label); color: var(--grs-muted); font-weight: 900; text-transform: uppercase; font-size: 0.75rem; }
}
