@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-dark: #090d16;
  --panel-bg: rgba(15, 23, 42, 0.75);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-glow: rgba(6, 182, 212, 0.15);

  --primary-cyan: #06b6d4;
  --primary-cyan-hover: #0891b2;
  --accent-teal: #10b981;
  --accent-purple: #8b5cf6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;

  --input-bg: rgba(30, 41, 59, 0.6);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus: #06b6d4;

  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  color: var(--text-main);
  overflow-x: hidden;
}

/* Container utama Work Order */
.wo-login-container {
  width: 100%;
  max-width: 960px;
  min-height: 540px;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 
    0 20px 40px -10px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(6, 182, 212, 0.08);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  overflow: hidden;
  position: relative;
}

/* SISI KIRI: HERO & WORK ORDER QUICK SEARCH */
.wo-hero-section {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--glass-border);
  overflow: hidden;
}

.wo-hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  animation: rotateGlow 20s linear infinite;
  pointer-events: none;
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.brand-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon-wrapper {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.25);
}

.brand-icon-wrapper svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--primary-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 16px 0;
  position: relative;
  z-index: 2;
}

.login-left-img {
  max-width: 100%;
  max-height: 250px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.login-left-img:hover {
  transform: scale(1.02);
}

.side-footer-info {
  position: relative;
  z-index: 2;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.system-status-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-teal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-teal);
}

/* SISI KANAN: FORM LOGIN */
.wo-form-section {
  padding: 28px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.form-header {
  margin-bottom: 18px;
}

.form-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: #fff;
}

.form-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.role-tabs {
  display: flex;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--glass-border);
  padding: 3px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  gap: 3px;
}

.role-tab-btn {
  flex: 1;
  padding: 7px 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.role-tab-btn.active {
  background: var(--primary-cyan);
  color: #fff;
  box-shadow: 0 3px 10px rgba(6, 182, 212, 0.35);
}

.role-tab-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.alert-banner {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fcd34d;
}

.alert-info {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #7dd3fc;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--text-sub);
  pointer-events: none;
  transition: var(--transition-fast);
}

.form-control {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px 9px 34px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-control::placeholder {
  color: var(--text-sub);
}

.form-control:focus {
  border-color: var(--primary-cyan);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-control:focus + .input-icon-left,
.input-wrapper:focus-within .input-icon-left {
  color: var(--primary-cyan);
}

.btn-toggle-eye {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-toggle-eye:hover {
  color: var(--text-main);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 0.78rem;
}

.remember-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
}

.remember-checkbox input[type="checkbox"] {
  accent-color: var(--primary-cyan);
  width: 14px;
  height: 14px;
  border-radius: 3px;
  cursor: pointer;
}

.forgot-link {
  color: var(--primary-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.forgot-link:hover {
  text-decoration: underline;
  color: #38bdf8;
}

.btn-login-submit {
  width: 100%;
  padding: 9px 14px;
  background: linear-gradient(135deg, var(--primary-cyan), #0284c7);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.25);
  transition: var(--transition-fast);
}

.btn-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.35);
  background: linear-gradient(135deg, #0891b2, #0369a1);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.demo-quick-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.demo-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  text-align: center;
}

.demo-buttons {
  display: flex;
  gap: 8px;
}

.btn-demo {
  flex: 1;
  padding: 6px 8px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.btn-demo:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--primary-cyan);
  color: #fff;
}

/* MODAL TRACK TIKET RESULT */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 520px;
  background: #0f172a;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: var(--transition-fast);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.btn-close-modal:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
  .wo-login-container {
    grid-template-columns: 1fr;
    max-width: 540px;
    min-height: auto;
  }
  .wo-hero-section {
    padding: 36px 28px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }
  .hero-heading {
    font-size: 1.75rem;
  }
  .wo-form-section {
    padding: 36px 28px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px;
  }
  .wo-hero-section, .wo-form-section {
    padding: 24px 20px;
  }
  .role-tabs {
    flex-direction: column;
  }
  .wo-stats-footer {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
