:root {
    --navy: #102a43;
    --blue: #0c3d6b;
    --green: #16803c;
    --red: #d92727;
    --ink-soft: #4d5a72;
    --surface: #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #edf8ef 0%, #d5ecd9 100%);
    color: var(--navy);
    margin: 0;
}

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

.card, .table-card {
    background: var(--surface);
    border-radius: 16px;
    border-top: 6px solid var(--green);
    box-shadow: 0 14px 36px rgba(16, 42, 67, 0.12);
}

.card { padding: 28px; width: 100%; max-width: 420px; }
.table-card { padding: 28px; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 72px; height: 72px; object-fit: contain; }
.brand-name { margin: 0; color: var(--navy); font-size: 1.65rem; }
.brand-name { color: var(--green); }

.page { max-width: 960px; margin: 32px auto; padding: 0 18px; }
.home-screen {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0 66%, transparent 66%),
        linear-gradient(135deg, #eff8f1 0%, #d9eee0 100%);
}
.home-page { max-width: 1120px; margin: 24px auto; }
.home-header { margin: 0 0 24px; padding: 0 14px; }
.home-brand .brand-logo {
    width: 80px;
    height: 80px;
    padding: 5px;
    background: #fff;
    border: 1px solid #dce6e1;
}
.home-brand .brand-name { color: var(--navy); }
.home-panel {
    padding: 28px 26px 26px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(22, 128, 60, 0.12);
    border-top: 5px solid var(--green);
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(16, 42, 67, 0.12);
}
.home-title { margin: 0 0 20px; text-align: center; font-size: 1.55rem; }
.home-segments {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.home-segment {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background: linear-gradient(105deg, #fff 0%, #fff 74%, #f1f8f3 100%);
    border: 1px solid #dbe6e8;
    border-radius: 11px;
    box-shadow: 0 5px 12px rgba(16, 42, 67, 0.08);
    color: inherit;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.home-segment::after {
    position: absolute;
    z-index: -1;
    right: -22px;
    bottom: -54px;
    width: 210px;
    height: 95px;
    content: "";
    background: rgba(22, 128, 60, 0.07);
    border-radius: 50%;
    transform: rotate(-15deg);
}
.home-segment-icon {
    flex: 0 0 100px;
    display: grid;
    width: 100px;
    height: 68px;
    place-items: center;
    font-size: 3.2rem;
    line-height: 1;
}
.home-segment-icon img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.home-segment-players .home-segment-icon img { transform: translateY(-25px); }
.home-segment h3 { margin: 0 0 5px; color: var(--navy); font-size: 1.2rem; }
.home-segment p { margin: 0; color: var(--navy); font-size: 1rem; }
.home-segment-players::after { background: rgba(12, 61, 107, 0.07); }
.home-segment-members::after { background: rgba(38, 166, 91, 0.08); }
.home-segment-rosters::after { background: rgba(232, 194, 58, 0.12); }
.home-segment:hover {
    transform: translateY(-2px);
    border-color: rgba(22, 128, 60, 0.42);
    box-shadow: 0 7px 16px rgba(16, 42, 67, 0.12);
}
.home-segment:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.home-main-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.home-main-links .home-segment { min-width: 0; min-height: 76px; height: 76px; gap: 8px; padding: 8px; }
.home-main-links .home-segment-icon { flex-basis: 64px; width: 64px; height: 58px; }
.fixture-section { margin-top: 30px; padding-top: 22px; border-top: 1px solid #dbe6e8; }
.fixture-switcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.fixture-tab { width: 100%; min-width: 0; font: inherit; text-align: left; cursor: pointer; }
.fixture-tab[aria-pressed="true"] { border-color: var(--green); box-shadow: 0 7px 16px rgba(16, 42, 67, 0.12); }
.fixture-tab:hover, .fixture-tab:focus-visible { border-color: var(--green); }
.fixture-tab:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.fixture-menu-title { margin: 0 0 12px; text-align: center; }
.fixture-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.provincial-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 24px; }
.fixture-action { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 100px; padding: 10px; border: 1px solid #dbe6e8; border-radius: 8px; background: var(--blue); color: #fff; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.fixture-action img { flex: 0 0 96px; width: 96px; height: 72px; object-fit: contain; }
.fixture-action-amonestaciones { gap: 4px; }
.fixture-action-amonestaciones img { flex: 0 0 52px; width: 52px; height: 56px; }
.fixture-action-amonestaciones span { min-width: 0; flex: 0 1 auto; font-size: 0.8rem; white-space: nowrap; }
.provincial-actions .fixture-action { flex-direction: column; gap: 4px; min-width: 0; min-height: 108px; padding: 8px; }
.provincial-actions .fixture-action img,
.provincial-actions .fixture-action-amonestaciones img { flex: 0 0 auto; width: 64px; height: 48px; }
.provincial-actions .fixture-action span { min-width: 0; flex: 0 1 auto; font-size: 0.76rem; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
.fixture-action:hover, .fixture-action:focus-visible { background: var(--green); }
.fixture-action:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.provincial-team-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }
.season-form { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.season-form label { margin-bottom: 0; font-weight: 700; }
.season-form input { width: 100px; min-height: 40px; margin-bottom: 0; padding: 8px 10px; border: 1px solid #b8c8c0; border-radius: 6px; font: inherit; }
.season-form button[type="submit"] { width: auto; min-width: 0; min-height: 40px; padding: 8px 12px; border-radius: 6px; font-size: 0.9rem; }
.fixture-categories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fixture-category { border: 1px solid #dbe6e8; border-radius: 8px; background: #fff; }
.fixture-category summary { padding: 14px; color: var(--navy); font-weight: 700; cursor: pointer; }
.fixture-category summary:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.fixture-divisions { display: grid; gap: 8px; padding: 0 14px 14px; }
.fixture-divisions a { color: var(--blue); text-decoration: none; }
.fixture-divisions a:hover { text-decoration: underline; }
.provincial-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.provincial-group { display: flex; min-width: 0; flex-direction: column; padding: 14px; border: 2px solid #8aa398; border-radius: 6px; background: #fff; }
.provincial-group h3 { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid #dbe6e8; color: var(--navy); text-align: center; }
.provincial-group ul { display: grid; flex: 1; gap: 4px; margin: 0; padding: 0; list-style: none; }
.provincial-group li { display: flex; min-width: 0; min-height: 34px; align-items: center; justify-content: center; text-align: center; }
.provincial-group a, .provincial-group li > span { display: block; max-width: 100%; color: var(--blue); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.provincial-group a:hover, .provincial-group a:focus-visible { text-decoration: underline; }
.provincial-round { margin-top: 24px; padding-top: 18px; border-top: 1px solid #dbe6e8; }
.provincial-content .provincial-round > h3 { margin: 0 0 14px; color: var(--navy); text-align: center; }
.semifinal-matchups { display: grid; max-width: 780px; gap: 8px; margin: 0 auto; }
.semifinal-matchups p { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; margin: 0; padding: 12px 16px; border-bottom: 1px solid #dbe6e8; text-align: center; }
.numbered-matchups p { grid-template-columns: 24px minmax(0, 1fr) auto minmax(0, 1fr); }
.compact-matchups p { grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); }
.compact-matchups p > span { white-space: nowrap; }
.semifinal-matchups strong { color: var(--green); white-space: nowrap; }
.match-number { color: var(--ink-soft); font-weight: 700; }
.provincial-team-detail h2 { margin-top: 12px; }
.roster-filter { margin: 0 0 20px; color: var(--ink-soft); }
.planillas-toolbar { display: grid; grid-template-columns: minmax(88px, 0.5fr) minmax(100px, 0.6fr) minmax(70px, 0.4fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) repeat(3, minmax(164px, 1fr)); align-items: end; gap: 12px; margin: 0 0 20px; }
.positions-toolbar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.positions-print-form { display: block; margin: 0; }
.positions-print-form .planillas-action { width: 164px; }
.planillas-filter { display: contents; margin: 0; }
.planillas-filter-field { display: grid; min-width: 0; gap: 5px; }
.planillas-filter label { margin: 0; font-size: 0.875rem; font-weight: 700; }
.planillas-filter select { width: 100%; min-width: 0; min-height: 40px; margin: 0; padding: 8px 10px; border: 1px solid #b8c8c0; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; }
.planillas-filter input[readonly] { width: 100%; min-width: 0; min-height: 40px; margin: 0; padding: 8px 10px; border: 1px solid #b8c8c0; border-radius: 6px; background: #edf2ee; color: var(--navy); font: inherit; }
.planillas-filter button, .planillas-toolbar > .planillas-action { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 0; height: 48px; min-height: 48px; margin: 0; padding: 6px; border: 0; border-radius: 6px; background: var(--blue); color: #fff; cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 700; line-height: 1.2; text-align: center; white-space: nowrap; }
.planillas-filter button { font-size: 0.75rem; }
.planillas-filter .mostrar-partidos { font-size: 0.72rem; }
.planillas-filter button:hover, .planillas-toolbar > .planillas-action:hover:not(:disabled) { background: var(--green); }
.planillas-toolbar > .planillas-action:disabled, .planillas-print-form .planillas-action:disabled { cursor: not-allowed; }
.planillas-toolbar [hidden], .planillas-editor[hidden] { display: none; }
.roster-results { overflow-x: auto; }
.roster-results table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.roster-results th, .roster-results td { padding: 5px 8px; border-bottom: 1px solid #dbe6e8; line-height: 1.2; text-align: left; white-space: nowrap; }
.roster-results th { background: #eff6f1; }
.planillas-row { cursor: pointer; }
.planillas-row:hover, .planillas-row.is-selected { background: #e7f2e9; }
.planillas-row:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.planillas-editor { margin-top: 20px; padding: 18px; border: 1px solid #dbe6e8; border-left: 4px solid var(--green); border-radius: 6px; background: #f8fbf9; }
.planillas-editor h3 { margin: 0 0 14px; font-size: 1.05rem; }
.planillas-readonly-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.planillas-edit-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; align-items: end; margin-bottom: 16px; }
.planillas-readonly-fields label, .planillas-edit-fields label { display: grid; min-width: 0; gap: 5px; font-size: 0.85rem; font-weight: 700; }
.planillas-readonly-fields input, .planillas-edit-fields input, .planillas-edit-fields select { width: 100%; min-width: 0; min-height: 38px; margin: 0; padding: 7px 9px; border: 1px solid #b8c8c0; border-radius: 5px; background: #fff; color: var(--navy); font: inherit; }
.planillas-readonly-fields input[readonly], .planillas-edit-fields input[readonly] { background: #edf2ee; }
.planillas-edit-form > button { width: auto; min-width: 250px; }
.roster-message { padding: 14px; background: #f3f7f4; border-radius: 6px; }
.player-option-icon {
    flex-basis: 76px;
    width: 76px;
    height: 68px;
}
.player-option-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-actions { display: flex; align-items: center; gap: 18px; }
.segment-back { display: inline-block; margin-bottom: 24px; color: var(--blue); font-weight: 700; text-decoration: none; }
.segment-back:hover { text-decoration: underline; }
.segment-intro { display: flex; align-items: center; gap: 24px; min-height: 170px; }
.segment-image { width: 150px; height: 150px; object-fit: contain; }
.segment-intro h2 { margin: 0 0 8px; font-size: 1.7rem; }
.segment-intro p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.amonestaciones-search { max-width: 720px; margin: 0 auto 22px; }
.amonestaciones-search-fields { display: grid; grid-template-columns: minmax(150px, 0.65fr) minmax(240px, 1.35fr); align-items: end; gap: 16px; }
.amonestaciones-search-fields .player-field label { min-height: 1.35em; }
.amonestaciones-search [hidden] { display: none !important; }
.amonestaciones-search .player-field select,
.amonestaciones-search .player-field input { width: 100%; }
.amonestaciones-search { margin-bottom: 0; }
.amonestaciones-actions { justify-content: flex-start; align-items: stretch; max-width: 720px; margin: 16px auto 22px; }
.amonestaciones-actions > button, .amonestaciones-actions > .amonestaciones-print-form { flex: 1 1 0; min-width: 0; }
.amonestaciones-search-button { min-width: 170px; }
.amonestaciones-print-form { display: flex; min-width: 0; margin: 0; }
.amonestaciones-print-form button { width: 100%; min-width: 0; }
.amonestaciones-team-summary { margin: 20px 0; padding: 14px 16px; border-left: 4px solid var(--blue); border-radius: 6px; background: #eff6f1; }
.amonestaciones-team-summary h3, .amonestaciones-team-summary p { margin: 0; }
.amonestaciones-team-summary h3 { margin-bottom: 6px; }
.amonestaciones-results { overflow-x: auto; margin-top: 20px; }
.amonestaciones-results table { min-width: 680px; }
.amonestaciones-results th { width: auto; }
.amonestaciones-row { cursor: pointer; }
.amonestaciones-row:hover, .amonestaciones-row.is-selected { background: #e7f2e9; }
.amonestaciones-row:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.amonestaciones-editor[hidden] { display: none; }
.amonestaciones-editor > p { margin: 0 0 10px; }
.amonestaciones-history { display: grid; gap: 4px; margin: 0 0 14px; }
.amonestaciones-history-row { display: grid; grid-template-columns: 220px 100px; column-gap: 12px; align-items: baseline; }
.amonestaciones-history time { font-variant-numeric: tabular-nums; }
.amonestaciones-form { margin-top: 14px; }
.amonestaciones-form button { width: auto; min-width: 220px; margin-top: 12px; }
.amonestaciones-form { max-width: 620px; padding-top: 14px; border-top: 1px solid #dbe6e8; }
.amonestaciones-form button[type="submit"] { width: auto; min-width: 220px; }
.goles-results td:last-child { width: 220px; }
.goles-player-input { width: 120px; min-height: 40px; margin: 0; }
.goles-results + .form-actions { justify-content: flex-start; }
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}
.header h1 { margin: 0; color: var(--navy); }
.header p { margin: 8px 0 0; color: var(--ink-soft); }
.header a { color: var(--blue); text-decoration: none; font-weight: 700; }

label { display: block; margin-bottom: 10px; color: var(--ink-soft); }
input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #d8d8e0;
    margin-bottom: 18px;
    font: inherit;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(16, 42, 67, 0.04);
}
input:focus { outline: 3px solid rgba(22, 128, 60, 0.2); border-color: var(--green); }
.search-row input,
.player-field input,
.player-field select {
    border: 1px solid #cfd7d1;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
    box-shadow: inset 0 1px 2px rgba(16, 42, 67, 0.04);
}
#nombre_equipo,
#equipo_nombre { color-scheme: light; }
.search-row input:focus,
.player-field input:focus,
.player-field select:focus {
    outline: 2px solid rgba(12, 61, 107, 0.18);
    border-color: #8cadbb;
}
button[type="submit"], .amonestaciones-search .amonestaciones-add-toggle,
.amonestaciones-actions .amonestaciones-add-toggle {
    width: 100%;
    min-height: 48px;
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
}
button[type="submit"]:hover, .amonestaciones-search .amonestaciones-add-toggle:hover,
.amonestaciones-actions .amonestaciones-add-toggle:hover { background: var(--green); }
.amonestaciones-add-toggle[hidden] { display: none; }
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 150px;
    padding: 10px 18px;
}
.icon-button img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}
.icon-button span {
    display: inline-block;
    line-height: 1.2;
    font-size: 1.05rem;
}

.password-field { position: relative; }
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 40px;
    background: none;
    border: none;
    color: var(--blue);
    cursor: pointer;
    font-weight: 700;
    padding: 6px 8px;
}

.message { margin-bottom: 18px; padding: 14px 16px; border-radius: 10px; font-weight: 700; }
.error, .rojo { background: rgba(235, 87, 87, 0.12); color: #a01f1f; }
.verde { background: rgba(56, 161, 87, 0.14); color: #1d6d2d; }

table { width: 100%; border-collapse: collapse; margin-top: 24px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #eef0f4; }
th { width: 210px; color: var(--ink-soft); }
td { color: var(--navy); }

.player-workspace { max-width: 900px; margin: 0 auto; }
.search-form { max-width: 620px; margin: 0 auto 22px; }
.search-form label, .player-field label { margin-bottom: 7px; font-weight: 700; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.search-row input { margin-bottom: 0; }
.team-autocomplete { position: relative; min-width: 0; }
.team-suggestions {
    position: absolute;
    z-index: 5;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    max-height: 220px;
    overflow-y: auto;
    padding: 5px;
    background: #fff;
    border: 1px solid #cfd7d1;
    border-top: 3px solid var(--green);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(16, 42, 67, 0.16);
}
.team-suggestions[hidden] { display: none; }
.team-suggestion {
    padding: 10px 12px;
    border-radius: 5px;
    color: var(--navy);
    cursor: pointer;
    font-weight: 600;
}
.team-suggestion:hover, .team-suggestion.is-active {
    background: #eaf5ed;
    color: var(--blue);
}
.search-row button, .form-actions button { width: auto; min-width: 150px; border-radius: 7px; }
.search-row input::-webkit-calendar-picker-indicator {
    opacity: 0.7;
}
.player-form, .add-player-form { margin-top: 24px; padding-top: 22px; border-top: 1px solid #dce6e1; }
.player-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.player-field { min-width: 0; }
.player-field input, .player-field select { min-height: 44px; margin-bottom: 0; border: 1px solid #d8d8e0; border-radius: 7px; padding: 10px 12px; font: inherit; }
.player-field input[readonly] { background: #f4f7f5; color: var(--ink-soft); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.add-player-action { justify-content: flex-start; max-width: 620px; margin: 0 auto; }
.add-player-form h3 { margin: 0 0 18px; color: var(--navy); }
.form-actions button:disabled { background: #9aa7a1; cursor: not-allowed; }

@media (max-width: 1050px) {
    .provincial-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .fixture-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .provincial-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 950px) {
    .planillas-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .planillas-filter button { white-space: normal; }
}

@media (max-width: 600px) {
    .login-page { padding: 16px; }
    .page { margin: 20px auto; padding: 0 12px; }
    .home-page { margin: 16px auto; }
    .home-header { align-items: center; flex-direction: row; gap: 10px; padding: 0 2px; }
    .home-brand { gap: 10px; }
    .home-brand .brand-logo { width: 58px; height: 58px; }
    .home-header a { white-space: nowrap; font-size: 0.9rem; }
    .home-panel { padding: 22px 14px 16px; }
    .home-title { margin-bottom: 16px; font-size: 1.25rem; }
    .home-main-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .fixture-switcher { gap: 8px; }
    .provincial-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .semifinal-matchups p { gap: 8px; padding: 12px 4px; }
    .compact-matchups p { font-size: 0.9rem; }
    .fixture-action { flex-direction: column; gap: 4px; min-height: 120px; }
    .fixture-action-amonestaciones { flex-direction: row; gap: 4px; }
    .fixture-action-amonestaciones img { flex: 0 0 44px; width: 44px; }
    .fixture-action-amonestaciones span { font-size: 0.72rem; }
    .season-form { flex-wrap: wrap; gap: 8px; }
    .fixture-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .fixture-category summary { padding: 12px 9px; }
    .fixture-divisions { padding: 0 9px 12px; }
    .provincial-group { min-height: 0; padding: 12px 8px; font-size: 0.9rem; overflow-wrap: anywhere; }
    .planillas-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .planillas-filter button, .planillas-toolbar > .planillas-action { grid-column: span 2; }
    .planillas-toolbar > .planillas-action { min-width: 0; padding: 8px; white-space: normal; }
    .planillas-readonly-fields, .planillas-edit-fields { grid-template-columns: minmax(0, 1fr); }
    .planillas-edit-form > button { width: 100%; min-width: 0; }
    .home-segment { min-height: 82px; gap: 10px; padding: 8px 10px; }
    .home-segment-icon { flex-basis: 66px; width: 66px; height: 60px; font-size: 2.65rem; }
    .home-segment-players .home-segment-icon img { transform: translateY(-20px); }
    .player-option-icon { flex-basis: 60px; width: 60px; height: 60px; font-size: 2.4rem; }
    .home-actions { gap: 10px; }
    .search-row, .player-fields, .amonestaciones-search-fields { grid-template-columns: 1fr; }
    .search-row button, .form-actions button { width: 100%; }
    .form-actions { flex-direction: column; }
    .amonestaciones-actions { flex-direction: row; gap: 8px; }
    .amonestaciones-actions > button, .amonestaciones-actions > .amonestaciones-print-form { min-width: 0; }
    .amonestaciones-actions button { padding: 10px 6px; font-size: 0.82rem; }
    .amonestaciones-history-row { grid-template-columns: 220px 100px; }
    .amonestaciones-form button { width: 100%; }
    .amonestaciones-form button[type="submit"] { width: 100%; }
    .home-segment h3 { font-size: 1rem; }
    .home-segment p { font-size: 0.88rem; }
    .segment-intro { align-items: flex-start; gap: 14px; min-height: 120px; }
    .segment-image { width: 88px; height: 88px; }
    .segment-intro h2 { font-size: 1.3rem; }
    .header { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
    .header h1 { font-size: 1.45rem; }
    .card, .table-card { padding: 20px; }
    .brand-logo { width: 60px; height: 60px; }
    .brand-name { font-size: 1.4rem; }
    table, thead, tbody, tr, th, td { display: block; width: 100%; }
    .amonestaciones-results table { display: table; width: 100%; }
    .amonestaciones-results thead { display: table-header-group; }
    .amonestaciones-results tbody { display: table-row-group; }
    .amonestaciones-results tr { display: table-row; width: auto; padding: 0; }
    .amonestaciones-results th, .amonestaciones-results td { display: table-cell; width: auto; padding: 5px 8px; }
    tr { padding: 10px 0; border-bottom: 1px solid #eef0f4; }
    th, td { border: 0; padding: 3px 0; }
    th { font-size: 0.8rem; text-transform: uppercase; }
}
