/* MBM Light Theme - minimal styles for the customer-login area */

:root {
  /* Prefer site-wide MBM palette when available; fallback to these values */
  --MBM-orange: rgb(255,102,0);
  --MBM-white: #ffffff;
  --MBM-dark: #1a1a1a;

  --bg: var(--MBM-white);
  --text: var(--MBM-dark);
  --muted: #666666;
  --accent: var(--MBM-orange); /* use MBM orange */
  --card: #f7f7f8;
  --border: #ececec;
  --input-bg: rgba(255,240,230,0.9); /* soft warm orange-ish background */
}

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 24px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--MBM-white);
  margin-top:14px;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(255,102,0,0.12);
  transition: transform 120ms ease, box-shadow 150ms ease, background-color 150ms ease, color 150ms ease;
}

.btn.small {
  padding: 6px 10px;
  font-size: 0.9rem;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(255,102,0,0.16);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(255,102,0,0.10);
}

.btn:focus-visible {
  outline: 2px solid rgba(255,102,0,0.35);
  outline-offset: 2px;
}

.login-root {
  display: flex;
  min-height: 70vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  padding: 28px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(20,20,20,0.06);
  border: 1px solid var(--border);
}

.login-card h1 {
  margin: 0 0 14px 0;
  font-size: 1.25rem;
}

.login-card label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  color: var(--muted);
}

.login-card input {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
}

/* Password visibility toggle */
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 44px; /* leave room for eye button */
}
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  height: 30px;
  width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #555;
  cursor: pointer;
  border-radius: 4px;
}
.pw-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.pw-toggle:hover {
  background: rgba(0,0,0,0.05);
}
.pw-toggle:active {
  transform: translateY(-50%) scale(0.98);
}
.pw-toggle:focus-visible {
  outline: 2px solid rgba(10,132,255,0.9);
  outline-offset: 2px;
}

/* Draw a diagonal strike-through when password is visible */
.pw-toggle.is-on::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  pointer-events: none;
  z-index: 1;
}

.login-card input:focus {
  outline: 2px solid rgba(255,102,0,0.25);
  box-shadow: 0 4px 12px rgba(255,102,0,0.08);
}

.error {
  background: #ffecec;
  padding: 10px;
  border: 1px solid #f5c2c2;
  border-radius: 6px;
}

.warning {
  background: #fff8e1;
  padding: 10px;
  border: 1px solid #ffc107;
  border-radius: 6px;
  margin-bottom: 16px;
}

.note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Logo above the form */
.mbm-logo {
  display: block;
  margin: 0 auto 14px auto;
  max-width: 160px;
}


.customer-brand {
  display: flex;
  margin: 6px 0 18px 0;
  justify-content: center;
}

.mbm-logo img {
  width: 100%;
  height: auto;
  display: block;
}

/* Dashboard */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Brand logo in header */
.dash-brand {
  display: inline-block;
  height: 100px;
}

.dash-brand img {
  height: 100%;
  width: auto;
  display: block;
}

.dash-main {
  margin-top: 10vh;

}

/* Title area inside main */
.dash-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px 0;
  font-size: 1.25rem;
}

.dash-of {
  color: var(--muted);
  font-weight: 500;
}

.customer-logo {
  max-height: 100px;
  width: auto;
  max-width:280px;
  display: inline-block;
  vertical-align: middle;
  opacity: 0;
  animation: fadeIn 500ms ease-out 120ms forwards;
}

.muted {
  color: var(--muted);
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 36px;
}

.project-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(6px);
  animation: fadeUp 400ms ease-out forwards;
}

.project-card h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
}

.year-heading {
  margin: 24px 0 8px 0;
  font-size: 1.1rem;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px dashed var(--border);
}

.file-list li:first-child {
  border-top: none;
}

.fname {
  font-size: 0.95rem;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 6px; /* minimal spacing between date and button */
}

.file-actions .btn.small {
  margin-top: 0; /* keep button vertically aligned with text */
}

.file-date {
  color: var(--muted);
  font-size: 0.8rem;
}

.subfolder {
  margin: 8px 0 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}

.subfolder-title {
  margin: 10px 0 4px 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Fade animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Staggered project card delays */
.projects-grid .project-card:nth-child(1)  { animation-delay: 60ms; }
.projects-grid .project-card:nth-child(2)  { animation-delay: 120ms; }
.projects-grid .project-card:nth-child(3)  { animation-delay: 180ms; }
.projects-grid .project-card:nth-child(4)  { animation-delay: 240ms; }
.projects-grid .project-card:nth-child(5)  { animation-delay: 300ms; }
.projects-grid .project-card:nth-child(6)  { animation-delay: 360ms; }
.projects-grid .project-card:nth-child(7)  { animation-delay: 420ms; }
.projects-grid .project-card:nth-child(8)  { animation-delay: 480ms; }
.projects-grid .project-card:nth-child(9)  { animation-delay: 540ms; }
.projects-grid .project-card:nth-child(10) { animation-delay: 600ms; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .customer-logo,
  .project-card { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  body {
    padding: 12px;
  }
  .login-card {
    padding: 18px;
  }
}
