/* Smart Factory Chain - identidad visual del webmail (Roundcube Elastic) */

/* ---------- Logo dentro de la aplicación ---------- */
#layout-menu #logo,
#layout-menu .popover-header img {
  max-height: 3.4rem;
  width: auto;
  padding: .35rem 0;
}

/* ---------- Pantalla de inicio de sesión ---------- */
body.task-login {
  --sfc-bg: #0b1220;
  --sfc-card: rgba(15, 23, 42, .78);
  --sfc-line: rgba(45, 212, 191, .28);
  --sfc-text: #e2e8f0;
  --sfc-muted: #94a3b8;
  --sfc-cyan: #22d3ee;
  --sfc-teal: #2dd4bf;
  --sfc-lime: #a3e635;
  --sfc-grad: linear-gradient(100deg, #22d3ee 0%, #2dd4bf 55%, #a3e635 100%);

  min-height: 100vh;
  color: var(--sfc-text);
  background-color: var(--sfc-bg) !important;
  background-image:
    radial-gradient(60rem 40rem at 12% 8%, rgba(34, 211, 238, .16), transparent 60%),
    radial-gradient(50rem 36rem at 92% 96%, rgba(163, 230, 53, .12), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16.2v32.4L28 64.8 0 48.6V16.2Z M28 64.8V97' fill='none' stroke='%232dd4bf' stroke-opacity='.06' stroke-width='1'/%3E%3C/svg%3E") !important;
  background-attachment: fixed;
}

body.task-login #layout,
body.task-login #layout-content {
  background: transparent !important;
  color: var(--sfc-text);
}

body.task-login #layout-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem 1rem;
}

/* El logo genérico del skin se sustituye por la cabecera de marca */
body.task-login #layout-content > #logo {
  display: none !important;
}

body.task-login #login-form {
  width: 100%;
  max-width: 25rem;
  margin: 0 auto;
  top: auto !important;
  transform: none;
  padding: 2.25rem 2rem 1.5rem;
  background: var(--sfc-card);
  border: 1px solid var(--sfc-line);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .03) inset,
    0 24px 60px -20px rgba(0, 0, 0, .7),
    0 0 80px -30px rgba(45, 212, 191, .45);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: sfc-rise .5s ease-out both;
}

/* Cabecera de marca */
.sfc-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.sfc-brand-mark {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto .9rem;
  filter: drop-shadow(0 0 18px rgba(45, 212, 191, .45));
  animation: sfc-float 6s ease-in-out infinite;
}

.sfc-brand-name {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  background: var(--sfc-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sfc-brand-sub {
  margin-top: .35rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sfc-muted);
}

/* Campos */
body.task-login #login-form table,
body.task-login #login-form td {
  background: transparent !important;
  border: 0 !important;
}

body.task-login #login-form td.title,
body.task-login #login-form label {
  color: var(--sfc-muted);
}

body.task-login #login-form .input-group {
  margin-bottom: .2rem;
}

body.task-login #login-form .input-group-text,
body.task-login #login-form .input-group-prepend .input-group-text {
  background: rgba(255, 255, 255, .04) !important;
  border-color: rgba(148, 163, 184, .28) !important;
  color: var(--sfc-teal) !important;
}

body.task-login #login-form input.form-control {
  height: 2.75rem;
  background: rgba(255, 255, 255, .05) !important;
  border-color: rgba(148, 163, 184, .28) !important;
  color: var(--sfc-text) !important;
  caret-color: var(--sfc-teal);
}

body.task-login #login-form input.form-control::placeholder {
  color: #64748b;
  opacity: 1;
}

body.task-login #login-form input.form-control:focus {
  border-color: var(--sfc-teal) !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .22) !important;
  outline: 0;
}

body.task-login #login-form input:-webkit-autofill {
  -webkit-text-fill-color: var(--sfc-text);
  -webkit-box-shadow: 0 0 0 40px #111b2e inset;
  transition: background-color 9999s;
}

/* Botón */
body.task-login #rcmloginsubmit {
  width: 100%;
  height: 2.9rem;
  margin-top: .75rem;
  border: 0 !important;
  border-radius: 10px;
  background: var(--sfc-grad) !important;
  background-size: 160% 100% !important;
  background-position: 0 0 !important;
  color: #062a26 !important;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 10px 28px -12px rgba(45, 212, 191, .8);
  transition: background-position .35s ease, transform .15s ease, box-shadow .2s ease;
}

body.task-login #rcmloginsubmit:hover,
body.task-login #rcmloginsubmit:focus {
  background-position: 100% 0 !important;
  box-shadow: 0 14px 34px -12px rgba(163, 230, 53, .75);
}

body.task-login #rcmloginsubmit:active {
  transform: translateY(1px);
}

/* Pie */
body.task-login #login-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, .14);
  color: var(--sfc-muted) !important;
  font-size: .8rem;
  text-align: center;
}

body.task-login #login-footer a {
  color: #5eead4 !important;
}

@keyframes sfc-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes sfc-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  body.task-login #login-form,
  .sfc-brand-mark {
    animation: none;
  }
}

@media (max-width: 480px) {
  body.task-login #login-form {
    padding: 1.75rem 1.25rem 1.25rem;
    border-radius: 14px;
  }

  .sfc-brand-mark {
    width: 64px;
    height: 64px;
  }
}
