.agenda-search {
    --agenda-border: #d8dde3;
    --agenda-border-2: #e8edf3;
    --agenda-panel: #ffffff;
    --agenda-header: #e8eef6;
    --agenda-text: #1f2937;
    --agenda-muted: #4b5563;
    --agenda-focus: #0b5cab;
    --agenda-chip: #f7f7f8;
    --agenda-status-bg: #e4edf8;
    --agenda-surface: #f5f8fc;
    --agenda-accent: #0b4f93;
    --agenda-accent-hover: #0a427a;
    color: var(--agenda-text);
    border: 1px solid var(--agenda-border-2);
    border-radius: 12px;
    padding: 1rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
}

.agenda-search__heading {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--agenda-text);
    border-bottom: 2px solid var(--agenda-accent);
    padding-bottom: 0.75rem;
}

.agenda-search__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 1rem;
    align-items: start;
}

.agenda-search__main,
.agenda-search__sidebar {
    min-width: 0;
    background: var(--agenda-panel);
    border: 1px solid var(--agenda-border-2);
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    padding: 0.85rem;
}

.agenda-search__form {
    display: grid;
    gap: 0.9rem;
}

.agenda-search__section {
    border: 1px solid var(--agenda-border);
    border-radius: 6px;
    padding: 0 0.75rem 0.85rem;
    background: var(--agenda-panel);
    box-shadow: inset 0 1px 0 #ffffff;
}

.agenda-search__section-header {
    margin: 0 -0.75rem 0.75rem;
    background-color: var(--agenda-header);
    color: #102a43;
    padding: 0.55rem 0.75rem;
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid var(--agenda-border-2);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.agenda-search__label,
.agenda-search__legend {
    display: block;
    margin: 0 0 0.35rem;
    font-weight: 600;
    color: var(--agenda-text);
    font-size: 0.92rem;
}

.agenda-search__input {
    width: 100%;
    min-height: 2.5rem;
    border: 1px solid #b8c1cc;
    border-radius: 4px;
    padding: 0.5rem 0.6rem;
    background: #fff;
    color: #111827;
    margin-bottom: 0.45rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.agenda-search__input:hover {
    border-color: #8ea0b5;
}

.agenda-search__date-input-wrap {
    position: relative;
}

.agenda-search__date-input-wrap .agenda-search__input[type="date"] {
    margin-bottom: 0;
    padding-right: 2.8rem;
}

.agenda-search__date-icon {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 4px;
    color: #111827;
    background: #f2a62a;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agenda-search__date-icon svg {
    display: block;
}

.agenda-search__input[type="date"] {
    cursor: pointer;
    padding-right: 2.8rem;
}

.agenda-search__input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 0.45rem;
    width: 1.95rem;
    height: 1.95rem;
    cursor: pointer;
    opacity: 0;
}

.agenda-search__actions {
    display: flex;
    gap: 0.5rem;
}

.agenda-search__button {
    appearance: none;
    border: 1px solid #0a3f75 !important;
    border-radius: 4px;
    background: var(--agenda-accent) !important;
    color: #ffffff !important;
    min-height: 2.6rem;
    padding: 0.5rem 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.agenda-search__actions .agenda-search__button {
    flex: 1;
}

.agenda-search__button:hover {
    background: var(--agenda-accent-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(11, 79, 147, 0.24);
}

.agenda-search__button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.agenda-search__button:focus-visible,
.agenda-search__input:focus-visible {
    outline: 3px solid var(--agenda-focus);
    outline-offset: 2px;
}

.agenda-search__status-wrap {
    margin-bottom: 0.75rem;
}

.agenda-search__status {
    display: inline-block;
    margin: 0;
    font-weight: 700;
    border-radius: 4px;
    background: var(--agenda-status-bg);
    border: 1px solid #c4d8f1;
    color: #153e75;
    padding: 0.42rem 0.62rem;
    font-size: 0.93rem;
}

.agenda-search__results {
    overflow-x: auto;
}

.agenda-search__table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--agenda-border);
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.agenda-search__table th,
.agenda-search__table td {
    border-bottom: 1px solid var(--agenda-border-2);
    padding: 0.64rem;
    vertical-align: top;
    text-align: left;
}

.agenda-search__table thead th {
    background: #edf3fb;
    font-weight: 700;
    color: #102a43;
}

.agenda-search__table tbody tr:nth-child(even) {
    background: #fafcff;
}

.agenda-search__table tbody tr:hover {
    background: #eef5ff;
}

.agenda-search__table a {
    color: #0b4f93;
    text-decoration: underline;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.agenda-search__table a:focus-visible {
    outline: 3px solid var(--agenda-focus);
    outline-offset: 2px;
}

.agenda-search__pagination {
    margin-top: 0.8rem;
}

.agenda-search__pager-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid var(--agenda-border);
    border-radius: 6px;
    padding: 0.55rem 0.7rem;
    background: #f9fbff;
}

.agenda-search__pager-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--agenda-muted);
    font-size: 0.93rem;
}

.agenda-search__pager-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.agenda-search__pager-button {
    min-width: 2.5rem;
    min-height: 2rem;
    padding: 0.35rem 0.6rem;
    text-align: center;
    font-weight: 700;
    color: #153e75;
    background: #e7f0fb;
    border: 1px solid #c7d9ef;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.agenda-search__pager-button:hover:not(:disabled) {
    background: #d4e3f7;
    border-color: #a5c3e0;
}

.agenda-search__pager-button:focus-visible {
    outline: 3px solid var(--agenda-focus);
    outline-offset: 2px;
}

.agenda-search__pager-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.agenda-search__pager-current {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--agenda-muted);
    font-size: 0.93rem;
}

.agenda-search__screen-reader {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.agenda-search__loading {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--agenda-muted);
    font-style: italic;
}

.agenda-search__error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    padding: 0.75rem;
    color: #c33;
    margin: 0.75rem 0;
}

@media (max-width: 991px) {
    .agenda-search__grid {
        grid-template-columns: 1fr;
    }

    .agenda-search__main {
        order: 1;
    }

    .agenda-search__sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .agenda-search {
        padding: 0.75rem;
    }

    .agenda-search__heading {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .agenda-search__sidebar {
        order: 1;
    }

    .agenda-search__main {
        order: 2;
    }

    .agenda-search__grid {
        gap: 0.75rem;
    }

    .agenda-search__main,
    .agenda-search__sidebar {
        padding: 0.65rem;
    }

    .agenda-search__table thead {
        display: none;
    }

    .agenda-search__table,
    .agenda-search__table tbody,
    .agenda-search__table tr,
    .agenda-search__table td {
        display: block;
        width: 100%;
    }

    .agenda-search__table {
        border: 0;
        background: transparent;
    }

    .agenda-search__table tr {
        border: 1px solid var(--agenda-border);
        border-radius: 10px;
        background: #fff;
        margin-bottom: 0.7rem;
        overflow: hidden;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    }

    .agenda-search__table td {
        border-bottom: 1px solid var(--agenda-border-2);
        padding: 0.55rem 0.65rem;
    }

    .agenda-search__table td:last-child {
        border-bottom: 0;
    }

    .agenda-search__table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        color: #1c3f66;
        margin-bottom: 0.2rem;
        font-size: 0.86rem;
        text-transform: uppercase;
    }

    .agenda-search__pager-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .agenda-search__pager-meta,
    .agenda-search__pager-buttons {
        justify-content: center;
        width: 100%;
    }

    .agenda-search__pager-buttons {
        flex-wrap: wrap;
    }
}
