/* ============================================================
   IMATA Payroll – Screen-specific styles
   ============================================================ */

/* ── Login screen ── */
.login-page {
  min-height: 100vh;
  display: flex;
}

.login-left {
  width: 480px;
  flex-shrink: 0;
  background: var(--navy-900);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* Decorative arcs on login left panel */
.login-arc {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(247,147,26,.15);
  pointer-events: none;
}

.login-left .login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.login-logo-tile {
  width: 44px;
  height: 44px;
  background: var(--orange-500);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-tile svg {
  width: 24px;
  height: 24px;
  stroke: var(--navy-900);
  fill: none;
  stroke-width: 1.75;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
}

.login-brand-name {
  font-size: 18px;
  font-weight: 700;
  color: #FFF;
}

.login-brand-sub {
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

.login-hero {
  position: relative;
  z-index: 1;
}

.login-hero h2 {
  font-size: 32px;
  font-weight: 700;
  color: #FFF;
  line-height: 1.2;
  margin-bottom: 16px;
}

.login-hero p {
  font-size: 15px;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
}

.login-left-footer {
  font-size: 12px;
  color: rgba(255,255,255,.3);
  position: relative;
  z-index: 1;
}

/* Login right */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--canvas);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 40px;
}

.login-card h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.login-card .login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.login-form .form-group { margin-bottom: 20px; }

.login-form .forgot-link {
  font-size: 13px;
  color: var(--orange-700);
  text-decoration: none;
}

.login-form .forgot-link:hover { text-decoration: underline; }

.password-field {
  position: relative;
}

.password-field input { padding-right: 44px; }

.password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
}

.password-toggle:hover { color: var(--text); }
.password-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; }

.btn-login {
  width: 100%;
  height: 48px;
  font-size: 15px;
  margin-top: 8px;
}

/* MFA screen */
.mfa-digits {
  display: flex;
  gap: 10px;
  margin: 24px 0;
}

.mfa-digit {
  flex: 1;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  transition: border-color 150ms;
}

.mfa-digit:focus {
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(247,147,26,.15);
  outline: none;
}

/* Password strength */
.strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength-seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 250ms;
}

.strength-0 .strength-seg { background: var(--border); }
.strength-1 .strength-seg:nth-child(1) { background: var(--danger); }
.strength-2 .strength-seg:nth-child(-n+2) { background: var(--warning); }
.strength-3 .strength-seg:nth-child(-n+3) { background: #FACC15; }
.strength-4 .strength-seg { background: var(--success); }

.strength-label {
  font-size: 12px;
  margin-top: 4px;
  color: var(--text-muted);
}

/* Responsive login */
@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { padding: 24px 16px; }
}

/* ── Dashboard screen specifics ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1279px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* KPI numbers smaller on mobile */
  .kpi-number { font-size: 24px !important; }
  .kpi-card   { padding: 16px; }
}

/* Timeline (payroll calendar) */
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child { border-bottom: none; }

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  margin-top: 5px;
  flex-shrink: 0;
}

.timeline-dot.orange { background: var(--orange-500); }
.timeline-dot.navy   { background: var(--navy-900); }
.timeline-dot.green  { background: var(--success); }

.timeline-line {
  width: 2px;
  background: var(--border);
  flex-shrink: 0;
  position: relative;
}

.timeline-content { flex: 1; }

.timeline-time {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.timeline-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Exception item */
.exception-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-chip);
  background: var(--surface-muted);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 150ms;
}

.exception-item:hover { background: var(--orange-50); }
[data-theme="dark"] .exception-item:hover { background: rgba(247,147,26,.07); }

.exception-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.exception-title { font-size: 13px; font-weight: 500; color: var(--text); flex: 1; }
.exception-sub   { font-size: 12px; color: var(--text-muted); }

/* ── Payslip (A4 print view) ── */
.payslip-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #FFF;
  padding: 0;
  font-size: 14px;
  color: #0F172A;
}

.payslip-masthead {
  background: var(--navy-900);
  padding: 32px 40px 24px;
  color: #FFF;
}

.payslip-masthead-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.payslip-company-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.payslip-company-sub {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin-top: 4px;
}

.payslip-confidential {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange-500);
  padding: 5px 12px;
  border: 1px solid rgba(247,147,26,.3);
  border-radius: 6px;
}

.payslip-accent-rule {
  height: 3px;
  background: var(--orange-500);
  border-radius: 2px;
  margin: 0 40px;
}

.payslip-employee-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
}

.payslip-field-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 4px;
}

.payslip-field-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.payslip-body {
  padding: 24px 40px;
}

.payslip-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 24px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.payslip-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
}

.payslip-table td {
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(226,232,240,.5);
}

.payslip-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.payslip-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
}

.net-pay-block {
  background: var(--navy-900);
  color: #FFF;
  border-radius: var(--radius-control);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0;
}

.net-pay-label {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255,255,255,.7);
}

.net-pay-amount {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--orange-500);
}

.payslip-footer {
  padding: 20px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.payslip-ref {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted);
}
