/* Minimal admin skin inspired by the legacy UI. */

:root {
  --bg: #dceeff;
  --panel: #ffffff;
  --panelBorder: #333333;
  --text: #333333;
  --muted: #666666;
  --link: #333333;
  --linkHover: #a9a9a9;
  --danger: #b00020;
  --primary: #417692;
  --sidebar: transparent;
  --sidebarText: #333333;
  --sidebarMuted: #333333;
  --legacy-bg-image: url("/static/legacy-bg.png");
  --legacy-nav-sprite: url("/static/legacy-nav-sprite.gif");
}

/* Legacy reset rules used by the original admin pages. */
body,
div,
ul,
li,
h1,
h2,
h3,
form,
input,
textarea,
th,
td {
  margin: 0;
  padding: 0;
}

th,
h1,
h2,
h3 {
  font-size: 100%;
  font-style: normal;
  font-weight: normal;
}

body,
br {
  letter-spacing: 0;
}

ul {
  list-style: none;
}

.sf-hidden {
  display: none !important;
}

html,
body {
  height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background-color: var(--bg) !important;
  background-image: none !important;
  color: var(--text);
  font-family: "Hiragino Kaku Gothic Pro";
  font-size: 13px;
  line-height: 1.231;
  letter-spacing: 0;
}

input {
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--linkHover);
  text-decoration: none;
}

#sendMultiReplyForm #formSettingToggleDispTrigger {
  display: inline;
  text-decoration: underline;
}

#searchMultiMessagesAjaxId {
  position: relative;
  top: 0.4375px;
}

#sendMultiReplyForm #form1 > table.tableType1:nth-of-type(1) {
  position: relative;
  top: -1.25px;
}

#lineMessagingTransferPage #form1 .tableType1 {
  position: relative;
  top: -0.25px;
}

#lineMessagingTransferPage #form1 .tableType1 > tbody > tr:nth-child(8) > th {
  line-height: 1;
}

#lineMessagingTransferPage #registForm {
  position: relative;
  top: 0.125px;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.btn,
input[type="submit"],
input[type="button"] {
  appearance: none;
  border: 1px solid #417692;
  border-radius: 3px;
  padding: 7px 20px;
  cursor: pointer;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(#65bff0 0%, #417692 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 0 2px rgba(255, 255, 255, 1);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.4);
}

input[type="submit"],
input[type="button"] {
  font-size: 17px;
  font-weight: 400;
}

.btn:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(#65bff0 0%, var(--primary) 100%);
}

.btn-danger {
  border-color: #8f1b1b;
  background: linear-gradient(#ea7f7f 0%, #b83838 100%);
}

.alert {
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0 16px;
  background: #fff;
}

.alert-error {
  border-color: rgba(176, 0, 32, 0.35);
  color: var(--danger);
}

.alert-success {
  border-color: rgba(15, 81, 50, 0.35);
  color: #0f5132;
}

.alert-info {
  border-color: rgba(8, 66, 152, 0.35);
  color: #084298;
}

.border {
  margin: 0 0 20px;
  background: #ffffff;
  border: 1px solid #666666;
  border-radius: 0;
  padding: 10px;
}

ul.list {
  color: #666666;
  margin: 0 0 0 18px;
  padding: 0;
  list-style: outside
    url("data:image/gif;base64,R0lGODlhCQAJALMLAP+ZM/+RM/+gM/99AP+IAP+nM/97AP+RAP9/AP9+AP98AP///wAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAJAAkAAAQacMlJq53gAiMLVoF0CAswhJJAAAmKIS4VSxEAOw==");
}

ul.list li {
  margin: 0;
  height: 20px;
}

/* Login */
.loginShell {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.loginCard {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--panelBorder);
  border-radius: 10px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.loginTitle {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.fieldLabel {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fieldInput {
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* Admin layout */
.legacyPageHeader {
  font-size: 108%;
  font-weight: 700;
  color: #24618e;
  border-left: 10px solid #24618e;
  border-bottom: 1px dotted #24618e;
  padding: 5px 0 4px 6px;
  margin: 0 0 10px;
}

#wrapper {
  width: 98%;
  margin: 5px;
}

#wrapper::after {
  content: "";
  display: block;
  clear: both;
}

#main {
  width: 100%;
  float: right;
  margin-left: -220px;
}

#contents,
.content {
  position: relative;
  margin: 0 0 10px 220px;
}

#sub {
  float: left;
  width: 200px;
  margin-bottom: 10px;
  color: #ffffff;
}

#footer {
  clear: both;
  width: 100%;
  border-top: #bbb solid 2px;
}

#main p {
  margin: 0 0 20px;
}

#globalNav {
  width: 200px;
  margin: 0;
  border-style: solid solid none solid;
  border-color: #000;
  border-size: 1px;
  border-width: 1px;
}

#globalNav ul {
  margin: 0;
  padding: 0;
}

#globalNav li {
  list-style: none;
}

#globalNav li a {
  height: 24px;
  text-decoration: none;
}

#globalNav li a:link,
#globalNav li a:visited {
  color: #333;
  display: block;
  background: var(--legacy-nav-sprite) 0 0 no-repeat;
  padding: 6px 0 0 0;
}

#globalNav li.disp a:link,
#globalNav li.disp a:visited {
  color: #333;
  background: var(--legacy-nav-sprite) 0 -64px no-repeat;
  padding: 6px 0 0 0;
}

#globalNav li a:hover,
#globalNav li.disp a:hover {
  color: #fff;
  background: var(--legacy-nav-sprite) 0 -64px no-repeat;
  padding: 8px 0 0 16px;
}

#globalNav .head {
  color: #fff;
  font-weight: 700;
  height: 24px;
  background: var(--legacy-nav-sprite) 0 -32px no-repeat;
  padding: 8px 0 0 16px;
  cursor: pointer;
}

h2 {
  font-size: 108%;
  font-weight: 700;
  color: #666666;
  border-left: 10px solid #cccccc;
  border-bottom: 1px dotted #cccccc;
  padding: 5px 0 4px 6px;
  margin: 0 0 10px;
}

h3 {
  font-size: 108%;
  font-weight: 700;
  color: #cc0000;
  border-left: 10px solid #cc0000;
  border-bottom: 1px dotted #cccccc;
  padding: 5px 0 4px 6px;
  margin: 0 0 6px;
}

/* Tables */
.tableType1 {
  width: auto;
  border-collapse: collapse;
  border-top: 1px solid var(--panelBorder);
  border-left: 1px solid var(--panelBorder);
  background: var(--panel);
  color: var(--text);
  margin: 0 0 20px;
  empty-cells: show;
  font-size: 13px;
  line-height: 1.231;
  font-family: sans-serif;
}

.tableType1 th,
.tableType1 td {
  border-right: 1px solid var(--panelBorder);
  border-bottom: 1px solid var(--panelBorder);
  padding: 3px 10px;
}

.tableType1 th {
  background: #cccccc;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
}

.layoutTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 12px;
}

.layoutCell {
  width: 50%;
  vertical-align: top;
}

table.layout {
  border: 0;
  width: auto;
  margin: 0;
  border-collapse: collapse;
}

td.layout {
  padding: 0 10px 0 0;
  vertical-align: top;
}

p.err {
  color: #ffffff;
  background: #ff0000;
  border: 1px solid #666666;
  margin: 0 0 20px;
  padding: 10px;
}

#messageTemplatesPage .messageTemplatesInfoTable,
#messageTemplatesPage .messageTemplatesSearchTable,
#messageTemplatesPage .messageTemplatesRegistTable,
#messageTemplatesPage .messageTemplatesPercentsTable,
#messageTemplatesPage .messageTemplatesFooterTable,
#messageTemplatesPage .messageTemplatesListTable {
  width: auto;
}

#messageTemplatesPage .messageTemplatesListTable td:nth-child(3) {
  min-width: 380px;
}

#characterSendLogPage .tableType1 {
  width: auto;
}

#characterSendLogPage #listResponse .tableType1 {
  width: 100%;
}

.cel_style3 {
  white-space: pre-wrap;
  word-break: break-all;
}

.attentionBox {
  margin: 10px 0;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(176, 0, 32, 0.25);
  border-radius: 10px;
  padding: 10px;
}

.attentionTitle {
  font-weight: 900;
  color: var(--danger);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 6px;
}

.attentionList {
  margin: 0;
  padding-left: 18px;
}

.attentionList li {
  margin: 2px 0;
}

.tableScroll {
  overflow: auto;
  max-width: 100%;
  border-radius: 10px;
}

.r {
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

.cel_cm {
  text-align: center;
  vertical-align: middle;
}

.cel_rm {
  text-align: right;
  vertical-align: middle;
}

.formTable th {
  width: 220px;
}

.monitorSearchFormTable {
  width: 915px;
  max-width: 100%;
}

.monitorSearchAttention {
  width: 915px;
  max-width: 100%;
  box-sizing: border-box;
}

.formTable input[type="text"],
.formTable input[type="number"],
.formTable input[type="password"],
.formTable input[type="file"],
.formTable select,
.formTable textarea {
  padding: 2px 4px;
  border-radius: 0;
  border: 1px solid #999999;
  background: #fff;
  color: #333333;
}

.formTable label {
  margin-right: 10px;
}

.messageTimerCandidatesRoot {
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #ffffff;
}

.messageTimerCandidateItem {
  display: inline-block;
  min-width: 220px;
  margin: 2px 8px 2px 0;
  white-space: nowrap;
}

.messageTimerCandidateBadge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.listResponse {
  margin-top: 14px;
}

.listSummary {
  margin: 10px 0;
  font-weight: 800;
}

.listTable th,
.listTable td {
  font-size: 12px;
}

.receiverTable {
  width: auto;
}

.receiverTable .cel_style0 {
  width: 100px;
  word-break: break-all;
}

.receiverTable .cel_style2 {
  width: 200px;
  word-break: break-all;
}

.receiverTable .receiverCheckCell {
  width: 28px;
  text-align: center;
}

.receiverTable .receiverDataCell {
  width: 190px;
  word-break: break-all;
}

.receiverTable .receiverActionCell {
  width: 140px;
}

.receiverTable #question {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #2f2f2f;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.receiverTable #question:focus-visible {
  outline: 2px solid #65bff0;
  outline-offset: 2px;
}

#notes {
  z-index: 1200;
  line-height: 1.4;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}

.receiverTable .toggle-target:disabled {
  background-color: #e9ecef;
  color: #6c757d;
  border: 1px solid #ced4da;
  cursor: not-allowed;
}

.toggleIndividualTrigger {
  text-align: center;
  margin-bottom: 10px;
}

.link-disabled {
  pointer-events: none;
  color: gray;
  text-decoration: none;
}

.cellLinks {
  display: grid;
  gap: 4px;
}

.nickLink {
  font-weight: 800;
  color: var(--link);
}

.subText {
  margin-top: 4px;
  color: var(--muted);
  white-space: pre-wrap;
}

.label {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.7);
}

.label-special {
  color: #7a0020;
  border-color: rgba(176, 0, 32, 0.35);
}

.label-dup {
  color: #7a3b00;
  border-color: rgba(122, 59, 0, 0.35);
}

.dangerText {
  color: var(--danger);
  font-weight: 900;
}

.l {
  text-align: left;
}

.dragHandle {
  display: inline-block;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.7);
  cursor: grab;
  user-select: none;
}

.checkboxBox {
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cssStatusClass {
  background-color: #ffff00;
}

.cssEnableClass {
  color: #ff0000;
  font-weight: 900;
}

.pointCharaterAssignEnable {
  color: #ff0000;
  font-weight: 900;
}

.replyTimerEnable {
  color: #ff0000;
}

.couponSettingElementSpan {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.couponSettingElement {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.previewSplit {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.previewPane {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 10px;
  padding: 10px;
}

.previewTitle {
  font-weight: 900;
  margin-bottom: 8px;
}

.previewFrame {
  width: 100%;
  height: 360px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  background: #fff;
}

/* ChatBots */
.dtable {
  display: flex;
}

.dtable_c {
  display: table-cell;
  padding: 10px;
}

.botBlockTitle {
  font-weight: 900;
  margin-bottom: 8px;
}

.aiMonitorSummaryGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  width: max-content;
  padding-right: 30px;
  margin-top: 0;
}

.aiMonitorSummaryGrid .aiMonitorSummaryCard {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-right: 5px;
}

.aiMonitorSummaryGrid .div_style {
  margin: 0;
}

.aiMonitorSummaryGrid .tableType1 {
  margin: 0;
}

.intentRow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.12);
}

.intentRow:last-child {
  border-bottom: none;
}

.linkStyle {
  font-weight: 900;
  color: var(--link);
}

.linkStyle:hover {
  text-decoration: underline;
}

/* Legacy Datepicker */
.talksDatepicker {
  position: absolute;
  z-index: 2000;
  width: 230px;
  border: 1px solid #7f7f7f;
  border-radius: 3px;
  background: #efefef;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  color: #333;
  font-size: 12px;
}

.talksDatepickerHeader {
  display: grid;
  grid-template-columns: 26px 1fr 26px;
  align-items: center;
  gap: 2px;
  padding: 3px 4px;
  background: #d7d7d7;
  border-bottom: 1px solid #8f8f8f;
}

.talksDatepickerNav {
  border: 1px solid #8f8f8f;
  border-radius: 2px;
  background: #f7f7f7;
  color: #333;
  height: 20px;
  line-height: 1;
  cursor: pointer;
  font-size: 10px;
  padding: 0;
}

.talksDatepickerNav:hover {
  background: #fff;
}

.talksDatepickerTitle {
  text-align: center;
  font-weight: 700;
  color: #2f6f9d;
  user-select: none;
}

.talksDatepickerTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.talksDatepickerTable th,
.talksDatepickerTable td {
  border: 1px solid #c1c1c1;
  width: 14.285%;
  height: 24px;
  text-align: center;
  background: #f5f5f5;
}

.talksDatepickerTable th {
  background: #e4e4e4;
  font-weight: 700;
}

.talksDatepickerDay {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  color: #444;
  cursor: pointer;
  font-size: 12px;
}

.talksDatepickerDay:hover {
  background: #ffffff;
}

.talksDatepickerDay.is-selected {
  background: #2d8fd6;
  color: #fff;
  font-weight: 700;
}

.talksDatepickerDay.is-today {
  background: #dceeff;
  color: #0f4f8a;
  font-weight: 700;
}

.talksDatepickerDay.is-selected.is-today {
  background: #2d8fd6;
  color: #fff;
}

.talksDatepickerBlank {
  display: block;
  width: 100%;
  height: 100%;
  background: #f0f0f0;
}

/* Responsive */
@media (max-width: 980px) {
  #wrapper {
    width: auto !important;
    margin: 5px !important;
  }

  #main {
    float: none !important;
    width: auto !important;
    margin-left: 0 !important;
  }

  #sub {
    float: none !important;
    width: auto !important;
    margin-bottom: 10px !important;
  }

  #contents,
  .content {
    margin: 0 0 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #globalNav {
    width: auto !important;
  }

  #globalNav .head,
  #globalNav li a:link,
  #globalNav li a:visited,
  #globalNav li.disp a:link,
  #globalNav li.disp a:visited,
  #globalNav li a:hover,
  #globalNav li.disp a:hover {
    background-size: 100% 96px !important;
  }

  #contents .actions,
  .content .actions {
    display: block !important;
  }

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .menu {
    max-height: 48vh;
    overflow: auto;
  }

  .main {
    padding: 10px;
  }

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

  .layoutTable,
  .layoutTable tbody,
  .layoutTable tr,
  .layoutTable td {
    display: block;
    width: 100%;
  }

  .layoutTable td + td {
    margin-top: 12px;
  }
}
