body {
    touch-action: pan-y;
    padding: 80px 0;
    color: #444;
    font-size: 14px;
    font-family: sans-serif;
    font-weight: 200;
    font-style: normal;
    line-height: 1;
    position: relative;
    background-color: #f0f0f0;
}

/* ヘッダ */

header {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    border-bottom: 1px solid #e8e8e8;
    background-color: #fff;
    padding: 1rem 2rem;
    z-index: 100;
    height: 70px;
}

nav ul {
    display: flex;
    align-items: center;
}

nav li {
    padding-right: 30px;
}

nav a {
    color: #444;
    text-decoration: none;
    font-size: 10px;
    position: relative;
    text-align: center;
}

nav a:hover {
    top: 1px;
    left: 1px;
}

nav li:not(:first-child)>a>span {
    display: block;
    margin-top: 2px;
}

nav img {
    height: 24px;
    vertical-align: -30%;
    margin-right: 2px;
}

#nav_top a {
    font-size: 24px;
    letter-spacing: .1em;
    font-weight: 200;
}

#logo_image {
    height: 30px;
    vertical-align: -25%;
    margin-right: 10px;
}

/* コモン */

table .material-icons {
    font-size: 20px !important;
}

section {
    margin-bottom: 10px;
    background-color: #fff;
    padding: 15px;
    overflow: hidden;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

a {
    color: #d9350a;
    position: relative;
}

a:hover {
    top: 1px;
    left: 1px;
    box-shadow: inherit !important;
}

button {
    border: 2px solid #d9350a;
    border-radius: 10px;
    background-color: #fff;
    padding: 5px 10px;
    color: #d9350a;
    cursor: pointer !important;
}

h2 {
    font-size: 16px;
    border-bottom: 3px double #e8e8e8;
    padding: 0 .2rem .5rem .2rem;
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: .3em;
    position: relative;
}

h2 img {
    height: 24px;
    vertical-align: -30%;
    margin-right: 6px;
}

h2 a {
    display: block;
    position: absolute;
    right: 0;
    bottom: 3px;
    font-family: inherit;
    padding: 5px 10px;
    background-color: #fff;
    color: #d9350a;
    border: solid 2px #d9350a;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1.2rem;
    letter-spacing: .1rem;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

h2 a i {
    font-size: 1.4rem !important;
    vertical-align: -20%;
    margin-right: 5px;
}

h2 a:hover {
    top: auto !important;
    left: auto !important;
    right: -1px;
    bottom: 2px;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid #ccc;
    margin-bottom: 1rem;
}

table th,
table td {
    padding: 10px 20px;
    border-right: 1px solid #ccc;
    font-size: .8rem !important;
}

th {
    background-color: #eee;
    border-bottom: 3px double #ccc;
}

table tr:nth-child(odd) td {
    background-color: #f8f8f8;
}

p {
    margin-bottom: 2em;
}

.requied {
    color: #f00;
    font-size: .6em;
    margin-left: 5px;
}

.button {
    border: 1px solid #ccc;
    padding: 10px 30px;
    border-radius: 5px;
}

.error {
    color: #f00;
    margin-bottom: 1em;
}

em {
    font-weight: bold;
}

.buttons a {
    padding: 10px 20px;
    background-color: #fff;
    color: #d9350a;
    border: solid 2px #d9350a;
    text-decoration: none;
    border-radius: 10px;
    display: inline-block;
    margin-right: 20px;
    font-size: 1.2rem;
    letter-spacing: .1rem;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

.buttons a em {
    font-size: 1.4rem;
    font-style: normal;
}

.buttons .material-icons {
    vertical-align: -20%;
    margin-right: 5px;
}

input[type="submit"] {
    background: #fff;
    border: 2px solid #d9350a;
    color: #d9350a;
}

/* ページャ */

.pager {
    margin-bottom: 1rem;
    text-align: center;
}

.pager a,
.pager span {
    margin: 0 5px;
    display: inline-block;
    text-decoration: none;
}

.pager .now {
    border: 1px solid #e8e8e8;
    width: 7rem;
    text-align: center;
    margin: 0 10px;
    padding: 5px;
    border-radius: 5px;
}

/* ダッシュボード*/

#roast_between {
    display: flex;
    margin-bottom: 3rem;
}

#roast_between li {
    margin-right: 20px;
}

.table_container {
    width: 100%;
    overflow-x: scroll;
}

#roast_table th {
    background-color: initial;
    border-bottom: 1px dotted #ccc;
}

#roast_table td {
    text-align: center;
}

#roast_table th:nth-child(odd),
#roast_table td:nth-child(odd) {
    background-color: #f8f8f8;
}

#roastChart {
    margin-bottom: 2rem;
}

#remainChartContainerSP {
    display: none;
}

#remainForecastTable {
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 0;
}

#remainForecastTable th {
    text-align: center;
    white-space: nowrap;
}

#remainForecastTable td {
    white-space: nowrap;
}

#remainForecastTable td.num {
    text-align: right;
}

#remainForecastTable td.center {
    text-align: center;
}

#remainForecastTable tr.remain-warn td {
    color: #d9350a;
    font-weight: bold;
}

[v-cloak] {
    display: none;
}

/* ダッシュボード店頭在庫 */

#dashboardStockList {
    display: block;
}

#dashboardStockList .bean-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #e8e8e8;
}

#dashboardStockList .bean-info {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 5px;
    width: 30%;
}

.dashboardStockFlag {
    width: 20px;
    height: 20px;
    flex: none;
    display: inline-block;
    background-position: center;
    background-size: cover;
    border-radius: 10mm;
    border: 1px solid #888;
    box-sizing: border-box;
}

.dashboardStockCountry {
    font-size: 11px;
}

#dashboardStockList .bean-label {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 4px;
}

.dashboardStockBean {
    font-size: 13px;
}

.bean-roast-dates {
    display: flex;
    align-items: center;
    gap: 5px;
}

button.dashboardStockBatch {
    margin-bottom: 0;
    padding: 5px 3px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #fff;
    color: #333;
    box-shadow: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
    vertical-align: bottom;
    appearance: none;
    -webkit-appearance: none;
}

.dashboardStockCount {
    display: inline-block;
    vertical-align: bottom;
    margin-top: 3px;
    margin-right: 4px;
    font-size: 20px;
    font-weight: bold;
    color: #d9350a;
    letter-spacing: 0;
    line-height: 1;
}

.dashboardStockDate {
    display: inline-block;
    vertical-align: bottom;
    font-size: 11px;
    font-weight: 400;
    color: #000000;
    white-space: nowrap;
    letter-spacing: 0;
    line-height: 1;
    margin-right: 0px;
}

.dashboardStockBags {
    display: inline-block;
    margin-top: 3px;
    position: relative;
}

.dashboardStockBags span {
    display: block;
    color: #d9350a;
    font-size: 1.2rem;
    font-weight: bold;
}

.dashboardStockAmmount {
    font-size: 12px;
    min-width: 50px;
    text-align: right;
}

.dashboardStockAmmount em {
    font-size: 20px;
    margin-right: 2px;
    color: #d9350a;
}

#dashboardStockLastUpdate {
    text-align: right;
}

#dashboardStockModal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
    font-weight: normal;
}

#dashboardStockModal.is-open {
    display: flex;
}

.dashboardStockModalBg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .6);
}

.dashboardStockModalPanel {
    position: relative;
    z-index: 10001;
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 10px;
    padding: 24px 28px;
    box-sizing: border-box;
}

#dashboardStockModalMessage {
    margin: 0;
    color: #000;
    line-height: 1.5;
}

#dashboardStockModalError {
    margin: 12px 0 0;
    color: #d9350a;
    line-height: 1.4;
}

#dashboardStockModalError:empty {
    display: none;
}

.dashboardStockModalField {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.dashboardStockModalField > span {
    font-weight: 600;
    min-width: 3em;
}

#dashboardStockModal .quantity-radio,
#dashboardStockModal .grind-radio {
    display: flex;
    flex: none;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    overflow: hidden;
}

#dashboardStockModal .quantity-radio > div,
#dashboardStockModal .grind-radio > div {
    position: relative;
    flex: 1;
}

#dashboardStockModal .quantity-radio input,
#dashboardStockModal .grind-radio input {
    width: 36px;
    height: 36px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

#dashboardStockModal .quantity-radio label,
#dashboardStockModal .grind-radio label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: #fff;
    color: #333;
    border-right: 1px solid #d9d9d9;
    font-size: 16px;
    font-weight: 400;
}

#dashboardStockModal .quantity-radio > div:last-child label,
#dashboardStockModal .grind-radio > div:last-child label {
    border-right: 0;
}

#dashboardStockModal .quantity-radio input:checked + label,
#dashboardStockModal .grind-radio input:checked + label {
    background: #d9350a;
    color: #fff;
    font-weight: 500;
}

#dashboardStockModal .quantity-radio input:focus-visible + label,
#dashboardStockModal .grind-radio input:focus-visible + label {
    outline: 2px solid #d9350a;
    outline-offset: -2px;
}

#dashboardStockModal select.quantity-select {
    height: 36px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 16px;
}

.dashboardStockCutBarcode {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    cursor: pointer;
    user-select: none;
}

.dashboardStockCutBarcode input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.dashboardStockModalActions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

#dashboardStockModalYes,
#dashboardStockModalPrint {
    background: #d9350a;
    border-color: #d9350a;
    color: #fff;
}

#dashboardStockModalYes:disabled,
#dashboardStockModalNo:disabled,
#dashboardStockModalPrint:disabled,
#dashboardStockModalEmbedClose:disabled {
    opacity: .6;
}

#dashboardStockModal.is-embed {
    padding: 12px;
}

#dashboardStockModal.is-embed .dashboardStockModalPanel {
    max-width: 980px;
    width: 100%;
    height: min(920px, calc(100vh - 48px));
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#dashboardStockModal.is-embed #dashboardStockModalMessage {
    flex: none;
}

.dashboardStockPrintPane {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 12px;
}

.dashboardStockPrintStatus {
    flex: none;
    margin: 0;
    color: #444;
}

.dashboardStockPrintFrame {
    flex: 1 1 auto;
    width: 100%;
    min-height: 360px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

#dashboardStockModal.is-embed .dashboardStockPrintFrame {
    min-height: 0;
}

.dashboardStockPrintDummy {
    padding: 16px;
    overflow: auto;
    color: #333;
    line-height: 1.5;
}

.dashboardStockPrintDummy p {
    margin: 0 0 12px;
}

.dashboardStockPrintToolbar {
    display: flex;
    flex: none;
    justify-content: flex-end;
}

#dashboardStockModalEmbedClose {
    padding: 8px 18px;
    font-size: 16px;
}

/* 新規登録画面 */

.new_table {
    width: 100%;
    margin-bottom: 1em;
}

.new_table th {
    width: 20%;
    border-bottom: 1px solid #ccc;
    border-right: none;
}

.new_table td {
    border-bottom: 1px solid #ccc;
}

.new_table input {
    width: 70%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.new_table input[type="number"] {
    width: 10em;
}

.new_table input[type="date"] {
    width: 190px;
}

.new_table select {
    min-width: 150px;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* 並べ替え */

.reorderList {
    margin-bottom: 1em;
}

.reorderList li {
    padding: 15px;
    border: 1px solid #ccc;
    margin-bottom: 5px;
    border-radius: 5px;
    background-color: #fff;
}

.reorderList .material-icons {
    vertical-align: -20%;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 3px;
    color: #fff;
    background: #d9350a;
}

.reorderNullList {
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-bottom: 1em;
    max-width: 100%;
}

.reorderClear {
    float: right;
    cursor: pointer;
    text-align: right;
    margin: 0 !important;
}

#reorderForm {
    border-top: 1px solid #ccc;
    padding-top: 1em;
}

/* 店頭在庫 */

#stockTable {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border: none !important;
    border-top: 1px solid #ccc !important;
    border-bottom: 1px solid #ccc !important;
    margin-bottom: 1rem;
}

#stockTable td,
#stockTable th {
    border: none !important;
    border-bottom: 1px dotted #ccc !important;
    background-color: transparent !important;
    padding: 15px 15px !important;
}

#stockTable th {
    width: 30%;
    white-space: nowrap;
    vertical-align: middle;
    text-align: right;
}

#stockTable td>div {
    display: flex;
    padding: 10px 0;
}

#stockTable td>div>div {
    padding: 0 30px 0 0;
    display: flex;
    align-items: center;
}

#stockTable td>div>div>button {
    vertical-align: middle;
    margin-right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
}

.addLine>button {
    vertical-align: middle;
    margin-right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
}

.addBean>select {
    min-width: 150px;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.stockDate {
    width: 200px;
}

.stockAmmount {
    width: 8em;
    justify-content: flex-end;
}

.stockAmmount>em {
    font-size: 2em;
    font-weight: normal;
    margin-right: 10px;
}

#stockTable td>div input {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-right: 10px;
}

#stockTable td>div>div input[type="number"] {
    width: 3em;
    margin-right: 10px;
    font-size: 2em;
}

#stockTable td>div>div input[type="date"] {
    width: 190px;
}

#stockLastUpdate {
    text-align: right;
    margin-bottom: 1em;
}

/* モーダル */

#modal {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#modalBg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .6);
}

#modalInner {
    background: #fff;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    z-index: 10001;
    padding: 30px 50px;
}

#iotLoading {
    opacity: 0;
}

#iotTitle {
    background-color: #444;
    color: #fff;
    text-align: center;
    margin-bottom: 1em;
    padding: 10px;
}

#iotTitle em {
    margin-right: 5px;
    font-weight: normal;
}

#iotDigit {
    width: 200px;
    padding: 15px 50px;
    background-color: #000;
    color: #0f0;
    text-align: right;
    margin: 0 auto 1em;
    border-radius: 5px;
}

#iotDigit em {
    font-weight: bold;
    margin-right: 10px;
    font-size: 2em;
}

#iotCalc {
    text-align: center;
    margin-bottom: 1em;
}

#iotCalc span {
    margin-right: 5px;
    font-size: 1.4em;
}

#iotButton {
    text-align: center;
}

#iotButton>button {
    width: 200px;
    margin-bottom: 2em;
}

#iotButton>button>em {
    font-size: 2em;
    margin-right: 10px;
}

#iotClose {
    text-align: center;
}

#iotClose i {
    vertical-align: -25%;
    margin-right: 5px;
}

#iotClose a {
    cursor: pointer;
    color: #000;
}


#nav_logout {
    margin-left: auto;
    padding-right: 0;
}

#nav_logout a {
    font-size: 11px;
    white-space: nowrap;
}

body.login-page {
    padding: 1.5rem 1rem 2rem;
    font-size: 16px;
}

.login-panel {
    max-width: 28rem;
    margin: 8vh auto 0;
}

.login-panel h1 {
    font-size: 1.8rem;
    letter-spacing: .12em;
    margin-bottom: .6rem;
}

.login-panel h1 img {
    height: 36px;
    vertical-align: -20%;
    margin-right: 8px;
}

.login-lead {
    margin-bottom: 1.2rem;
    color: #666;
}

.login-panel label {
    display: block;
    margin: 1rem 0 .4rem;
}

.login-panel input[type="text"],
.login-panel input[type="password"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.4;
    padding: .75rem .8rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
}

.login-panel button {
    width: 100%;
    margin-top: 1.4rem;
    padding: .85rem;
    font-size: 16px;
}

.login-error {
    margin-top: 1rem;
    line-height: 1.5;
}

@media screen and (max-width: 880px) {
    body.login-page {
        padding: 1.25rem .8rem 2rem;
        font-size: 16px;
    }

    .login-panel {
        margin-top: 4vh;
    }

    #nav_logout a {
        font-size: 10px;
    }

    #nav_top span {
        display: none;
    } 

    section {
        padding: 10px;
    }
    #remainChartContainer {
        display: none;
    }
    
    #remainChartContainerSP {
        display: block;
    }
    
}