html {
    -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    color: #3c4858;
    overflow-x: hidden;
}

.wrapper {
    min-height: 100vh;
}

.main-panel {
    max-width: 100%;
}

.main-panel > .content .container-fluid {
    padding-left: 24px;
    padding-right: 24px;
}

.navbar > .container-fluid,
.navbar-wrapper {
    min-width: 0;
}

.navbar .navbar-brand {
    display: block;
    max-width: min(62vw, 680px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar .logo .simple-text {
    font-size: 17px;
    line-height: 24px;
    white-space: normal;
}

.content {
    margin-top: 54px;
}

.page-heading {
    margin-bottom: 22px;
}

.page-heading h1 {
    font-family: "Roboto Slab", "Times New Roman", serif;
    font-size: 30px;
    margin: 0;
}

.page-heading p {
    margin: 6px 0 0;
}

.muted {
    color: #6c757d;
}

.panel {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .14);
    margin-bottom: 28px;
    padding: 24px;
}

.panel-heading {
    align-items: center;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: -4px 0 22px;
    padding-bottom: 16px;
}

.panel-heading h2 {
    font-family: "Roboto Slab", "Times New Roman", serif;
    font-size: 21px;
    margin: 0;
}

.grid {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.full {
    grid-column: 1 / -1;
}

label,
.label {
    color: #3c4858;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0;
}

input,
select,
textarea {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: none;
    color: #3c4858;
    min-height: 42px;
    padding: 8px 12px;
    max-width: 100%;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #4caf50;
    outline: 0;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.name-uppercase {
    text-transform: uppercase;
}

.name-titlecase {
    text-transform: capitalize;
}

input[type="checkbox"],
input[type="radio"] {
    min-height: auto;
    width: auto;
}

.choice-row,
.check-row,
.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.check-row {
    align-items: flex-start;
    flex-wrap: nowrap;
    line-height: 1.45;
}

.check-row input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 2px;
}

.check-row span {
    min-width: 0;
}

.required-consent {
    color: #d32f2f;
}

.choice {
    align-items: center;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    display: inline-flex;
    gap: 8px;
    max-width: 100%;
    min-height: 42px;
    padding: 9px 12px;
}

.button {
    align-items: center;
    background-color: #4caf50;
    border: 0;
    border-radius: 3px;
    box-shadow: 0 2px 2px 0 rgba(76, 175, 80, .14), 0 3px 1px -2px rgba(76, 175, 80, .2), 0 1px 5px 0 rgba(76, 175, 80, .12);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 400;
    justify-content: center;
    line-height: 1.428571;
    max-width: 100%;
    min-height: 36px;
    padding: 10px 16px;
    text-align: center;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: normal;
}

.button,
.button:active {
    margin: 0;
}

.button:hover,
.button:focus {
    color: #fff;
    text-decoration: none;
}

.button.secondary {
    background-color: #fff;
    box-shadow: none;
    color: #4caf50;
    outline: 1px solid #4caf50;
}

.button.danger {
    background-color: #fff;
    box-shadow: none;
    color: #f44336;
    outline: 1px solid #f44336;
}

.button.link {
    background: transparent;
    box-shadow: none;
    color: #555;
    padding: 8px 10px;
}

.table-actions {
    min-width: 220px;
    white-space: nowrap;
}

.table-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
}

.table-actions form {
    display: inline-flex;
    margin: 0;
}

.button .material-icons,
.btn .material-icons {
    font-size: 18px;
    margin-right: 6px;
}

.alert {
    border-radius: 4px;
    margin-bottom: 20px;
}

.notice {
    background: linear-gradient(60deg, #66bb6a, #43a047);
    border-radius: 4px;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(76, 175, 80, .4);
    color: #fff;
    margin-bottom: 22px;
    padding: 14px 18px;
}

.total-bar {
    align-items: center;
    background: linear-gradient(60deg, #26c6da, #00acc1);
    border-radius: 4px;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(0, 172, 193, .4);
    color: #fff;
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 18px 22px;
}

.total-value {
    font-size: 24px;
    font-weight: 500;
}

.activity-table,
.table {
    margin-bottom: 0;
    width: 100%;
}

.activity-table {
    min-width: 760px;
}

.table {
    min-width: 640px;
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.activity-table th,
.activity-table td,
.table th,
.table td {
    border-top: 0;
    border-bottom: 1px solid #eee;
    padding: 12px 10px;
    vertical-align: middle;
}

.activity-table th,
.table th {
    color: #777;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.amount-cell {
    min-width: 130px;
}

.activity-check {
    display: inline-block;
}

.activity-row-disabled {
    background: #f7f7f7;
    color: #7b848c;
}

.activity-row-disabled input,
.activity-row-disabled select {
    background-color: #eef0f2;
    color: #7b848c;
    cursor: not-allowed;
}

.activity-row-disabled strong,
.activity-setting-row.is-disabled strong {
    color: #7b848c;
}

.badge {
    background: #e8f5e9;
    border-radius: 999px;
    color: #2e7d32;
    display: inline-flex;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 11px;
}

.badge.paid {
    background: #e8f5e9;
    color: #1b5e20;
}

.badge.pending {
    background: #fff8e1;
    color: #8d6e00;
}

.badge.unpaid {
    background: #ffebee;
    color: #c62828;
}

.badge.disabled {
    background: #eceff1;
    color: #607d8b;
}

.activity-settings-list {
    display: grid;
    gap: 0;
}

.activity-setting-row {
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 0;
    padding: 14px 0;
}

.activity-setting-row:last-child {
    border-bottom: 0;
}

.activity-setting-row input[type="checkbox"] {
    margin-top: 3px;
}

.activity-setting-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.payment-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -10px 0 24px;
}

.delete-modal {
    align-items: center;
    background: rgba(33, 33, 33, .48);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 1100;
}

.delete-modal.is-open {
    display: flex;
}

.delete-modal__dialog {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, .28);
    max-width: 460px;
    padding: 24px;
    width: 100%;
}

.delete-modal__dialog h2 {
    font-family: "Roboto Slab", "Times New Roman", serif;
    font-size: 22px;
    margin: 0 0 10px;
}

.delete-modal__dialog p {
    margin: 0;
}

.detail-list {
    display: grid;
    gap: 12px;
}

.detail-row {
    display: grid;
    gap: 10px;
    grid-template-columns: 200px minmax(0, 1fr);
    min-width: 0;
}

.detail-row strong {
    color: #777;
    font-weight: 500;
}

.collapse-toggle {
    margin-left: auto;
}

.collapse-toggle[aria-expanded="true"] .when-closed,
.collapse-toggle[aria-expanded="false"] .when-open {
    display: none;
}

.collapsible-body {
    padding-top: 4px;
}

.is-hidden {
    display: none !important;
}

.login-panel {
    max-width: 520px;
}

.mt-form {
    margin-top: 14px;
}

.mt-actions {
    margin-top: 18px;
}

.child-row {
    margin-bottom: 14px;
}

.activity-rate-field {
    margin-top: 10px;
}

.mb-actions {
    margin-bottom: 18px;
}

.align-end {
    align-items: end;
}

@media (max-width: 1199px) {
    .grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .content {
        margin-top: 30px;
    }

    .main-panel > .content .container-fluid {
        padding-left: 18px;
        padding-right: 18px;
    }

    .navbar .navbar-brand {
        max-width: calc(100vw - 110px);
    }

    .grid.three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .align-end {
        align-items: start;
    }
}

@media (max-width: 760px) {
    .main-panel > .content .container-fluid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .panel {
        margin-bottom: 20px;
        padding: 18px;
    }

    .panel-heading,
    .total-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid.two,
    .grid.three,
    .grid.four {
        grid-template-columns: 1fr;
    }

    .full {
        grid-column: auto;
    }

    .page-heading h1 {
        font-size: 25px;
    }

    .activity-table {
        min-width: 0;
    }

    .activity-table,
    .activity-table thead,
    .activity-table tbody,
    .activity-table tr,
    .activity-table th,
    .activity-table td {
        display: block;
    }

    .activity-table thead {
        display: none;
    }

    .activity-table tr {
        border: 1px solid #eee;
        border-radius: 6px;
        margin-bottom: 12px;
        padding: 12px;
    }

    .activity-table td {
        border-bottom: 0;
        padding: 8px 0;
    }

    .activity-table td:not(.activity-name-cell) {
        align-items: center;
        display: grid;
        gap: 12px;
        grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
    }

    .activity-table td:not(.activity-name-cell)::before {
        color: #777;
        content: attr(data-cell-label);
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
    }

    .activity-name-cell {
        padding-top: 0;
    }

    .activity-choice-cell {
        min-height: 40px;
    }

    .activity-setting-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .activity-setting-row .badge {
        grid-column: 2;
        justify-self: start;
    }

    .amount-cell {
        min-width: 0;
    }

    .activity-amount {
        max-width: 160px;
    }

    .actions {
        align-items: stretch;
    }

    .actions > .button,
    .actions > a.button,
    .actions > form {
        width: 100%;
    }

    .table-actions {
        min-width: 190px;
    }

    .table-actions,
    .table-actions form {
        align-items: center;
        width: auto;
    }

    .table-actions .button {
        width: auto;
    }

    .detail-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .content {
        margin-top: 20px;
    }

    .main-panel > .content .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-heading {
        margin-bottom: 16px;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .panel {
        border-radius: 4px;
        margin-bottom: 16px;
        padding: 14px;
    }

    .panel-heading {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .panel-heading h2 {
        font-size: 19px;
    }

    .choice-row {
        align-items: stretch;
        flex-direction: column;
    }

    .choice {
        justify-content: flex-start;
        width: 100%;
    }

    .collapse-toggle {
        margin-left: 0;
        width: 100%;
    }

    .total-bar {
        gap: 8px;
        margin-bottom: 16px;
        padding: 14px;
    }

    .total-value {
        font-size: 22px;
    }

    .button {
        width: 100%;
    }

    .button.link,
    .table-actions .button {
        width: auto;
    }

    .delete-modal {
        padding: 12px;
    }

    .delete-modal__dialog {
        padding: 18px;
    }
}
