/* XG Internet branding for Roundcube (works with the "xg" skin, which extends Elastic) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

body, .popupmenu, .ui-dialog, input, button, select, textarea { font-family: 'DM Sans', system-ui, sans-serif !important; }

/* =========================== Login page =========================== */
body.task-login { background: #FAF7F4 !important; }
body.task-login #layout-content.xg-login {
  display: block !important; padding: 0 !important; margin: 0 !important; background: transparent !important;
  height: 100vh; overflow: auto; max-width: none !important; width: 100% !important;
}
.xg-shell { display: flex; min-height: 100vh; }

/* left brand panel */
.xg-brand {
  flex: 1 1 52%; background: #07162D; color: #fff; padding: 44px 56px;
  display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.xg-brand::before {
  content: ''; position: absolute; right: -180px; top: -180px; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,87,29,.45), rgba(233,87,29,0) 65%);
}
.xg-brand::after {
  content: ''; position: absolute; left: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.07); box-shadow: 0 0 0 60px rgba(255,255,255,.02), 0 0 0 120px rgba(255,255,255,.015);
}
.xg-brand > * { position: relative; z-index: 1; }
.xg-brand-top { display: flex; align-items: center; gap: 14px; }
.xg-logo { width: 56px; height: 56px; background: #fff; border-radius: 14px; display: grid; place-items: center; padding: 6px; flex-shrink: 0; }
.xg-logo img { width: 100%; height: 100%; object-fit: contain; }
.xg-name { font-weight: 700; font-size: 20px; line-height: 1.1; }
.xg-sub { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: #9FB0C5; margin-top: 4px; }
.xg-eyebrow { color: #F4AD3D; font-size: 12px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; }
.xg-hero h2 { font-size: 46px; line-height: 1.08; font-weight: 800; margin: 14px 0 16px; letter-spacing: -1px; color: #fff; }
.xg-hero h2 span { color: #E9571D; }
.xg-hero p { color: #CBD5E1; font-size: 16px; line-height: 1.6; max-width: 420px; margin: 0; }
.xg-hero ul { list-style: none; padding: 0; margin: 30px 0 0; }
.xg-hero li { position: relative; padding-left: 30px; margin: 12px 0; color: #E2E8F0; font-size: 15px; }
.xg-hero li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(233,87,29,.18); border: 2px solid #E9571D;
}
.xg-brand-foot { color: #64748B; font-size: 12px; }

/* right sign-in panel */
.xg-panel { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 40px 28px; background: #FAF7F4; }
body.task-login #login-form {
  width: 100%; max-width: 380px; margin: 0 !important; padding: 0 !important;
  background: transparent !important; box-shadow: none !important; border: 0 !important;
}
.xg-title { font-size: 30px; font-weight: 800; color: #07162D; margin: 0 0 6px; letter-spacing: -.5px; }
.xg-hint { color: #64748B; font-size: 14px; line-height: 1.5; margin: 0 0 26px; }
.xg-hint b { color: #334155; }
body.task-login #login-form table { width: 100%; }
body.task-login #login-form table td { padding: 0 0 14px !important; }
body.task-login #login-form td.title { display: none; }
body.task-login #login-form .input-group-prepend .input-group-text,
body.task-login #login-form .input-group-text {
  background: #fff !important; border: 1.5px solid #E5E7EB !important; border-right: 0 !important;
  border-radius: 12px 0 0 12px !important; color: #94A3B8 !important; padding: 0 14px !important;
}
body.task-login #login-form input.form-control {
  background: #fff !important; border: 1.5px solid #E5E7EB !important; border-left: 0 !important;
  border-radius: 0 12px 12px 0 !important; padding: 13px 14px 13px 4px !important; height: auto !important;
  font-size: 15px !important; color: #111820 !important; box-shadow: none !important;
}
body.task-login #login-form .input-group:focus-within .input-group-text,
body.task-login #login-form .input-group:focus-within input.form-control { border-color: #E9571D !important; }
body.task-login #login-form .input-group:focus-within { box-shadow: 0 0 0 3px rgba(233,87,29,.14); border-radius: 12px; }
body.task-login #rcmloginsubmit {
  width: 100%; background: #E9571D !important; border: 0 !important; border-radius: 12px !important;
  font-size: 16px !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: .3px;
  padding: 14px !important; margin-top: 6px; box-shadow: 0 8px 20px rgba(233,87,29,.28) !important;
}
body.task-login #rcmloginsubmit:hover { background: #D94C16 !important; }
body.task-login #login-footer { font-size: 13px !important; color: #64748B !important; margin-top: 24px !important; text-align: center; }
body.task-login #login-footer a { color: #E9571D !important; font-weight: 600; text-decoration: none; }
body.task-login #logo { display: none; }

@media (max-width: 860px) {
  .xg-shell { flex-direction: column; }
  .xg-brand { flex: none; padding: 22px 22px 26px; }
  .xg-brand::before { width: 360px; height: 360px; right: -140px; top: -160px; }
  .xg-brand::after, .xg-hero ul, .xg-brand-foot { display: none; }
  .xg-hero { margin-top: 20px; }
  .xg-hero h2 { font-size: 28px; margin: 8px 0 8px; }
  .xg-hero p { font-size: 14px; }
  .xg-panel { flex: 1; align-items: flex-start; padding: 28px 20px 40px; }
  .xg-title { font-size: 24px; }
}

/* =========================== Inside the mailbox =========================== */
#layout-menu { background: #07162D !important; }
#layout-menu .menu a, #layout-menu .popover-header { color: #CBD5E1 !important; }
#layout-menu .menu a:hover, #layout-menu .menu a.selected { color: #fff !important; background: rgba(255,255,255,.08) !important; }
#layout-menu .menu a.selected { box-shadow: inset 3px 0 0 #E9571D; }
#layout-menu #logo { background: #fff; border-radius: 12px; padding: 4px; max-width: 64px; }
.btn-primary, .button.mainaction, a.button.mainaction, button.mainaction {
  background-color: #E9571D !important; border-color: #E9571D !important; color: #fff !important;
}
.btn-primary:hover, .button.mainaction:hover { background-color: #D94C16 !important; border-color: #D94C16 !important; }
.listing li.selected, table.records-table tr.selected td { background-color: #FFF1EA !important; }
.listing li.selected > a, table.records-table tr.selected td { color: #07162D !important; }

.xg-brand, .xg-hero, .xg-hero p, .xg-hero ul, .xg-hero li, .xg-brand-foot { text-align: left !important; }
.xg-hero p { margin-left: 0 !important; }body.task-login #login-form { top: 0 !important; position: static !important; }