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

html {
    height: 100%;
}
body {
    min-height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
}

a {
    color: #111;
    text-decoration: none;
}
p {
    margin-bottom: 1rem;
}
h1, h2, h3, h4, h5, h6 {
    margin-top: 1em;
    margin-bottom: .5em;
}

ul, ol {
    padding-left: 1.5rem;
}
[dir="rtl"] ul,
[dir="rtl"] ol {
    padding-right: 1.5rem;
    padding-left: 0;
}

table {
    border-spacing: .5rem .25rem;
}
th {
    text-align: start;
}
th, td {
    padding: .5rem 1rem;
}
th, td {
    border-bottom: 1px solid #ccc;
}
tr:last-child th, tr:last-child td {
    border-bottom: none;
}
thead tr:last-child th {
    border-bottom: 1px solid #111;
}
tfoot tr:first-child td {
    border-top: 1px solid #111;
}

table.condensed {
    border-collapse: collapse;
    border-spacing: 0;
}
table.condensed th,
table.condensed td {
    padding: .25rem .5rem;
}
table.condensed tbody tr:nth-child(2n) {
    background-color: #eee;
}

.scrollable-table {
    width: 100%;
    overflow-x: auto;
    position: relative;
}

.fixed-first-col tr th:first-child,
.fixed-first-col tr td:first-child {
    position: sticky;
    left: -1px;
    background: white;
}
[dir="rtl"] .fixed-first-col tr th:first-child,
[dir="rtl"] .fixed-first-col tr td:first-child {
    right: -1px;
    left: auto;
}

.fixed-last-col tr th:last-child,
.fixed-last-col tr td:last-child {
    position: sticky;
    right: -1px;
    background: white;
}
[dir="rtl"] .fixed-last-col tr th:last-child,
[dir="rtl"] .fixed-last-col tr td:last-child {
    left: -1px;
    right: auto;
}

.full-width {
    width: 100%;
}


.input-group {
    border: none;
    margin-bottom: .5rem;
}
.input-group:last-of-type {
    margin-bottom: 1rem;
}
.form-actions {
    margin-top: 1.5rem;
}

input, textarea, select, button, .btn {
    font-family: inherit;
    font-size: 100%;
    border-radius: .25rem;
    background-color: transparent;
    border: 2px solid #666;
}
input[type="file"] {
    border: none;
}
input, textarea, select {
    padding: .25em .5em;
    background-color: white;
}
input:disabled, textarea:disabled, select:disabled,
input:read-only:not(input[type="file"]), textarea:read-only {
    color: #888;
    border-color: #888;
    opacity: .7;
}
input:focus, textarea:focus, select:focus {
    border-color: #111;
}
button, input[type="button"], .btn {
    padding: .25em 1em;
    cursor: pointer;
    border-color: #111;
}
.btn {
    display: inline-block;
}

button:disabled, .btn.disabled {
    color: #888;
    border-color: #888;
    opacity: .7;
    cursor: default;
}

button.primary, input[type="button"].primary, .btn.primary {
    background-color: #111;
    color: #fff;
}
button.secondary, input[type="button"].secondary, .btn.secondary {
    background-color: #ccc;
    border-color: #ccc;
    color: #111;
}

button.error, input[type="button"].error, .btn.error {
    background-color: red;
    border-color: red;
    color: white;
}
button.success, input[type="button"].success, .btn.success {
    background-color: green;
    border-color: green;
    color: white;
}

button.small, input[type="button"].small, .btn.small {
    padding: .15em .5em;
}

button.icon, .btn.icon {
    border: none;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
}

label > input
{
    margin-top: .5rem;
}

.input-group small {
    color: #888;
}

.link {
    border-bottom: 2px solid #111;
}

.dimmed {
    color: #888;
}

.error {
    color: red;
}
.success {
    color: green;
}
.warning {
    color: orange;
}

.input-error {
    color: red;
    font-size: smaller;
    margin-bottom: .5rem;
}
.input-error ul {
    list-style: none;
    padding: 0;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem;
}
@media (min-width: 640px)  { .container { max-width: 640px;  } }
@media (min-width: 768px)  { .container { max-width: 768px;  } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }
@media (min-width: 1536px) { .container { max-width: 1536px; } }

aside {
    padding: 1rem;
    background-color: #eee;
    border-radius: .5rem;
    min-width: 200px;
}
.nav-vertical {
    flex-direction: column;
    align-items: flex-start;
    row-gap: .5rem;
}

.split-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    column-gap: 2rem;
}
.split-content {
    flex-grow: 1;
}

.alerts-container {
    display: flex;
    flex-direction: column;
    row-gap: .5rem;
    margin-bottom: 1rem;
}
.alert {
    padding: 0.75rem 1rem;
    background-color: #eee;
    font-size: smaller;
    border-radius: .25rem;
}
span.alert {
    display: inline-block;
}
.alert.error {
    background-color: lightpink;
}
.alert.success {
    background-color: lightgreen;
}
.alert.warning {
    background-color: #ffeecc;
}

.tag {
    padding: .25rem .5rem;
    background-color: #eee;
    font-size: smaller;
    border-radius: .25rem;
}

.tag.error {
    background-color: lightpink;
}
.tag.success {
    background-color: lightgreen;
}
.tag.warning {
    background-color: #ffeecc;
}

.tag .indicator {
    display: inline-block;
    width: .75em;
    height: .75em;
    background-color: black;
    border-radius: 50%;
    margin-inline-end: .5rem;
}

.tag.error .indicator {
    background-color: red;
}
.tag.success .indicator {
    background-color: green;
}
.tag.warning .indicator {
    background-color: orange;
}

.logo-group {
    display: flex;
    column-gap: .5rem;
    align-items: center;
}
.logo {
    display: block;
    height: 1.5rem;
}
.logo > img {
    height: 100%;
}

.title {
    margin-top: .4em;
}

.phone-number {
    unicode-bidi: embed;
    direction: ltr;
}

.phone-number-input {
    display: inline-block;
    direction: ltr;
}


/* BREADCRUMB */
.breadcrumb {
    font-size: .875rem;
    display: flex;
    column-gap: 0.5rem;
    color: #888;
}
.breadcrumb .link {
    border-bottom-width: 1px;
}

/* HEADER */
header {
    padding: 1rem 0;
    border-bottom: 1px solid #888;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-content {
    display: flex;
    align-items: center;
    column-gap: 2rem;
}

.demo {
    background: red;
    color: white;
    font-weight: 700;
    font-size: .75rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: .25rem .75em;
    border-radius: .25rem;
}

.nav {
    flex-grow: 1;
    display: flex;
    column-gap: 1rem;
}
.nav .item {
    line-height: 1.5rem;
    text-decoration: none;
    color: #111;
    border-bottom: 2px solid transparent;
}
.nav .item.active {
    border-bottom-color: #111;
}

.account-access {
    display: flex;
    column-gap: .5rem;
    border-left: 1px solid #888;
    padding-left: 1rem;
}
[dir="rtl"] .account-access {
    border-left: none;
    padding-left: 0;
    border-right: 1px solid #888;
    padding-right: 1rem;
}

/* CONTENT */
main {
    flex-grow: 1;
    padding: 2rem 0 3rem 0;
}

.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 1rem;
}
.sub-header > h1,
.sub-header > h2 {
    margin: 0;
}
.sub-header > .title {
    margin-top: .4em;
}

.actions-group {
    display: flex;
    align-items: start;
    column-gap: .5rem;
}

.category-indent {
    padding-left: 1rem;
}
[dir="rtl"] .category-indent {
    padding-right: 1rem;
    padding-left: 0;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    column-gap: 1rem;
    padding: 1rem 0;
}
.pagination .link {
    padding: .25rem .5rem;
}
.pagination .link.active {
    background-color: #eee;
}
.pagination .link.disabled {
    color: #888;
    border-bottom-color: transparent;
}

/* FILTERS */
.filters {
    display: flex;
    align-items: end;
    column-gap: 1rem;
    justify-content: space-between;
    background-color: #eee;
    padding: .5rem 1rem;
    border-radius: .5rem;
}

.filters-container {
    display: flex;
    align-items: start;
    column-gap: 1rem;
    flex-wrap: wrap;
}

.filters-separator {
    flex-basis: 100%;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: end;
}

.filter-switch-label {
    display: inline;
    padding: 0 .5rem;
    cursor: pointer;
}
.filter-switch-label .filter-indicator {
    color: orange;
    font-size: 1.5rem;
    line-height: 1rem;
}

.filter-switch {
    display: none;
}
.filter-switch:not(:checked) + .filters {
    display: none;
}

/* FOOTER */
footer {
    padding: 1rem 0;
    border-top: 1px solid #888;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    column-gap: 2rem;
    font-size: .8rem;
}

footer .logo {
    height: 1rem;
}
footer .copyright {
    margin-bottom: 0;
}

/* PROFILE */
.profile-header {
    display: flex;
    align-items: center;
    column-gap: 2rem;
}

.profile-picture-group {
    display: flex;
    align-items: center;
    column-gap: 1rem;
}
.profile-picture {
    height: 4rem;
    width: 4rem;
    background-color: #eee;
    border-radius: 50%;
    overflow: hidden;
}
.profile-picture-group .profile-picture {
    flex-shrink: 0;
}

.profile-picture-group.small .profile-picture,
.profile-picture.small {
    height: 1.2rem;
    width: 1.2rem;
}

.profile-picture > img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.profile-picture-edit {
    display: flex;
    column-gap: 2rem;
}


/* PERMISSIONS */
.inherited-permission-value {
    color: #888;
}


/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 9999;
    display: none;
    background-color: rgba(0, 0, 0, .25);
}
.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    min-width: 400px;
    background-color: white;
    padding: 1.5rem 2rem;
    border-radius: .5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    column-gap: 1rem;
    margin-bottom: 1rem;
}
.modal-header h1 {
    margin-top: 0;
    margin-bottom: 0;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: end;
    column-gap: .5rem;
}
