/* Login-specific styles extracted from the main skin stylesheet. */

#layout-content.hg-login,
#layout-content.hg-login * { box-sizing: border-box; }

#layout-content.hg-login {
  position: fixed; inset: 0; margin: 0; padding: 0;
  width: 100%; height: 100%;
  background: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  display: block !important;
}

.hg-wrap { display: flex; height: 100%; overflow: hidden; }

.hg-left {
  width: 50%; height: 100%; position: relative; overflow: hidden;
  background-image: url('../images/background.png');
  background-size: cover; background-position: center 72%; background-repeat: no-repeat;
}
.hg-left-overlay {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(2,7,20,.90) 0%, rgba(4,13,38,.82) 30%, rgba(4,14,42,.45) 55%, rgba(2,8,28,.20) 75%, rgba(1,5,18,.30) 100%);
}
.hg-left-inner {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 32px 44px 24px; overflow: hidden;
}
.hg-left-top { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.hg-headline { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.hg-headline h1 { font-size: clamp(22px,2.8vw,44px); font-weight: 800; line-height: 1.08; color: #fff; letter-spacing: -0.025em; margin: 0; }
.hg-headline h1 .hg-accent { color: #3b82f6; }
.hg-headline p  { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.66); max-width: 420px; margin: 0; }
.hg-benefits { display: flex; flex-direction: column; gap: 6px; }
.hg-benefit  { display: flex; align-items: center; gap: 12px; }
.hg-benefit-icon { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(59,130,246,.14); border: 1px solid rgba(59,130,246,.28); }
.hg-benefit-title { font-size: 13px; font-weight: 700; color: #fff; margin: 0 0 1px; }
.hg-benefit-desc  { font-size: 11.5px; color: rgba(255,255,255,.56); line-height: 1.4; margin: 0; }
.hg-stat-bar { flex-shrink: 0; display: flex; align-items: center; background: rgba(255,255,255,.07); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px 16px; margin-top: 12px; }
.hg-stat-item { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; overflow: hidden; }
.hg-stat-item-wide { flex: 1.2; }
.hg-stat-icon { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(59,130,246,.18); }
.hg-stat-text { min-width: 0; }
.hg-stat-label { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.hg-stat-sublabel { font-size: 10px; color: rgba(255,255,255,.48); margin: 1px 0 0; white-space: nowrap; }
.hg-stat-sep { width: 1px; height: 28px; background: rgba(255,255,255,.14); flex-shrink: 0; margin: 0 8px; }

.hg-right { width: 50%; height: 100%; overflow-y: auto; background: #fff; display: flex; flex-direction: column; align-items: center; padding: 60px 40px 48px; position: relative; }
.hg-right-inner { width: 100%; max-width: 420px; margin: auto; display: flex; flex-direction: column; }
.hg-logo { margin-bottom: 28px; }
.hg-logo img { height: 44px; width: auto; max-width: 320px; object-fit: contain; object-position: left center; display: block; }
.hg-title-block { margin-bottom: 26px; }
.hg-title-block h2 { font-size: 29px; font-weight: 800; color: #111827; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 9px; }
.hg-title-block p  { font-size: 14px; color: #6b7280; line-height: 1.58; margin: 0; }

body.task-login #messagestack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: -8px 0 20px;
}

body.task-login #messagestack:empty {
  display: none;
  margin: 0;
}

/* Roundcube muestra un aviso transitorio de tipo "loading" al enviar el
   formulario. En el login no aporta información útil y desplaza el contenido;
   los errores, confirmaciones y avisos reales permanecen visibles. */
body.task-login #messagestack > div.loading {
  display: none !important;
}

body.task-login #messagestack:has(> div.loading:only-child) {
  display: none !important;
  margin: 0;
}

body.task-login #messagestack > div {
  position: relative;
  min-height: 46px;
  margin: 0;
  padding: 13px 42px 13px 44px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: none;
}

body.task-login #messagestack > div::before {
  content: '!';
  position: absolute;
  top: 13px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

body.task-login #messagestack > div.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

body.task-login #messagestack > div.error::before {
  background: #dc2626;
}

body.task-login #messagestack > div.notice,
body.task-login #messagestack > div.confirmation {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

body.task-login #messagestack > div.notice::before,
body.task-login #messagestack > div.confirmation::before {
  content: 'i';
  background: #2563eb;
}

body.task-login #messagestack a {
  color: inherit;
  font-weight: 700;
}

body.task-login #messagestack .close,
body.task-login #messagestack .button.close {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 0;
  opacity: .65;
  transform: translateY(-50%);
}

body.task-login #messagestack .close::after,
body.task-login #messagestack .button.close::after {
  content: '\00d7';
  font-size: 19px;
  font-weight: 500;
}

.hg-form   { display: flex; flex-direction: column; gap: 18px; }
.hg-field  { display: flex; flex-direction: column; gap: 7px; }
.hg-field label { font-size: 13.5px; font-weight: 600; color: #374151; }
.hg-field-label-row { display: flex; align-items: center; justify-content: space-between; }
.hg-link { font-size: 13px; color: #2563eb; font-weight: 500; text-decoration: none; }
.hg-link:hover, .hg-link-strong:hover { opacity: 0.78; }
.hg-input-wrap { position: relative; display: flex; align-items: center; }
.hg-input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; display: flex; align-items: center; }
.hg-input { width: 100%; padding: 12px 14px 12px 40px; border: 1.5px solid #e5e7eb; border-radius: 10px; font-size: 14px; color: #111827; font-family: inherit; background: #f9fafb; transition: border-color .18s, box-shadow .18s, background .18s; }
.hg-input-pwd { padding-right: 44px; }
.hg-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.13); background: #fff; }
.hg-eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; opacity: 0.7; transition: opacity .15s; }
.hg-eye-btn:hover { opacity: 1; }
.hg-remember { display: flex; align-items: center; gap: 10px; }
.hg-remember label { font-size: 14px; color: #374151; cursor: pointer; user-select: none; }
.hg-check { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex-shrink: 0; border: 1.5px solid #d1d5db; border-radius: 5px; background: #fff; cursor: pointer; position: relative; transition: background .15s, border-color .15s; margin: 0; }
.hg-check:checked { background: #2563eb; border-color: #2563eb; }
.hg-check:checked::after { content: ''; position: absolute; inset: 0; width: 5px; height: 9px; margin: auto; margin-top: 2px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg); }
.hg-btn { width: 100%; padding: 14px 24px; background: #2563eb; color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; letter-spacing: .01em; box-shadow: 0 4px 14px rgba(37,99,235,.28); transition: background .18s, box-shadow .18s, transform .1s; }
.hg-btn:hover  { background: #1d4ed8; box-shadow: 0 6px 20px rgba(37,99,235,.38); }
.hg-btn:active { background: #1e40af; transform: scale(.99); }
.hg-btn:disabled { opacity: 0.7; cursor: default; }
.hg-secure-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: -4px; }
.hg-secure-note span { font-size: 12.5px; color: #b0b7c3; letter-spacing: .01em; }
.hg-whatsapp-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hg-whatsapp-row span { font-size: 13.5px; color: #374151; }
.hg-link-strong { font-size: 13.5px; color: #2563eb; font-weight: 700; text-decoration: none; }
.hg-divider { height: 1px; background: #f3f4f6; margin: 22px 0; }
.hg-plans { text-align: center; }
.hg-plans p { font-size: 13px; color: #9ca3af; margin: 0 0 6px; }

@media (max-width: 900px) {
  body.task-login {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    background: #020817;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  body.task-login #layout {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    background: #020817;
    overflow: visible !important;
  }
  #layout-content.hg-login {
    position: static;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
    background: #020817;
  }
  .hg-wrap {
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
    background: #020817;
  }
  .hg-left {
    width: 100%;
    min-height: 250px;
    height: 250px;
    flex: 0 0 250px;
    background-position: center 72%;
  }
  .hg-left-inner { display: none; }
  .hg-right {
    width: calc(100% - 36px);
    height: auto;
    margin: 0 18px 18px;
    padding: 52px 28px 44px;
    border-radius: 26px;
    overflow: visible;
  }
  .hg-right-inner {
    max-width: 520px;
    margin: 0 auto;
  }
  .hg-logo {
    position: absolute;
    top: -164px;
    left: 50%;
    z-index: 2;
    width: min(78vw, 360px);
    margin: 0;
    transform: translateX(-50%);
  }
  .hg-logo img {
    content: url('../images/hostingroupmail-dark.png');
    width: 100%;
    height: auto;
    max-width: 360px;
    object-position: center;
  }
}
@media (max-width: 540px) {
  .hg-left {
    min-height: 182px;
    height: 182px;
    flex-basis: 182px;
  }
  .hg-right {
    width: calc(100% - 28px);
    margin: 0 14px 14px;
    padding: 42px 28px 38px;
    border-radius: 24px;
  }
  .hg-logo {
    top: -128px;
    width: min(82vw, 330px);
  }
}
