/** common styles **/

* {
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
}

input,
select,
textarea {
    font-size: 1em;
    padding: 0.3em 0.5em;
}

select,
option,
button,
input[type="button"i],
input[type="submit"i],
input[type="reset"i],
input[type="file"i]::-webkit-file-upload-button {
    cursor: pointer;
}

body {
    font-size: 1em;
    line-height: 1em;
}


a {
    color: #404040;
}

label {
    cursor: pointer;
}

.float_left {
    float: left;
}

.nosee {
    visibility: hidden;
}

.noshow {
    display: none;
}

.v {
    background: #eee;
}

.fsize12 {
    font-size: 0.9em;
}

.clear {
    clear: both;
}

input.input_cb {
    border: none;
}

input.price:before {
    content: "\f157";
}

input.price {
    text-align: center;
    color: dodgerblue;
}

.change_btn {
    cursor: pointer;
}

#loading {
    position: fixed;
    top: 23px;
    right: 0;
    display: ;
    background: #ccc;
    padding: 2px 8px;
    z-index: 99;
}

hr {
    border-top: 1px solid #f3f3f3;
}

.flex_outline {
    display: flex;
}

.flex_outline>* {
    width: 44%;
}

/** nav styles **/

ul#nav {
    list-style-type: none;
    padding-left: 2em;
}

ul#nav li {
    padding: .5em .5em;
    margin: .1em .1em 0;
    text-align: center;
    float: left;
    cursor: pointer;
    border-radius: .25em .25em 0 0;
}

ul#nav liaside>dl_on {
    background-color: #ccc;
}

ul#nav li.onselected {
    background-color: white !important;
    color: dodgerblue;
    font-weight: bold;
    border-radius: .25em .25em 0 0;
}

ul#nav li.onhovered {
    background-color: #f3f3f3;
}


/** main contents styles **/

aside {
    flex: 0 0 16em;
}

aside>dl a {
    text-decoration: none;
}

aside>dl dt,
aside>dl dd {
    margin: 0 5px;
}

aside>dl dt {
    cursor: pointer;
    text-align: center;
    padding: .5em 0;
    margin-top: .3em;
    background: #eee;
    color: #666;
    border-radius: .25em .25em 0 0
}

aside>dl dd {
    background: #fafafa;
    border: 1px solid #eee;
    border-top: none;
    text-align: center;
    padding: .8em 0;
}

#money_month_selector input,
#report_month_selector input {
    text-align: center;
}

#money_month_selector .fa-calendar {
    position: absolute;
    top: .5em;
}

#money_month_selector input {
    padding: .2em 0em .2em 1.2em;
    background: transparent;
    border: none;
    width: 5.3em;
}

#report_fliters a {
    line-height: 2em;
    padding: .4em .9em .4em 0;
}

#report_fliters a.selected {
    color: dodgerblue;
}

#report_fliters a.selected {
    color: dodgerblue;
}


.op_tool,
.op_tool li {
    margin: .5em 0;
    padding: 0 0 0 0px;
    list-style: none;
    text-align: center;
}

.amount {
    display: flex;
    flex-direction: row;
    background: #eee;
    border: 1px solid #eee;
    text-align: center;
    padding: .3em 0;
    margin-top: .3em;
    border-radius: .25em .25em 0 0;
}

.amount li {
    line-height: 2em;
    padding: 0;
    margin: 0;
    list-style: none;
}

.amount li:first-child {
    flex-basis: 50%;
    text-align: left;
    padding-left: .75em;
}

.amount li:last-child {
    flex-basis: 50%;
    text-align: right;
    padding-right: .75em;
    position: relative;
}

.amount #month_total {
    margin-right: .5em;
}

.amount .fa-calendar-check {
    color: dodgerblue;
}

.amount #selected_total {
    color: dodgerblue;
}

.type_sec li {
    font-size: 0.9em;
    text-align: left;
    padding: .4em 1em;
    list-style: none;
}

.type_sec a:hover {
    color: dodgerblue;
}

.type_sec a.selected {
    background: 000;
    color: white;
}

.type_sec li a {
    text-decoration: none;
}

.type_sec p {
    text-align: left;
    padding-top: 1em;
    padding: .5em 1.5em;
}

#selected_qd li {
    font-size: .8em;
}

dd#report_year_selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

dd#report_year_selector span {
    line-height: 2em;
    padding: .4em .9em;
}

dd#report_year_selector span.selected a {
    color: dodgerblue;
}

/* table styles */

table.table_list {
    border: 1px solid #eee;
    background: #f8f8f8;
    border-bottom: 0;
    width: 100%;
}

table.table_list th,
table.table_list td {
    padding: .3em .3em;
}

table.month_report_list {
    margin-top: 5px;
    border: none;
    background: #fff;
}

table.month_report_list thead {
    background-color: #eee;
}

table.month_report_list tbody th {
    border-left: 1px solid #eee;
}

table.month_report_list tbody td:last-child {
    border-right: 1px solid #eee;
}

table.month_report_list thead th:first-child {
    border-radius: .25em 0 0 0;
}

table.month_report_list thead th:last-child {
    border-radius: 0 .25em 0 0;
}

table.month_report_list td {
    padding: .3em .3em;
    line-height: 1.6em;
}

table.month_report_list tbody tr:last-child th,
table.month_report_list tbody tr:last-child td {
    border-bottom: 1px solid #ddd;
}

table.money_list tr.sel td:last-child {
    background: none;
}

table.table_list td.price {
    text-align: right;
    padding: 0 .3em;
}

table.table_list td.description {
    white-space: nowrap;
    font-size: clamp(12px, 2vw, 14px);
}

table.table_list td:last-child {
    padding: 0 .3em;
}

table.table_list caption {
    display: none;
}

table.table_list thead {
    color: #666;
}

table.table_list thead th {
    height: 2em;
    color: #666;
}

#type_summary_list tbody tr:hover {
    background: #e3f4ff;
}

tr.sel th,
tr.sel td {
    background: #e3f4ff !important;
}

tr.sel td.nosel:last-child {
    background: transparent !important;
}

.nosel {
    width: 3em;
    text-align: right;
    border-left: 1px solid #dedede;
}

tr.even {
    background: white;
}

tr.odd {
    background: #FAFAFA;
}

/** form styles **/

.add_form>div {
    margin-bottom: .5em;
}

.add_form a {
    text-decoration: none;
    padding: .2em .5em;
    margin-left: .1em;
    margin-bottom: .2em;
    border-radius: .25em;
}

.add_form #add_date {
    text-align: center;
}

#data_input_td a,
#add_description_suggest a,
#add_price_suggest a {
    text-decoration: none;
    background: #fafafa;
    padding: .5em;
    margin-right: .5em;
    margin-bottom: .5em;
}

#add_description_suggest a,
#add_price_suggest a {}

#add_description_suggest a {
    padding: 4px 6px;
    border: 1px solid #eee;
}

#add_price_suggest a {
    padding: 4px 10px;
    border: 1px solid #eee;
}

#add_description_suggest {
    background: #fafafa;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#add_price_keyboard {
    background: #fafafa;
}

#add_price_suggest {
    width: 12em;
    margin: .5em auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#data_input_td a:hover,
#add_description_suggest a:hover,
#add_price_suggest a:hover {
    background: #e3f4ff;
}

#userInfo {
    position: absolute;
    top: 3px;
    right: 8px;
    padding: 5px;
    text-align: right;
}

/* login & regs form */


#login_form,
#reg_form {
    margin: 1em 2em;
}

#login_form p,
#reg_form p {
    margin-top: .5em;
}



/* New Flex layout */

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

nav {
    margin: 0;
    background-color: #eee;
    width: 100%;
}

#out-round {
    display: flex;
    flex: 0 0 auto;
    overflow: auto;
}

main {
    flex: 0 0 28em;
}

aside#addbar {
    flex: 0 0 16em;
}

aside#sidebar {
    flex: 0 0 14em;
}

footer {
    color: #555;
    text-align: right;
    background: #f3f3f3;
    font-style: italic;
    margin-top: 5px;
    padding: 0.5em;
}

nav,
footer {
    flex: 0 0 20px;
}

.fliter_list li {
    list-style: none;
    text-align: left;
    padding: 2% 0 2% 5%;
    border-bottom: 1px solid #eee;
}

.fliter_list li:last-child {
    border-bottom: none;
}

#selected_type form div,
#selected_qd form div {
    margin-top: 5%;
}

#selected_type ul,
#selected_qd ul {
    margin-bottom: 5%;
}

#selected_type form div,
#selected_qd form div,
#selected_type ul li>a {
    display: flex;
    flex-wrap: wrap;
}

#search_form input[type=date] {
    width: 92%;
    margin-bottom: 2%;
}

#selected_type form div>*,
#selected_qd form div>*,
#selected_type ul li>a>span {
    width: 45%;
    display: inline-block;
}

#selected_type form div>*,
#selected_qd form div>* {
    margin: 2.5%;
}

#selected_type ul li>a>span:last-child {
    font-size: .9em;
}

#search_form div>* {
    width: 45%;
}

@media screen and (max-width: 760px) {

    #type_summary_list {
        font-size: 0.8em;
    }

    #selected_type li {
        font-size: .8em;
    }

    aside {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row-reverse;
        flex-wrap: wrap;
    }

    aside>dl {
        flex-basis: 50%;
        flex-shrink: inherit;
    }

    #add_price_suggest {
        width: 11em;
    }
    input, select, textarea {
        font-size: 1em;
        padding: 0.2em 0.2em;
    }

    #selected_type ul li>a>span:last-child {
        font-size: .8em;
    }

    main {
        flex: 0 0 auto;
    }

    #out-round {
        flex-direction: column;
    }

    #userInfo {
        flex: 0 0 20px;
        position: inherit;
        background: #f3f3f3;
        padding: 0.5em 0;
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        margin-top: 5px;
        color: #999;
    }

    #userInfo a {
        color: #333;
    }

    #loading {
        position: fixed;
        top: 2px;
        right: 2px;
    }

    dt,
    table,
    .amount {
        border-radius: 0 !important;
    }

    aside>dl dt,
    aside>dl dd {
        margin-right: 0;
        margin-left: 0;
    }

    footer {
        text-align: center;
        font-size: 0.8em;
        background: white;
        padding: 0;
        color: #bbb;
    }

    footer a {
        color: #bbb;
    }

}

@media screen and (max-width: 321px) {

    #selected_type li {
        font-size: .9em;
    }

    aside#addbar {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
    }

    aside#addbar dl {
        flex-shrink: initial;
    }

    #selected_type {
        display: none;
    }

    .amount,
    .money_list th,
    .money_list td {
        font-size: .8em;
    }

}
