.warn {
  color: #ef5350;
}

button {
  border: none;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.jc-start {
  display: flex;
  justify-content: flex-start;
}

.jc-space-between {
  display: flex;
  justify-content: space-between;
}

.jc-space-around {
  display: flex;
  justify-content: space-around;
}

.jc-center {
  display: flex;
  justify-content: center;
}

.jc-end {
  display: flex;
  justify-content: flex-end;
}

.ai-start {
  display: flex;
  align-items: flex-start;
}

.ai-center {
  display: flex;
  align-items: center;
}

.ai-end {
  display: flex;
  align-items: flex-end;
}

.ai-stretch {
  display: flex;
  align-items: stretch;
}

.as-center {
  display: flex;
  align-self: center;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-1 {
  flex: 1;
}

.fit-contain {
  object-fit: contain;
}

.hide-after:after,
.custom-file-input:lang(en) ~ .custom-file-label:after {
  display: none;
}

.modal_style .modal-footer .btn {
  padding: 10px 30px;
}

.modal_style .modal-footer .btn.btn-confirm {
  background-color: #2e355b;
}

.modal_style .modal-footer .btn.btn-delete {
  background-color: #dc3545;
}

.modal_style .modal-footer .btn.btn-cancel {
  background-color: #cccccc;
}

.modal_style .modal-footer .btn.btn-more {
  background-color: #808299;
}

.btn-gray {
  color: #484067;
  border: 1px solid #c8c5d5;
  background: linear-gradient(to bottom, #fefeff 0%, #efeff6 100%);
  padding: 10px 20px;
  font-weight: bold;
}

.btn-gray:hover,
.btn-gray:active,
.btn-gray:focus {
  border: 1px solid #c8c5d5;
  background: linear-gradient(to top, #fefeff 0%, #efeff6 100%);
}

.dropdown-menu {
  border-radius: 0;
  padding: 0;
  color: #999;
  font-size: 14px;
}

.dropdown-item {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  cursor: pointer;
  color: #999;
  font-size: 14px;
}

.dropdown-item:active {
  background-color: #ccc;
  color: black;
}

.modal-body .col-form-label {
  font-weight: bold;
}

.modal-body .form-group:last-child {
  margin-bottom: 0;
}

.table,
.table-area table {
  overflow: auto;
}

.table-area th {
  padding: 0.75rem;
  white-space: nowrap;
}

.table-area td {
  padding: 0.75rem;
}

.table-area th.sticky {
  position: sticky;
  top: 0;
  padding: 0;
}
.table-area td.sticky {
  position: sticky;
  padding: 0;
}
.table-area .sticky > div {
  padding: 0.75rem;
}
.table-area th {
  background-color: #fff;
  border-top: 1px solid #ddd;
  cursor: pointer;
  color: #4f86f2;
  font-weight: bold;
}

.table-area th input {
  border: 1px solid #dee2e6;
}

.table-area td {
  border-top: 1px solid #dee2e6;
}

.strike-table tbody tr:nth-child(n) td {
  background-color: #ededed;
}

.strike-table tbody tr:nth-child(2n) td {
  background-color: white;
}

.text-input {
  border: 1px solid #c8c5d5;
  padding: 5px 10px;
}

.input-button,
.input-button:active,
.input-button:focus {
  background-color: white;
  width: 40px;
  /* height: 40px; */
  cursor: pointer;
  border: 1px solid #c8c5d5;
}

.input-button:hover {
  background-color: rgb(238, 238, 238);
}

.page-content {
  padding: 20px;
  border: 1px solid #dee2e6;
  background: #fff;
  border-top: 0;
  margin-top: -1px;
}

/* linkbar */

.linkbar {
  list-style: none;
  margin: 0;
}

.linkbar li {
  margin-right: 15px;
}

.linkbar li:last-child {
  margin-right: 0;
}

.linkbar li a {
  background-color: #efefef;
  color: #808080;
  letter-spacing: 1px;
  padding: 11px 20px;
}

.linkbar li a.active {
  background-color: #8fc31f;
  color: white;
}

/* app下載頁 */

.mobile-area {
  padding: 0 160px;
  display: flex;
  align-items: stretch;
  background-image: url("../images/mobile/mobile_bg.png");
  height: 100vh;
  width: 100vw;
}

.mobile-area > div:first-child {
  background-color: rgba(255, 255, 255, 0.47);
  flex: 4;
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-area .mobile-describe {
  margin: 120px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.mobile-area .mobile-describe h2 {
  font-weight: bold;
  color: #282e3e;
}

.mobile-area > div:last-child {
  padding: 0 80px;
  flex: 6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-area .qr-background {
  background-color: #252b4a;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 25px;
}

.mobile-area .qr-background > span {
  margin-bottom: 20px;
}

.mobile-area .qr-background > img {
  width: 100%;
}

/* header */

.header-area {
  background-color: #252b4a;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100vw;
  height: 60px;
  position: fixed;
  padding: 10px 0;
  padding-left: 0;
  display: flex;
  align-items: stretch;
  color: #808299;
}

.header-area > * {
  padding: 0 15px;
  border-right: 1px solid #363f6c;
  font-size: 14px;
  font-weight: 400;
}

.header-area > div:first-child {
  width: 60px;
  justify-content: center;
}

.header-area .icon {
  font-size: 32px;
  cursor: pointer;
}

.header-area .icon:hover {
  color: white;
}

.header-area .user-pic {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.notification-alert {
  position: absolute;
  left: 0;
  top: 0;
  background-color: red;
  border-radius: 50%;
  width: 10px;
  height: 10px;
}

/* sidebar */

.sidebar-area {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 60px;
  height: 100%;
  width: 60px;
  -webkit-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
}

.sidebar-area.active,
.sidebar-area:hover,
.sidebar-area li {
  width: 300px;
}

.sidebar-area ul {
  background: #2e355b;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sidebar-area li a {
  display: flex;
  align-items: center;
  white-space: nowrap;
  color: #808299;
  letter-spacing: 1px;
}

.sidebar-area li a:hover {
  background-color: #3f497d;
}

.sidebar-area li a.active {
  color: #fff;
  background-color: #8fc31f;
}

.sidebar-area li .icon {
  font-size: 24px;
  width: 60px;
  height: 60px;
  -webkit-animation-duration: 0.7s;
  animation-duration: 0.7s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

/* 生產總覽 */
table .sticky {
  z-index: 1;
}

.table-area table {
  max-height: 75vh;
  white-space: pre-wrap;
}

.table-area .timeline {
  color: black;
  padding: 0;
  width: 50%;
}

.table-area .timeline ul {
  display: flex;
  margin-bottom: 0;
  width: 100%;
  height: 50px;
  align-items: stretch;
}

.table-area thead .timeline li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.table-area thead .timeline li:nth-child(2n + 1) {
  background-color: #f9f9f9;
}

.table-area tbody .timeline > div {
  position: relative;
  display: flex;
  height: 50px;
  width: 100%;
}

#scroll-area {
  -webkit-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  user-select: none;
  overflow: auto;
}

#scroll-area::-webkit-scrollbar:horizontal {
  height: 15px;
}

.main-area {
  position: relative;
  display: block;
  top: 60px;
  left: 0;
  padding: 30px;
  padding-bottom: 60px;
  margin-left: 60px;
  -webkit-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
}

.sidebar-area.active + .main-area {
  margin-left: 250px;
}

/* 看板 */

.dashboard-big {
  height: 100%;
}

.dashboard-big .bar-left {
  width: 24%;
}

.dashboard-big .bar-left b {
  font-size: 36px;
}

.dashboard-big .bar-right {
  color: white;
  margin: 0 10px;
}

.dashboard-big .bar-right > div,
.dashboard-small .bar-right > div {
  width: 32%;
  border-radius: 5px;
}

.dashboard-big .main-left {
  width: 42%;
}

.dashboard-big .main-left > div > span {
  font-size: 14px;
  color: #828282;
}

.dashboard-big .main-left > div > b {
  font-size: 22px;
}

.dashboard-big .main-left .progress-back,
.dashboard-small .progress-area .progress-back {
  height: 40px;
  background-color: #e9ecef;
  border-radius: 0.25rem;
  padding: 0 10px;
  flex: 6;
}

.dashboard-big .main-left .progress-back b,
.dashboard-small .progress-area .progress-back b {
  z-index: 1;
}

.dashboard-big .main-left .progress-bar,
.dashboard-small .progress-area .progress-bar {
  left: 0;
  height: 100%;
  max-width: 100%;
}

.dashboard-big .main-left .progress-back .ideal-line,
.dashboard-small .progress-area .progress-back .ideal-line {
  left: 0;
  border-right: 4px solid #929292;
  height: 120%;
}

.dashboard-big .main-left .progress-back .ideal-label,
.dashboard-small .progress-area .progress-back .ideal-label {
  top: 120%;
  margin-left: -15px;
}

.dashboard-big .main-left .chart-area,
.dashboard-small .main-left .chart-area {
  border: 1px solid rgba(0, 0, 0, 0.125);
  width: 55%;
  height: 100%;
  padding: 20px;
  padding-bottom: 60px;
}

.dashboard-big .main-left .chart-area > b {
  font-size: 1.5rem;
}

.dashboard-big .main-left .chart-area > div,
.dashboard-small .main-left .chart-area > div {
  height: 70%;
}

.dashboard-big .main-left .chart-area .ideal-line,
.dashboard-small .main-left .chart-area .ideal-line {
  z-index: 1;
  border-bottom: 4px dotted #ff644e;
  width: 110%;
  transition: bottom 0.6s ease;
  -webkit-transition: bottom 0.6s ease;
  -o-transition: bottom 0.6s ease;
}

.dashboard-big .main-left .chart-area .progress-back,
.dashboard-small .main-left .chart-area .progress-back {
  width: 30px;
  height: 100%;
  background-color: #e9ecef;
  border-radius: 0;
  padding: 0;
}

.dashboard-big .main-left .chart-area .progress-back .value,
.dashboard-small .main-left .chart-area .progress-back .value {
  bottom: 100%;
  margin: 5px 0;
  color: #808080;
  width: 150%;
  left: -25%;
}

.dashboard-big .main-left .chart-area .progress-back .bar,
.dashboard-small .main-left .chart-area .progress-back .bar {
  transition: height 0.6s ease;
  -webkit-transition: height 0.6s ease;
  -o-transition: height 0.6s ease;
  max-height: 100%;
  bottom: 0;
  width: 100%;
}

.dashboard-big .main-left .chart-area .progress-back .time,
.dashboard-small .main-left .chart-area .progress-back .time {
  top: 100%;
  margin: 5px 0;
  color: #808080;
  width: 150%;
  left: -25%;
}

.dashboard-big .main-left .list-block,
.dashboard-small .main-left .list-block {
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.dashboard-big .main-left .list-block > div,
.dashboard-small .main-left .list-block > div {
  padding: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.dashboard-big .main-left .list-block > div:last-child,
.dashboard-small .main-left .list-block > div:last-child {
  border-bottom: none;
}

.dashboard-big .main-left .list-block > div:first-child,
.dashboard-small .main-left .list-block > div:first-child {
  background-color: rgba(0, 0, 0, 0.03);
  font-size: 20px;
}

.dashboard-big .footer {
  margin-top: 20px;
  color: #727e8c;
}

.dashboard-big .footer > div {
  padding: 0 20px;
}

.dashboard-big .footer > div > span {
  font-size: 30px;
}

.dashboard-small {
  width: 49%;
  border: 1px solid #dee2e6;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  margin-bottom: 30px;
}

.dashboard-small .main-left {
  flex: 5;
  padding: 10px;
}

.dashboard-small .bar-left {
  padding-right: 10px;
  margin-right: 10px;
}

.dashboard-small .bar-right {
  flex: 3;
  color: white;
  line-height: 1;
}

.dashboard-small .progress-area {
  line-height: 1;
}

.dashboard-small .progress-area > span {
  font-size: 10px;
  color: #828282;
}

.dashboard-small .progress-area > b {
  font-size: 20px;
}

.dashboard-small .progress-area .progress-back {
  height: 20px;
  font-size: 14px;
}

.dashboard-small .main-left .chart-area {
  width: 11vw;
  font-size: 14px;
  height: unset;
  flex: 1;
  padding: 5px 10px 20px;
}

.dashboard-small .main-left .chart-area > div {
  font-size: 12px;
}

.dashboard-small .main-left .chart-area .progress-back {
  width: 20px;
}

.dashboard-small .main-left .chart-area .ideal-line {
  width: 120%;
}

.dashboard-small .main-left .chart-area .progress-back .value,
.dashboard-small .main-left .chart-area .progress-back .time {
  margin: 0;
}

.dashboard-small .main-left .list-block {
  margin-top: 10px;
}

.dashboard-small .main-left .list-block > div {
  padding: 5px;
  font-size: 14px !important;
}

.dashboard-small .main-right {
  color: #727e8c;
  padding: 10px;
}

.dashboard-small .main-right span {
  font-size: 20px;
  word-break: break-all;
}

/* 生產執行 */

.device-list {
  overflow: auto;
  max-height: 80vh;
}

.device-list > li {
  padding: 15px;
  border: 1px solid rgba(0, 0, 0, 0.125);
  cursor: pointer;
  background-color: white;
  margin-bottom: 15px;
  color: #808080;
  height: 150px;
}
.device-list > li:last-child {
  margin-bottom: 0;
}
.device-list > li.active {
  background-color: #e7e7e7;
}

.device-list > li:hover {
  background-color: #eeeeee;
}

.device-list > li > div:first-child {
  color: #808080;
}

.device-list > li > div:first-child > *:first-child {
  color: black;
  margin-bottom: 10px;
}

.device-list > li > div:last-child > b {
  color: white;
  padding: 0 10px;
  margin-bottom: 15px;
  background-color: #b1b4ca;
}

.device-list > li > div:last-child > b.active {
  background-color: #58b691;
}

.pes-area .order-area {
  color: #9e99b9;
  max-height: 80vh;
}

.pes-area .order-area > div {
  margin-bottom: 15px;
}

.pes-area .order {
  padding: 15px;
  /* border: 1px solid rgba(0, 0, 0, 0.125); */
  color: black;
}

.pes-area .order .no-order {
  background-color: #eeeeee;
  color: #808080;
  width: 100%;
  height: 100%;
  padding: 20px;
}

.pes-area .order img {
  object-fit: scale-down;
  height: 150px;
  width: 150px;
  margin-right: 15px;
}

.pes-area .order > div > div > b:first-child {
  font-size: 20px;
  margin-bottom: 5px;
}

.pes-area .order button {
  background-color: #00c395;
  height: 120px;
  width: 120px;
  border-radius: 5px;
  border: none;
  color: white;
  font-weight: bold;
}

.pes-area .order button:hover {
  background-color: #00dda8;
}

.pes-area .order-list {
  overflow: auto;
  max-height: 17vh;
}

/* 不良品 */

.bad-area > div > h5,
.downtime-area > div > h5 {
  color: #9e99b9;
}

.custom-radio-list {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0;
  margin-left: 20px;
  width: 100%;
  list-style: none;
  padding: 0;
}

.custom-radio-list > li {
  margin: 10px 20px 10px 0;
  width: 8vw;
}

.pes-area .bad-list,
.pes-area .downtime-list {
  list-style: none;
  padding: 0;
}

.pes-area .bad-list > li,
.pes-area .downtime-list > li {
  cursor: pointer;
  background-color: #f5f5f5;
  border: 1px solid #dee2e6;
  border-left-width: 10px;
  border-left-style: solid;
  padding: 15px;
  border-left-color: #b3accb;
  margin-bottom: 15px;
}
.pes-area .bad-list .tag,
.pes-area .downtime-list .tag {
  border: 2px solid #461c8c;
  color: #461c8c;
  font-size: 14px;
  padding: 3px 10px;
}

.pes-area .bad-list > li > div,
.pes-area .downtime-list > li > span {
  font-size: 14px;
}

.icon-btn {
  color: #9893a6;
  cursor: pointer;
}

.icon-btn:hover {
  color: #655f74;
}

.top-bar > * {
  margin-right: 15px;
}

.top-bar > *:last-child {
  margin-right: 0;
}

.suggestion-area {
  top: 100%;
  width: 100%;
  background-color: white;
  border: 1px solid #ced4da;
  max-height: 30vh;
  overflow-y: auto;
  z-index: 3;
}

.suggestion-area > div {
  cursor: pointer;
  padding: 10px;
}

.custom-file-input {
  cursor: pointer;
}

.custom-file + label {
  right: 0;
  padding: 0.75rem;
  z-index: 2;
  background-color: #e9ecef;
  height: 100%;
  border-radius: 0 0.3rem 0.3rem 0;
  border: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.auth-table > div:first-child {
  padding: 15px 0;
  color: #646464;
}

.auth-table > div {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.auth-table > div:last-child {
  border-bottom: none;
}

.auth-table > div > div {
  padding: 5px 10px;
}

.auth-table > div > div:first-child {
  background-color: #efefef;
}

.auth-table > div > div:not(:first-child) {
  padding: 5px 25px;
}

.analysis-list {
  background-color: #fbfbfb;
  border: 1px solid rgba(0, 0, 0, 0.125);
  overflow-y: auto;
  padding: 5px;
  height: 75vh;
}

.analysis-list li {
  cursor: pointer;
}

.analysis-list li.checked {
  background-color: #eee;
}

.analysis-list li:hover {
  background-color: #cccccc;
}

.analysis-block {
  margin-bottom: 20px;
  padding: 30px;
}
