.content-header {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.content-header h1 {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 720;
    letter-spacing: -.035em;
    line-height: 1.15;
}

.date-filter {
    width: 210px;
    max-width: 100%;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: 0;
    background: #fff;
    color: var(--color-text);
    font-size: 13px;
    box-shadow: var(--shadow-sm);
}

.date-filter:focus { border-color: #7d9b96; box-shadow: 0 0 0 3px rgba(20, 63, 58, .09); }

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
    gap: 20px;
    width: 100%;
    min-width: 0;
    align-items: start;
}

.pedimentos-panel {
    width: 100%;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.pedimento-card {
    position: relative;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 18px;
    width: 100%;
    min-width: 0;
    min-height: 112px;
    align-items: center;
    margin-bottom: 8px;
    padding: 18px 54px 18px 18px;
    border: 1px solid transparent;
    border-radius: 15px;
    background: var(--color-surface-soft);
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.pedimento-card:hover {
    border-color: #cedbd7;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 47, 43, .07);
    transform: translateY(-1px);
}

.pedimento-card:last-child { margin-bottom: 0; }

.document-icon {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border: 1px solid #dbe5e2;
    border-radius: 16px;
    background: #fff;
    font-size: 27px;
    box-shadow: 0 4px 12px rgba(15, 47, 43, .05);
}

.pedimento-info { min-width: 0; color: var(--color-text); font-size: 14px; }
.pedimento-info div { max-width: 100%; overflow-wrap: anywhere; }
.pedimento-info strong { color: var(--color-muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.pedimento-info br { display: block; content: ""; margin-top: 9px; }

.pedimento-date {
    align-self: end;
    padding: 5px 9px;
    border-radius: 8px;
    background: #eaf0ee;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.edit-button {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-muted);
    font-size: 26px;
    line-height: 1;
    transition: background .18s ease, color .18s ease;
}

.pedimento-card:hover .edit-button { background: #e5ecea; color: var(--color-brand); }

.no-results {
    display: grid;
    min-height: 180px;
    place-items: center;
    padding: 36px 20px;
    color: var(--color-muted);
    font-size: 14px;
    text-align: center;
}

.documents-panel {
    width: 100%;
    min-width: 0;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #173f3b, #0d302c);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.documents-panel h2 { margin: 0 0 22px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.documents-panel h3 { margin: 22px 0 8px; color: #f0cb8e; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.documents-panel h3:first-of-type { margin-top: 0; }

.document-link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color .18s ease, transform .18s ease;
}

.document-link:hover { color: #fff; transform: translateX(3px); }

@media (max-width: 1050px) {
    .content-grid { grid-template-columns: 1fr; }
    .documents-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
    .documents-panel h2 { grid-column: 1 / -1; }
    .documents-panel h3:nth-of-type(2) { margin-top: 0; }
}

@media (max-width: 680px) {
    .content-header { align-items: stretch; flex-direction: column; }
    .date-filter { width: 100%; }
    .pedimento-card { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 15px 48px 15px 15px; }
    .document-icon { width: 52px; height: 52px; border-radius: 14px; font-size: 23px; }
    .pedimento-date { grid-column: 2; justify-self: start; }
    .documents-panel { display: block; }
    .documents-panel h3:nth-of-type(2) { margin-top: 22px; }
}

@media (max-width: 430px) {
    .pedimentos-panel { padding: 7px; border-radius: 18px; }
    .pedimento-card { grid-template-columns: 1fr; padding: 16px; }
    .pedimento-date { grid-column: 1; }
    .edit-button { top: 10px; right: 10px; }
    .documents-panel { padding: 20px; border-radius: 18px; }
}
