* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #e7fbf9;
    color: #123835;
    font: 14px/1.4 Verdana, Helvetica, sans-serif;
}

a {
    color: #0f6f69;
}

.wrap {
    width: 1200px;
    margin: 24px auto;
    background: #ffffff;
    border: 1px solid #7dcec8;
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 20px;
    background: #97FFF8;
}

.top h1 {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
}

.top h1 a {
    color: #123835;
    text-decoration: none;
}

.account {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
}

.layout {
    display: flex;
    min-height: 460px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    width: 200px;
    flex: 0 0 200px;
    padding: 16px;
    background: #d4faf6;
    border-right: 1px solid #b7efe9;
}

.menu {
    flex: 1;
}

.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu a {
    display: block;
    padding: 8px 10px;
    color: #123835;
    text-decoration: none;
}

.menu a:hover,
.menu a.current {
    background: #97FFF8;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 16px;
}

.page-head h2 {
    margin: 0;
    font-size: 20px;
}

.filter {
    margin: 0 0 20px;
}

.filter-row,
.filter-flags,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

.filter-flags {
    margin-top: 12px;
}

.filter-actions {
    margin-top: 14px;
}

.filter label {
    margin: 0;
    white-space: nowrap;
}

.filter-flags label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter input[type="date"],
.filter input[type="text"],
.filter select {
    padding: 6px 8px;
    border: 1px solid #8ecfc9;
    font: inherit;
    color: #123835;
    background: #ffffff;
}

.filter input[type="checkbox"] {
    margin: 0;
}

.news-table {
    width: 100%;
    border-collapse: collapse;
}

.news-table th,
.news-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #d4faf6;
    text-align: left;
    vertical-align: top;
}

.news-table th {
    background: #e7fbf9;
}

.news-date {
    white-space: nowrap;
}

.news-yes {
    color: #1b8a3e;
    font-weight: bold;
}

.news-actions-col {
    width: 120px;
}

.news-actions {
    white-space: nowrap;
    text-align: right;
}

.news-sort {
    text-align: center;
    white-space: nowrap;
}

a.icon-btn {
    text-decoration: none;
}

.icon-btn-publish,
button.icon-btn-publish {
    color: #1b8a3e;
}

.pager {
    margin-top: 16px;
}

.pager a,
.pager span {
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 4px 8px;
    border: 1px solid #8ecfc9;
    color: #123835;
    text-decoration: none;
}

.pager .current {
    background: #97FFF8;
}

.content {
    flex: 1;
    padding: 20px 24px;
}

.login-box {
    width: 320px;
    margin: 48px auto 64px;
}

.login-box h2 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: bold;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    margin-bottom: 4px;
}

.field input,
.field textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #8ecfc9;
    font: inherit;
    color: #123835;
    background: #ffffff;
}

.field input[type="file"] + label {
    margin-top: 10px;
}

.field input[type="date"] {
    width: 180px;
}

.field input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
}

.checks label {
    margin-right: 18px;
}

.editors-list {
    max-height: 280px;
    overflow-y: auto;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid #8ecfc9;
    background: #ffffff;
}

.field .editors-list label {
    margin: 0;
    padding: 2px 0;
}

.field .editors-list label[hidden] {
    display: none;
}

.editors-login {
    color: #3e6f6b;
    font-size: 12px;
}

.slug-line {
    margin: -8px 0 14px;
    color: #3e6f6b;
    font-size: 12px;
}

.fio {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: bold;
}

.notice {
    margin: 0 0 14px;
    color: #0f6f69;
}

.teacher-photo-preview {
    display: block;
    width: 160px;
    height: auto;
    margin: 0 0 8px;
}

.edit-columns,
.edit-row {
    display: flex;
    gap: 8px;
}

.edit-columns {
    margin-bottom: 4px;
    color: #3e6f6b;
    font-size: 12px;
}

.edit-columns span,
.edit-row input,
.edit-row textarea {
    flex: 1;
    width: auto;
    min-width: 0;
}

.edit-row {
    margin-bottom: 8px;
}

.edit-row input,
.edit-row textarea,
.list-row {
    padding: 6px 8px;
    border: 1px solid #8ecfc9;
    font: inherit;
    color: #123835;
    background: #ffffff;
}

.list-row {
    display: block;
    width: 100%;
    margin-bottom: 8px;
}

.field button[type="button"] {
    margin-bottom: 4px;
}

.error {
    margin: 0 0 14px;
    color: #9d1c1c;
}

.btn,
button {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #0f6f69;
    background: #97FFF8;
    color: #123835;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover,
button:hover {
    background: #c9fff8;
}

.btn-save,
button.btn-save {
    margin-top: 8px;
    padding: 10px 28px;
    border-color: #0a5752;
    background: #0f6f69;
    color: #ffffff;
    font-weight: bold;
}

.btn-save:hover,
button.btn-save:hover {
    background: #0a5752;
    color: #ffffff;
}

.logout {
    margin: 0;
}

.gallery {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #b7efe9;
}

.gallery h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.gallery-drop {
    padding: 14px;
    border: 2px dashed #8ecfc9;
}

.gallery-drop-over {
    border-color: #0f6f69;
    background: #e7fbf9;
}

.gallery-hint {
    margin-left: 10px;
    color: #3e6f6b;
    font-size: 12px;
}

p.gallery-hint {
    margin: 0;
}

.gallery-drop .notice,
.gallery-drop .error {
    margin: 10px 0 0;
    white-space: pre-line;
}

.gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.gallery-list li {
    position: relative;
}

.gallery-list img {
    display: block;
    width: auto;
    height: 120px;
}

.gallery-list .icon-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    margin: 0;
}

.users-actions-col {
    width: 124px;
}

.users-actions {
    white-space: nowrap;
    text-align: right;
}

.users-table td.users-password {
    width: 160px;
    letter-spacing: 1px;
    color: #3e6f6b;
}

.users-fio-edit {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.users-table input[type="text"],
.users-table input[type="password"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #8ecfc9;
    font: inherit;
    color: #123835;
    background: #ffffff;
}

.icon-btn,
button.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 4px;
    padding: 0;
    border: 1px solid #8ecfc9;
    background: #e7fbf9;
    color: #0f6f69;
    vertical-align: middle;
}

.icon-btn:hover,
button.icon-btn:hover {
    background: #97FFF8;
}

.icon-btn-danger,
button.icon-btn-danger {
    color: #9d1c1c;
}

.icon-btn-save,
button.icon-btn-save {
    border-color: #0a5752;
    background: #0f6f69;
    color: #ffffff;
}

.icon-btn-save:hover,
button.icon-btn-save:hover {
    background: #0a5752;
    color: #ffffff;
}

.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 56, 53, 0.45);
}

.modal-box {
    position: relative;
    width: 420px;
    margin: 80px auto 0;
    padding: 20px 24px;
    border: 1px solid #7dcec8;
    background: #ffffff;
}

.modal-box h3 {
    margin: 0 0 16px;
    font-size: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.modal-actions .btn-save,
.modal-actions button.btn-save {
    margin-top: 0;
}

body.modal-open {
    overflow: hidden;
}

.footer {
    padding: 10px 20px;
    border-top: 1px solid #b7efe9;
    background: #d9fbf7;
    color: #3e6f6b;
    font-size: 12px;
}
