:root {
    color-scheme: light;
}

html, body {
    margin: 0;
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    background: #F3F0E8;
    color: #1C241F;
}

a {
    color: #1F4D3A;
}

.mud-layout .mud-main-content.main-content {
    padding: 76px 32px 48px;
}

.public-main {
    max-width: 1100px;
    margin: 0 auto;
}

.app-title {
    font-weight: 650;
    letter-spacing: 0.01em;
}

.user-name {
    margin-right: 12px;
    opacity: 0.9;
}

.text-button {
    border: 1px solid rgba(247, 244, 236, 0.45);
    background: transparent;
    color: #F7F4EC;
    border-radius: 999px;
    padding: 6px 12px;
    font: inherit;
    cursor: pointer;
}

.text-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.app-drawer .mud-nav-link {
    border-radius: 10px;
    margin: 2px 10px;
    color: #F4F1EA;
}

.app-drawer .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: #F3F0E8 !important;
    color: #17382B !important;
    font-weight: 700 !important;
}

.app-drawer .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon,
.app-drawer .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-icon-root {
    color: #17382B !important;
}

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.page-head h1 {
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: -0.02em;
}

.page-head p {
    margin: 4px 0 0;
    color: #5C675F;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 16px;
    margin-bottom: 8px;
}

.row-inactive {
    opacity: 0.55;
}

.clickable-row {
    cursor: pointer;
}

@media (max-width: 600px) {
.list-table.mud-xs-table .mud-table-body .mud-table-row {
    display: flex;
    flex-direction: column;
    margin: 0 0 12px;
    border: 1px solid #E4DDD0;
    border-radius: 14px;
    background: #FFFDF9;
    overflow: hidden;
}

.list-table.mud-xs-table .mud-table-body .mud-table-cell {
    display: grid !important;
    grid-template-columns: minmax(6.75rem, 38%) 1fr;
    align-items: start;
    justify-content: stretch !important;
    text-align: left !important;
    gap: 8px;
    border: 0;
    border-top: 1px solid #EFEAE2;
    padding: 9px 14px !important;
    white-space: normal;
}

.list-table.mud-xs-table .mud-table-body .mud-table-cell::before {
    color: #5C675F;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.35;
}

.list-table.mud-xs-table .card-title {
    order: -1;
    grid-template-columns: 1fr;
    background: #F6F3EC;
    border-top: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.list-table.mud-xs-table .card-title::before {
    content: none;
}

.list-table.mud-xs-table .card-actions {
    display: flex !important;
    justify-content: flex-end !important;
}

.list-table.mud-xs-table .card-actions::before {
    content: none;
}

.list-table .mud-select:not(.mud-table-pagination-select) input.mud-select-input::placeholder {
    color: #5C675F;
    opacity: 1;
}
}

.delete-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding-bottom: 8px;
}

.editor-page {
    width: min(720px, 100%);
    margin: 0 auto;
}

.editor-page-wide {
    width: min(1280px, 100%);
}

.editor-layout {
    display: grid;
    gap: 20px;
}

.editor-page-wide .editor-layout {
    grid-template-columns: minmax(340px, 0.9fr) minmax(560px, 1.25fr);
    align-items: start;
}

.info-button {
    border: 0;
    background: #1976D2;
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.info-button:hover {
    background: #1565C0;
}

.person-cards {
    background: #F4F0E6;
    border: 1px solid #E4DDD0;
    border-radius: 14px;
    padding: 16px 16px 8px;
    min-width: 0;
}

.person-cards .page-head {
    margin-bottom: 8px;
}

.person-cards h2 {
    margin: 0;
    font-size: 1.25rem;
}

.person-card-table {
    background: transparent;
}

.person-card-table .mud-table-container {
    overflow-x: hidden;
}

.person-card-table table {
    table-layout: fixed;
    width: 100%;
}

.person-card-table .sport-cell {
    white-space: normal;
    overflow-wrap: anywhere;
}

.person-card-table .area-cell {
    white-space: normal;
}

.person-card-table .nowrap-cell {
    white-space: nowrap;
}

.editor-shell {
    background: #FFFCF7;
    border-radius: 16px;
}

.editor-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

@media (max-width: 900px) {
    .editor-page-wide .editor-layout {
        grid-template-columns: 1fr;
    }
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(23, 32, 27, 0.46);
    display: grid;
    place-items: center;
    z-index: 1100;
    padding: 24px;
}

.modal-card {
    width: min(520px, 100%);
    background: #FFFCF7;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 18px 50px rgba(23, 32, 27, 0.18);
}

.login-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.login-aside {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 35%),
        linear-gradient(160deg, #1F4D3A, #10261d 70%);
    color: #F7F4EC;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.login-aside h1 {
    font-size: 3rem;
    margin: 0 0 12px;
    letter-spacing: -0.03em;
}

.login-aside p {
    max-width: 36rem;
    font-size: 1.15rem;
    line-height: 1.5;
    color: rgba(247, 244, 236, 0.84);
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-card {
    width: min(420px, 100%);
}

.login-card h2 {
    margin: 0 0 8px;
}

.login-card p {
    margin: 0 0 8px;
}

.login-search-link {
    margin-bottom: 4px;
}

.login-form {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.login-form label {
    font-weight: 650;
    margin-top: 8px;
}

.login-form input {
    font: inherit;
    border: 1px solid #D9D1C3;
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
}

.login-form button,
.primary-button,
.ghost-button,
.danger-button {
    font: inherit;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
}

.login-form button,
.primary-button {
    border: 0;
    background: #1F4D3A;
    color: #F7F4EC;
    font-weight: 650;
}

.ghost-button {
    border: 1px solid #D9D1C3;
    background: transparent;
    color: #1C241F;
}

.danger-button {
    border: 0;
    background: #9C3B32;
    color: white;
}

.form-error {
    background: #F8E7E4;
    color: #9C3B32;
    border-radius: 10px;
    padding: 10px 12px;
}

.phone-cell {
    white-space: pre-line;
}

.print-sheet {
    max-width: 900px;
    margin: 32px auto;
    background: white;
    padding: 32px;
}

.print-sheet h1 {
    margin-bottom: 0;
}

.print-sheet table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

.print-sheet th,
.print-sheet td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #E4DDD0;
    vertical-align: top;
}

.print-sheet tbody tr:nth-child(even) {
    background: #F6F3EC;
}

.row-table table,
.list-table table {
    width: 100%;
}

.row-table td.shrink {
    width: 1%;
    white-space: nowrap;
    padding-right: 16px;
}

.row-table td.row-actions,
.list-table td.card-actions,
.list-table .mud-table-cell.card-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: end;
    margin-bottom: 12px;
}

.inline-form .mud-input-control {
    flex: 1;
}

@media (max-width: 900px) {
    .login-screen,
    .filter-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .login-aside {
        padding: 32px 24px;
    }

    .main-content {
        padding: 18px 14px 32px;
    }
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    .print-sheet {
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
}
