/* ═══════════════════════════════════════════════════════════════
   IT MANAGER PRO — Login / Register / Portal Page CSS
   Style: VIP Luxury Gold & Navy Blue
   ═══════════════════════════════════════════════════════════════ */

/* ── Page Layout ─────────────────────────────────────────────── */
.itmp-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  position: relative;
  font-family: var(--font-main);
}

/* ── Animated BG Particles ───────────────────────────────────── */
.itmp-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.itmp-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0.06;
  animation: floatUp 6s ease-in-out infinite;
}
.itmp-particle:nth-child(1) { width:80px; height:80px; left:10%; top:20%; animation-delay:0s; }
.itmp-particle:nth-child(2) { width:50px; height:50px; left:80%; top:10%; animation-delay:1s; }
.itmp-particle:nth-child(3) { width:120px;height:120px;left:60%; top:60%; animation-delay:2s; }
.itmp-particle:nth-child(4) { width:40px; height:40px; left:30%; top:80%; animation-delay:3s; }
.itmp-particle:nth-child(5) { width:90px; height:90px; left:5%;  top:50%; animation-delay:4s; }

/* ── Left Panel (Brand) ──────────────────────────────────────── */
.itmp-auth-left {
  flex: 1;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 50%, #0a1525 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
  position: relative;
  z-index: 1;
  border-right: 1px solid var(--navy-border);
}

/* Grid overlay */
.itmp-auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,175,55,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Corner accent lines */
.itmp-auth-left::after {
  content: '';
  position: absolute;
  top: 40px; left: 40px; right: 40px; bottom: 40px;
  border: 1px solid rgba(212,175,55,0.08);
  border-radius: var(--radius);
  pointer-events: none;
}

.itmp-brand-wrap {
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease;
}

.itmp-brand-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.4));
  margin-bottom: 24px;
  animation: floatUp 4s ease-in-out infinite;
}

.itmp-brand-logo-placeholder {
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--navy);
  box-shadow: 0 0 40px rgba(212,175,55,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  animation: floatUp 4s ease-in-out infinite;
}

.itmp-brand-title {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--gold-shine) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.itmp-brand-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 48px;
}

/* ── Portal Links (Cards trên màn hình Login) ────────────────── */
.itmp-portal-links {
  width: 100%;
  max-width: 380px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.itmp-portal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--white-dim);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.itmp-portal-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.itmp-portal-card:hover {
  background: rgba(212,175,55,0.1);
  border-color: rgba(212,175,55,0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  color: var(--white);
  text-decoration: none;
}
.itmp-portal-card:hover::before { transform: scaleX(1); }

.itmp-portal-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.itmp-portal-card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.itmp-portal-card-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── Right Panel (Form) ──────────────────────────────────────── */
.itmp-auth-right {
  width: 460px;
  min-width: 420px;
  background: linear-gradient(180deg, #111e38 0%, var(--navy-mid) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 48px;
  position: relative;
  z-index: 1;
  overflow-y: auto;
}

.itmp-form-wrap {
  width: 100%;
  animation: fadeInUp 0.6s ease;
}

.itmp-form-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.itmp-form-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ── Tabs (Login / Register switcher) ────────────────────────── */
.itmp-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 32px;
  border: 1px solid var(--navy-border);
}

.itmp-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.itmp-tab.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(212,175,55,0.3);
}

/* ── Form Checkbox ───────────────────────────────────────────── */
.itmp-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.itmp-checkbox-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  appearance: none;
  background: var(--white-faint);
  border: 1.5px solid var(--navy-border);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
}
.itmp-checkbox-wrap input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}
.itmp-checkbox-wrap input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.itmp-checkbox-label {
  font-size: 13px;
  color: var(--text-muted);
}
.itmp-checkbox-label a { color: var(--gold); text-decoration: none; }
.itmp-checkbox-label a:hover { text-decoration: underline; }

/* ── Forgot Password / Links ─────────────────────────────────── */
.itmp-form-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.itmp-form-link {
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  transition: var(--transition);
}
.itmp-form-link:hover { color: var(--gold-shine); text-decoration: underline; }

/* ── Submit Button Loading State ─────────────────────────────── */
.itmp-btn-submit {
  position: relative;
}
.itmp-btn-submit .itmp-spinner {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

/* ── Divider or ─────────────────────────────────────────────── */
.itmp-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.itmp-or-divider::before,
.itmp-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--navy-border);
}

/* ── Field validation ────────────────────────────────────────── */
.itmp-field-valid   .itmp-input { border-color: var(--success) !important; }
.itmp-field-invalid .itmp-input { border-color: var(--danger)  !important; }
.itmp-field-hint {
  font-size: 11.5px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.itmp-field-hint.valid   { color: #6fcf97; }
.itmp-field-hint.invalid { color: #f07070; }

/* ── Password Strength ───────────────────────────────────────── */
.itmp-pwd-strength {
  margin-top: 8px;
  display: flex;
  gap: 4px;
}
.itmp-pwd-bar {
  flex: 1; height: 4px;
  background: var(--navy-border);
  border-radius: 2px;
  transition: background 0.3s;
}
.itmp-pwd-bar.active-1 { background: #dc3545; }
.itmp-pwd-bar.active-2 { background: #ffc107; }
.itmp-pwd-bar.active-3 { background: #28a745; }
.itmp-pwd-bar.active-4 { background: #20c997; }

/* ── Footer ──────────────────────────────────────────────────── */
.itmp-auth-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--navy-border);
}
.itmp-auth-footer a { color: var(--gold); text-decoration: none; }
.itmp-auth-footer a:hover { color: var(--gold-shine); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .itmp-auth-page    { flex-direction: column; }
  .itmp-auth-left    { padding: 40px 24px; border-right: none; border-bottom: 1px solid var(--navy-border); }
  .itmp-auth-right   { width: 100%; min-width: unset; padding: 40px 24px; }
  .itmp-portal-links { grid-template-columns: repeat(3, 1fr); }
  .itmp-brand-title  { font-size: 24px; }
}

@media (max-width: 500px) {
  .itmp-portal-links { grid-template-columns: 1fr 1fr; }
  .itmp-auth-right   { padding: 30px 20px; }
}
