/* ---------------------------------------------------------------------------
   Find Teacher BD — webmail branding overlay.

   Injected into every SOGo page by nginx sub_filter. SOGo is GPL, so rebranding
   the interface is permitted; the upstream attribution in the About dialog and
   the source headers are left untouched, which is what the licence actually
   requires. This only restyles the chrome and swaps the marks.

   Everything here is additive CSS — no SOGo file is patched, so a package
   upgrade cannot break the app and at worst reverts the look.
   --------------------------------------------------------------------------- */

:root {
  --ftbd-pine: #1b5e4a;
  --ftbd-pine-bright: #2e8b6b;
  --ftbd-pine-tint: #e7f0eb;
  --ftbd-ink: #14251e;
  --ftbd-ink-soft: #516058;
  --ftbd-paper: #f3f5f2;
  --ftbd-line: #e1e7e2;
}

/* ---------- Login screen ---------- */

#loginScreen {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(46, 139, 107, 0.28), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(180, 121, 31, 0.18), transparent 55%),
    linear-gradient(160deg, #0f1f19 0%, #14251e 45%, #10201a 100%) !important;
  min-height: 100vh;
}

/* The brand mark, dropped in above the form. SOGo has no element for this, so
   it hangs off the login cell rather than requiring a template change. */
#loginCell::before {
  content: '';
  display: block;
  width: 100%;
  height: 46px;
  margin: 0 auto 22px;
  background-image: url('/SOGo/WebServerResources/img/ftbd-logo.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#loginCell {
  background: rgba(255, 255, 255, 0.97) !important;
  border-radius: 20px !important;
  padding: 34px 30px 30px !important;
  box-shadow:
    0 24px 60px -12px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  max-width: 400px !important;
  margin: 0 auto !important;
}

#loginCell input,
#loginScreen input[type='text'],
#loginScreen input[type='password'],
#loginScreen input[type='email'] {
  border-radius: 11px !important;
  border: 1px solid var(--ftbd-line) !important;
  background: #fff !important;
  padding: 12px 14px !important;
  font-size: 15px !important;
  color: var(--ftbd-ink) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#loginCell input:focus,
#loginScreen input:focus {
  border-color: var(--ftbd-pine) !important;
  box-shadow: 0 0 0 3px rgba(27, 94, 74, 0.16) !important;
  outline: none !important;
}

#loginCell .md-button,
#loginScreen button[type='submit'],
#loginScreen .md-button.md-primary {
  background: var(--ftbd-pine) !important;
  color: #fff !important;
  border-radius: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  text-transform: none !important;
  box-shadow: 0 6px 16px -6px rgba(27, 94, 74, 0.6) !important;
}

#loginCell .md-button:hover,
#loginScreen .md-button.md-primary:hover {
  background: var(--ftbd-pine-bright) !important;
}

/* Footer credit under the login card — replaces the default SOGo wordmark. */
#loginCell::after {
  content: 'Find Teacher BD Mail · findteacherbd.com';
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ftbd-ink-soft);
}

/* ---------- Application chrome ---------- */

/* Toolbars and the active-nav accent follow the brand green rather than
   SOGo's default blue. */
md-toolbar:not(.md-menu-toolbar),
.md-toolbar-tools,
#toolbar {
  background-color: var(--ftbd-pine) !important;
  color: #fff !important;
}

md-tabs-wrapper,
md-ink-bar {
  background-color: var(--ftbd-pine) !important;
}

.md-button.md-fab,
.md-button.md-primary.md-raised {
  background-color: var(--ftbd-pine) !important;
  color: #fff !important;
}

.md-primary md-ink-bar,
md-checkbox.md-checked .md-icon,
md-radio-button.md-checked .md-on {
  background-color: var(--ftbd-pine) !important;
}

a,
.md-primary {
  color: var(--ftbd-pine) !important;
}

/* Typography — SOGo ships Roboto; align with the product's stack while keeping
   a safe fallback chain since webmail loads no external fonts. */
body,
#loginScreen,
md-toolbar,
.md-button {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Hide the upstream product wordmark in the top-left of the app shell; the page
   title and favicon already carry our branding. */
#toolbar .sg-logo,
.sg-logo,
#leftPanel .md-toolbar-tools > .sg-logo {
  display: none !important;
}
