button {
    border-radius: 0px;
    border: 1px solid #666688;
    background-color: #f0f0ff;
    padding: 4px;
}
button:hover {
    cursor: pointer;
}
input {
    padding: 2px;
}
img {
    vertical-align: middle;
}
input[type="number"] {
    -moz-appearance: textfield;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

* {
    margin: 0px;
    font-size: 20px;
    font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    position: relative;
    min-width: 800px;
    font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif;
    background: #ffffff url("/static/bg.png") repeat fixed 0 0;
    background-size: 550px 607px;
}

* html body {
    height: 100%;
}

#header {
    background: #ffffff;
    padding: 0px 0px 0px 0px;
    margin-bottom: 5px;
}

#content {
    width: 1200px;
    padding-left: 10px;
    padding-bottom: 20px;
    padding-top: 20px;
}

#QuestionTest {
    width: 1020px;
    margin: 0px 5px 0px 5px;
    padding: 0px;
}

#topline {
    position: fixed;
    top: 0px;
    right: 0px;
    float: right;
    font-size: 13px;
    color: #aaaacc;
    margin-right: 10px;
    padding: 0px;
    z-index: 1000;
}

div.subheader2x {
    height: 90px;
    background-color: #f0f0f0;
    border: 1px solid #ccddff;
    clear: both;
}

button.qnum {
    border-radius: 0px;
    cursor: pointer;
    background: #ffffff;
    font-size: 20px;
    color: #003300;
    padding: 2px 3px 2px 3px;
    float: left;
    margin: 4px;
    border: 1px solid #333399;
    text-align: center;
    min-width: 30px;
}

button.qnum:hover {
    background: #f0f0f0;
}

button.qramka {
    margin-top: 2px;
    padding: 1px 3px 1px 3px;
    border: 3px solid;
    border-color: #ff4444;
}

button.yellow {
    background: #ffff88;
}
button.yellow:hover {
    background: #f0f044;
}

.MsoNormal {
    font-size: 20px;
    line-height: 1.35;
    color: #000000;
}

p {
    text-align: justify;
    text-indent: 47px;
    font-size: 20px;
}

p.qq {
    font-size: 20px;
    color: #880000;
    border-left: 4px solid #880000;
    text-align: justify;
    text-indent: 0px;
    padding-left: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.task_text_answer_view {
    color: #2d2d2d;
}

.task_text_answer_title {
    margin-bottom: 8px;
    font-size: 18px;
    color: #6f4d18;
    font-weight: bold;
}

.task_text_answer_body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

div.answer_flex {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background-color: #e0f0f0;
    font-size: 20px;
    color: #000033;
    padding: 10px 8px 10px 15px;
    margin: 5px;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: top;
    cursor: pointer;
    max-width: 1000px;
}

div.answer_flex p {
    margin: 0;
    margin-right: auto;
}

div.answer_flex input {
    margin-left: 6px;
}

div.answer_flex:hover {
    background-color: #eafafa;
    color: #000044;
}

div.answer {
    background-color: #e0f0f0;
    font-size: 20px;
    color: #000033;
    padding: 10px 15px 10px 15px;
    margin: 5px;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: top;
}

.upload_box {
    display: none;
    width: 990px;
    background: #f7f8f8;
    border: 1px solid #d9dddd;
    padding: 10px;
    box-sizing: border-box;
}

.upload_drop {
    min-height: 0;
    border: 1px dashed #d1d4d4;
    background: #fbfbfb;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
    color: #666666;
    padding: 10px 12px;
    box-sizing: border-box;
}

.upload_text_compact {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 6px 0 0;
}

.upload_text_compact.compact {
    margin-bottom: 2px;
}

.upload_textarea {
    flex: 1;
    min-height: 58px;
    max-height: 110px;
    resize: vertical;
    border: 1px solid #b8b8b8;
    padding: 8px 10px;
    font-size: 15px;
    line-height: 1.35;
    color: #333333;
    background: #ffffff;
    box-sizing: border-box;
}

.upload_drop.over {
    background: #ececec;
    border-color: #aaaaaa;
}

.upload_title {
    font-size: 17px;
    color: #3f4d57;
    margin: 0;
}

.upload_user_badge {
    padding: 2px 8px;
    border: 1px solid #d1d8de;
    background: #ffffff;
    color: #34506b;
    font-size: 13px;
    align-self: flex-start;
}

.upload_notice {
    min-height: 18px;
    margin-top: 6px;
    font-size: 13px;
    color: #666666;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.upload_notice.visible {
    opacity: 1;
}

.upload_header_line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.upload_controls_line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload_task_number_input {
    width: 260px;
    max-width: 100%;
    height: 38px;
    border: 1px solid #bfc7cf;
    background: #ffffff;
    color: #263846;
    padding: 6px 10px;
    box-sizing: border-box;
    font-size: 15px;
}

.upload_text_hint {
    margin-top: 6px;
    color: #6f7d87;
    font-size: 13px;
}

.files_panel,
.description_panel {
    display: none;
    width: 990px;
    margin-top: 10px;
}

.file_row {
    border: 1px solid #bbbbcc;
    background: #f6f9f9;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.file_meta {
    flex: 1;
    min-width: 0;
}

.file_title {
    font-size: 16px;
    color: #006600;
    margin-bottom: 4px;
}

.file_name {
    font-size: 20px;
    color: #000033;
    word-break: break-all;
}

.file_date {
    font-size: 12px;
    color: #888888;
    margin-top: 4px;
}

.file_actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.file_actions a,
.file_actions button,
.desc_row button {
    text-decoration: none;
    color: #000000;
    font-size: 18px;
    background: #f0f0ff;
    border: 1px solid #666688;
    padding: 4px 8px;
    border-radius: 0px;
}

.file_actions a:hover,
.file_actions button:hover,
.desc_row button:hover {
    cursor: pointer;
    background: #f7f7ff;
}

.empty_files {
    border: 1px solid #bbbbcc;
    background: #f6f9f9;
    padding: 10px;
    color: #666666;
}

.desc_row {
    border: 1px solid #bbbbcc;
    background: #f6f9f9;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.desc_label {
    min-width: 135px;
    color: #000033;
}

.desc_input {
    flex: 1;
    min-width: 0;
    border: 1px solid #666666;
    background: #ffffff;
    color: #333333;
    font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif;
    font-size: 20px;
}

.flash_ok {
    color: #006600;
    font-size: 16px;
}

.desc_task_text {
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #ccd5d5;
    background: #ffffff;
    color: #222244;
    font-size: 16px;
    line-height: 1.4;
    white-space: pre-wrap;
}

#footer_fake {
    color: #cccccc;
    font-size: 8pt;
}

.clear {
    clear: both;
}

.admin_body {
    min-width: 0;
    background: #eef3f7;
    background-image: linear-gradient(180deg, #f8fbfd 0%, #edf2f6 100%);
}

.admin_mobile_bar {
    display: none;
}

.admin_shell {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    min-height: 100vh;
}

.admin_sidebar {
    background: #f8fafc;
    border-right: 1px solid #d5dde6;
    padding: 20px 16px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
}

.admin_brand {
    margin-bottom: 18px;
}

.admin_title {
    font-size: 30px;
    color: #12324a;
    margin-bottom: 10px;
}

.admin_back {
    font-size: 16px;
    color: #355f88;
    text-decoration: none;
}

.admin_stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.admin_stat {
    border: 1px solid #d8e1eb;
    background: #ffffff;
    padding: 10px;
}

.admin_stat span {
    display: block;
    color: #6d7f92;
    font-size: 14px;
    margin-bottom: 4px;
}

.admin_stat strong {
    color: #15324c;
    font-size: 24px;
}

.admin_filters {
    margin-bottom: 16px;
}

.admin_search_row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

.admin_search {
    width: 100%;
    box-sizing: border-box;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid #c8d4df;
    margin-bottom: 8px;
    font-size: 16px;
    border-radius: 12px;
}

.admin_ghost_btn {
    white-space: nowrap;
    height: 44px;
    padding: 0 14px;
    background: #f6f9fc;
    border: 1px solid #c8d4df;
    color: #31506d;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1;
    align-self: start;
}

.admin_ghost_btn:hover {
    background: #eaf2f9;
}

.admin_filter_row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin_filter_btn {
    flex: 1;
    font-size: 15px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #c8d4df;
    color: #496177;
}

.admin_filter_btn.active {
    background: #204a72;
    border-color: #173a59;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(32, 74, 114, 0.24);
}

.admin_list_meta {
    margin-bottom: 10px;
    color: #5f7488;
    font-size: 14px;
}

.admin_task_list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin_task_item {
    text-align: left;
    background: #ffffff;
    border: 1px solid #d8e1eb;
    padding: 14px;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(24, 56, 92, 0.04);
}

.admin_task_item.active {
    border-color: #5d89b5;
    background: #eaf3ff;
    box-shadow: 0 12px 24px rgba(64, 121, 182, 0.12);
}

.admin_task_item.is-solved .admin_task_state {
    color: #19703d;
}

.admin_task_num {
    display: block;
    color: #12324a;
    font-size: 24px;
    margin-bottom: 4px;
}

.admin_task_name {
    display: block;
    color: #394b5b;
    font-size: 15px;
    margin-bottom: 4px;
    word-break: break-all;
}

.admin_task_state {
    display: block;
    color: #8a5562;
    font-size: 14px;
}

.admin_list_empty {
    border: 1px solid #d8e1eb;
    background: #ffffff;
    padding: 14px;
    color: #607486;
}

.admin_main {
    padding: 22px;
    box-sizing: border-box;
}

.admin_toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    align-items: center;
}

.admin_toolbar_left,
.admin_toolbar_right,
.admin_action_row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin_toolbar_left button,
.admin_toolbar_right button,
.admin_action_row button {
    border-radius: 999px;
    padding: 10px 16px;
}

.admin_empty {
    border: 1px dashed #bfcddb;
    background: #ffffff;
    padding: 24px;
    color: #607486;
}

.admin_editor {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin_heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.admin_heading_kicker {
    font-size: 14px;
    color: #667b8e;
    margin-bottom: 4px;
}

.admin_heading h1 {
    font-size: 42px;
    color: #0f2d46;
}

.admin_heading_user {
    display: none;
}

.admin_heading_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.admin_tag {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d0dcea;
    background: #f7fafc;
    color: #5a7288;
    font-size: 14px;
}

.admin_tag.is-active {
    border-color: #b8d7c0;
    background: #eefbf2;
    color: #1f6e3f;
}

.admin_heading_meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: #5d7185;
    font-size: 15px;
}

.admin_status_chip {
    background: #fff0f0;
    color: #8b4951;
    border: 1px solid #efc9cf;
    padding: 6px 10px;
    font-size: 14px;
}

.admin_status_chip.is-solved {
    background: #ebfff2;
    color: #1d7440;
    border-color: #b8dfc4;
}

.admin_grid {
    display: grid;
    grid-template-columns: minmax(300px, 520px) minmax(0, 1fr);
    gap: 18px;
}

.admin_card {
    background: #ffffff;
    border: 1px solid #d8e1eb;
    padding: 18px;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(21, 50, 76, 0.05);
}

.admin_card_title {
    font-size: 22px;
    color: #163550;
    margin-bottom: 12px;
}

.admin_preview_wrap {
    min-height: 280px;
    background: #f4f8fb;
    border: 1px solid #dbe4ec;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.admin_preview_image {
    max-width: 100%;
    max-height: 560px;
    display: block;
}

.admin_preview_empty {
    color: #6b7e90;
    font-size: 16px;
    line-height: 1.4;
}

.admin_file_meta {
    margin-top: 12px;
}

.admin_file_actions {
    margin-top: 10px;
}

.admin_file_actions a {
    font-size: 16px;
    color: #315f8f;
    text-decoration: none;
}

.admin_textarea {
    width: 100%;
    min-height: 140px;
    border: 1px solid #c8d4df;
    padding: 12px;
    box-sizing: border-box;
    resize: vertical;
    font-size: 17px;
    line-height: 1.45;
    border-radius: 14px;
}

.admin_textarea_large {
    min-height: 360px;
}

.admin_task_text_view {
    min-height: 360px;
    border: 1px solid #d9e2eb;
    background: #f7fafc;
    border-radius: 14px;
    padding: 14px 16px;
    box-sizing: border-box;
    color: #24394d;
    font-size: 17px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin_task_text_view.is-empty {
    color: #6d8193;
}

.admin_danger {
    background: #fff0f1;
    border-color: #cc7d87;
}

.admin_flash {
    min-height: 22px;
    color: #1f6c3f;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.admin_flash.visible {
    opacity: 1;
}

.admin_flash.is-error {
    color: #a13f4f;
}

@media (max-width: 1100px) {
    .admin_shell {
        grid-template-columns: 1fr;
    }

    .admin_sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid #d5dde6;
    }

    .admin_grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .admin_body {
        padding-top: 70px;
    }

    .admin_mobile_bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 30;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        padding: 10px 12px;
        background: rgba(244, 248, 251, 0.96);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid #d7e0e8;
        box-sizing: border-box;
    }

    .admin_mobile_btn {
        padding: 10px 8px;
        font-size: 14px;
        border-radius: 999px;
        background: #ffffff;
    }

    .admin_mobile_btn.active {
        background: #dcecff;
        border-color: #6d97c0;
    }

    .admin_shell {
        min-height: auto;
    }

    .admin_sidebar,
    .admin_main {
        padding: 14px 12px;
    }

    .admin_sidebar {
        border-bottom: 0;
    }

    .admin_stats {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .admin_stat {
        padding: 10px 8px;
    }

    .admin_stat strong {
        font-size: 20px;
    }

    .admin_search_row {
        grid-template-columns: 1fr;
    }

    .admin_filter_row {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .admin_toolbar_left,
    .admin_toolbar_right,
    .admin_action_row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin_heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin_heading h1 {
        font-size: 34px;
    }

    .admin_card {
        padding: 14px;
        border-radius: 14px;
    }

    .admin_preview_wrap {
        min-height: 220px;
    }

    .admin_textarea,
    .admin_textarea_large,
    .admin_task_text_view {
        min-height: 180px;
        font-size: 16px;
    }

    .admin_mobile_list .admin_main {
        display: none;
    }

    .admin_mobile_editor .admin_sidebar {
        display: none;
    }
}
