/* MailOffice login — cPanel Webmail–style layout */
:root {
  --bg: #ffffff;
  --text: #2c2c2c;
  --muted: #5c5c5c;
  --border: #c9c9c9;
  --border-focus: #2095d0;
  --btn-blue: #2095d0;
  --btn-blue-hover: #1a7fb3;
  --brand-orange: #ff6c2c;
  --brand-orange-deep: #e85a1c;
  --icon: #8a8a8a;
  --font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 24px;
}

.brand {
  margin: 0 0 36px;
  font-size: 42px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.5px;
  color: var(--brand-orange);
  line-height: 1;
  user-select: none;
  cursor: default;
  display: inline-flex;
  gap: 0;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: transform 0.2s ease-out;
}

.brand .ch {
  display: inline-block;
  color: var(--brand-orange);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.35s ease,
    text-shadow 0.35s ease;
  animation: brand-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.brand:hover .ch,
.brand:focus-within .ch {
  color: var(--brand-orange-deep);
}

.brand .ch:hover {
  transform: translateY(-6px) scale(1.08);
  color: #ff8a4c;
  text-shadow: 0 8px 18px rgba(255, 108, 44, 0.35);
}

.brand.admin {
  font-style: italic;
}

.brand.admin .ch {
  animation-name: brand-in;
}

@keyframes brand-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand,
  .brand .ch {
    animation: none;
    transition: none;
    transform: none;
  }
}

.card {
  width: 100%;
  max-width: 360px;
  animation: card-in 0.5s ease 0.15s both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

.input-wrap {
  position: relative;
}

.input-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--icon);
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-wrap:focus-within .icon {
  color: var(--border-focus);
}

.input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 40px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.input-wrap input::placeholder {
  color: #9a9a9a;
}

.input-wrap input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px rgba(32, 149, 208, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  border: none;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.btn-primary {
  background: var(--btn-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--btn-blue-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.error {
  display: none;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #f5c2c7;
  background: #f8d7da;
  color: #842029;
  font-size: 13px;
  border-radius: 2px;
}

.error.show {
  display: block;
}

.footer {
  padding: 16px 20px 28px;
  text-align: center;
  font-size: 12px;
  color: #777;
}

.footer a {
  color: #555;
  text-decoration: none;
  margin: 0 4px;
}

.footer a:hover {
  text-decoration: underline;
}

.hint {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: #888;
}

.hint a {
  color: var(--btn-blue);
  text-decoration: none;
}

.hint a:hover {
  text-decoration: underline;
}
