/* FMH Mail theme — aligned with fumanhai.com (Element Plus + green accent) */
:root {
  --fmh-green: #17c964;
  --fmh-green-2: #0e9e55;
  --fmh-green-3: #0a7d46;
  --fmh-navy: #0a1f3a;
  --fmh-ink: #303133;
  --fmh-muted: #6b7a73;
  --fmh-line: #dfe9e3;
  --fmh-bg: #edf4f0;
}

/* ---------- login page ---------- */
body.task-login { background: var(--fmh-bg); }
body.task-login #layout { background: transparent; }

.task-login #layout-content.fmh-login {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  max-height: 100dvh;
  min-height: 0;
  width: 100%;
  padding: 32px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  text-align: left;
}

.fmh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(680px 420px at 12% 8%, rgba(23, 201, 100, .16), transparent 65%),
    radial-gradient(720px 460px at 88% 6%, rgba(10, 31, 58, .10), transparent 62%),
    radial-gradient(600px 500px at 70% 100%, rgba(14, 158, 85, .12), transparent 65%),
    linear-gradient(rgba(14, 158, 85, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 158, 85, .05) 1px, transparent 1px);
  background-size: auto, auto, auto, 30px 30px, 30px 30px;
}

.fmh-shell { position: relative; z-index: 1; width: 100%; max-width: 960px; margin-block: auto; }

.fmh-card {
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(14, 158, 85, .14);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 70px -30px rgba(6, 40, 26, .32), 0 2px 10px -4px rgba(6, 40, 26, .12);
}

.fmh-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  color: #fff;
  background: linear-gradient(120deg, #07182e, #0a1f3a 55%, #0a3d26);
}

.fmh-head:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(23, 201, 100, .75) 35%, rgba(14, 158, 85, .7) 70%, transparent 100%);
  box-shadow: 0 0 10px rgba(23, 201, 100, .7);
}

.fmh-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .5px;
  color: #06281a;
  background: linear-gradient(135deg, #17c964, #0e9e55 60%, #0a7d46);
  box-shadow: 0 6px 18px -6px rgba(23, 201, 100, .9);
}

.fmh-brand-title { font-size: 16px; font-weight: 600; letter-spacing: .5px; text-shadow: 0 0 16px rgba(74, 222, 128, .55); }
.fmh-brand-sub { font-size: 12px; color: #9fb8ac; }

.fmh-live {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #bfe9d1;
  background: rgba(23, 201, 100, .12);
  border: 1px solid rgba(23, 201, 100, .35);
  padding: 5px 10px;
  border-radius: 999px;
}

.fmh-live i { width: 7px; height: 7px; border-radius: 50%; background: #17c964; box-shadow: 0 0 8px #17c964; }

.fmh-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.fmh-pane { padding: 30px 30px 26px; min-width: 0; }
.fmh-pane-client { background: linear-gradient(180deg, #f4faf7, #fff 70%); border-left: 1px solid var(--fmh-line); }

.fmh-h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--fmh-navy);
}

.fmh-h2:before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, #17c964, #0a7d46);
  box-shadow: 0 0 8px rgba(23, 201, 100, .7);
}

.fmh-tip { margin: 0 0 20px; font-size: 13px; color: #7b8a83; }

/* login form inside the card */
.task-login #login-form { position: static; top: auto; margin: 0; width: 100%; max-width: none; }
.task-login #login-form table,
.task-login #login-form tbody { display: block; width: 100%; }
.task-login #login-form tr { display: block; margin: 0 0 14px; }
.task-login #login-form td { display: block; width: 100%; padding: 0; }

/* icon and input on the same line */
.task-login #login-form td.input {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.task-login #login-form td.input .input-group-prepend {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
}

.task-login #login-form td.input .input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 0;
  padding: 0;
  color: var(--fmh-green-2);
  background: rgba(23, 201, 100, .10);
  border: 1px solid rgba(23, 201, 100, .22);
  border-radius: 10px;
}

.task-login #login-form td.input .input-group-text:before {
  font-size: 15px;
  line-height: 1;
}

.task-login #login-form td.title label {
  display: block;
  padding: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #5b6b64;
}

.task-login #login-form .form-control {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--fmh-ink);
  background: #fbfdfc;
  border: 1px solid #d8e3dc;
  border-radius: 10px;
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s;
}

.task-login #login-form .form-control:focus {
  border-color: #17c964;
  box-shadow: 0 0 0 3px rgba(23, 201, 100, .16);
  outline: 0;
}

.task-login #login-form .formbuttons { margin: 18px 0 0; padding: 0; }

.task-login #login-form button.mainaction {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  background-image: linear-gradient(135deg, #17c964, #0e9e55 55%, #0a7d46);
  box-shadow: 0 12px 26px -12px rgba(14, 158, 85, .85), 0 2px 6px -2px rgba(10, 125, 70, .5);
  transition: transform .2s, box-shadow .2s;
}

.task-login #login-form button.mainaction:hover {
  transform: translateY(-1px);
  background-image: linear-gradient(135deg, #22d674, #12b061 55%, #0c8c50);
  box-shadow: 0 16px 32px -12px rgba(14, 158, 85, .9);
}

.task-login #login-footer {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  color: #93a29a;
  text-align: left;
}

.task-login #login-footer > div {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #f7d4d4;
  border-radius: 10px;
  background: #fef1f1;
  color: #c0392b;
  font-size: 13px;
}

/* client settings list */
.fmh-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed #e3ece7;
}

.fmh-row:last-child { border-bottom: 0; }
.fmh-k { font-size: 13px; color: var(--fmh-muted); }
.fmh-v { font-family: Consolas, Menlo, monospace; font-size: 13px; font-weight: 600; color: #1f3b2e; word-break: break-all; }

.fmh-tag {
  padding: 3px 8px;
  font-size: 11px;
  color: #0e9e55;
  white-space: nowrap;
  background: rgba(23, 201, 100, .10);
  border: 1px solid rgba(23, 201, 100, .25);
  border-radius: 999px;
}

.fmh-note {
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.7;
  color: #7b8a83;
  background: #f6fbf8;
  border-left: 3px solid #17c964;
  border-radius: 0 8px 8px 0;
}

.fmh-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 12px;
  color: #93a29a;
  background: #fbfdfc;
  border-top: 1px solid #eef4f1;
}

.fmh-sep { color: #c9d6cf; }

@media (max-width: 860px) {
  .fmh-body { grid-template-columns: minmax(0, 1fr); }
  .fmh-pane { padding: 22px 18px; }
  .fmh-pane-client { border-left: 0; border-top: 1px solid var(--fmh-line); }
  .fmh-live { display: none; }
}

@media (max-width: 480px) {
  .task-login #layout-content.fmh-login { padding: 12px 12px 24px; }
  .fmh-card { border-radius: 14px; }
  .fmh-head { padding: 12px 14px; gap: 10px; }
  .fmh-brand-title { font-size: 15px; }
  .fmh-brand-sub { font-size: 11px; }
  .fmh-pane { padding: 18px 16px 16px; }
  .fmh-pane-client { padding-top: 16px; }
  .fmh-h2 { font-size: 16px; }
  .fmh-tip { margin-bottom: 14px; font-size: 12.5px; }
  .task-login #login-form tr { margin-bottom: 12px; }
  .task-login #login-form td.input { gap: 8px; }
  .task-login #login-form .form-control { height: 46px; font-size: 16px; }
  .task-login #login-form td.input .input-group-text { width: 46px; height: 46px; }
  .task-login #login-form .formbuttons { margin-top: 16px; }
  /* compact client settings: label/value on the left, tag on the right */
  .fmh-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    padding: 9px 0;
  }
  .fmh-k { grid-area: 1 / 1 / 2 / 2; font-size: 12px; }
  .fmh-v { grid-area: 2 / 1 / 3 / 2; font-size: 12.5px; }
  .fmh-tag { grid-area: 1 / 2 / 3 / 3; align-self: center; justify-self: end; }
  .fmh-note { margin-top: 12px; padding: 10px 12px; font-size: 11.5px; }
  .fmh-foot { padding: 9px 14px; font-size: 11px; }
}

/* ---------- global accents (mailbox UI) ---------- */
a { color: #0e9e55; }
a:hover { color: #0a7d46; }

.button.mainaction,
button.mainaction {
  background-image: linear-gradient(135deg, #17c964, #0e9e55 55%, #0a7d46);
  border-color: transparent;
}

html.dark-mode body.task-login { background: #0a1410; }
html.dark-mode .fmh-card { background: rgba(18, 30, 25, .97); }
html.dark-mode .fmh-h2 { color: #e6f3ec; }
html.dark-mode .fmh-pane-client { background: linear-gradient(180deg, #12201a, #0f1a15 70%); }

/* dark mode: keep secondary text readable */
html.dark-mode .fmh-k { color: #b9ccc3; }
html.dark-mode .fmh-v { color: #eaf6f0; }
html.dark-mode .fmh-tip { color: #a4b6ac; }
html.dark-mode .fmh-note { color: #4d5f57; }
html.dark-mode .fmh-row { border-bottom-color: rgba(255, 255, 255, .14); }

/* dark mode: inputs keep a light background, so force dark text */
html.dark-mode .task-login #login-form .form-control,
html.dark-mode .task-login #login-form .form-control:focus { color: #1f2d26 !important; }

html.dark-mode .task-login #login-form .form-control::placeholder { color: #7c8b83; }
