/* ==========================================================================
   Base de Dadus Departementu Telnav - Custom Stylesheet
   Empresa Pública Administração de Aeroporto e Navegação Aerea de Timor-Leste ANATL, E.P
   Serviços Trafego Aéreo e Navegação - Departametu Telnav
   ========================================================================== */

/* --- Custom Variables / Design System --- */
:root {
  --anatl-navy: #0b2238;
  --anatl-navy-light: #163654;
  --anatl-blue: #0284c7;
  --anatl-blue-hover: #0369a1;
  --anatl-gold: #f59e0b;
  --anatl-gold-light: #fef3c7;
  --anatl-teal: #0d9488;
  --anatl-light: #f8fafc;
  --anatl-card-bg: #ffffff;
  --anatl-text-main: #1e293b;
  --anatl-text-muted: #64748b;
  --anatl-border: #e2e8f0;
  --anatl-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --anatl-shadow-md: 0 10px 25px -5px rgba(11, 34, 56, 0.08), 0 8px 10px -6px rgba(11, 34, 56, 0.04);
  --anatl-shadow-lg: 0 20px 35px -10px rgba(11, 34, 56, 0.15);
  --anatl-radius: 12px;
}

/* --- Dark Theme Variables --- */
[data-bs-theme="dark"] {
  --anatl-navy: #071524;
  --anatl-navy-light: #0f2b48;
  --anatl-card-bg: #0f172a;
  --anatl-light: #0b1120;
  --anatl-text-main: #f1f5f9;
  --anatl-text-muted: #94a3b8;
  --anatl-border: #334155;
  --anatl-shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

/* --- Base Body & Typography --- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--anatl-light);
  color: var(--anatl-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Header & Branding Banner --- */
.anatl-header {
  background: linear-gradient(135deg, var(--anatl-navy) 0%, var(--anatl-navy-light) 60%, #0284c7 100%);
  color: #ffffff;
  padding: 1.75rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.anatl-header::after {
  content: '';
  position: absolute;
  top: 0;
  right: -50px;
  width: 300px;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-img {
  max-height: 78px;
  width: auto;
  object-fit: contain;
  background: #ffffff;
  padding: 5px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
}

.brand-logo-img:hover {
  transform: scale(1.05);
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  color: #ffffff;
  text-align: center;
}

.brand-subtitle {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  color: #bae6fd;
  text-align: center;
}

.brand-badge {
  background-color: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--anatl-gold);
  color: var(--anatl-gold);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-top: 0.25rem;
}

/* Language Switcher Dropdown Styling */
.anatl-header .dropdown-menu {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  min-width: 180px;
}

.anatl-header .dropdown-item {
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.4rem 0.75rem;
  transition: all 0.2s ease;
}

.anatl-header .dropdown-item:hover, 
.anatl-header .dropdown-item.active {
  background-color: var(--anatl-blue);
  color: #ffffff;
}

/* --- Stat Summary Cards --- */
.stat-card {
  background: var(--anatl-card-bg);
  border: 1px solid var(--anatl-border);
  border-radius: var(--anatl-radius);
  padding: 1.25rem;
  box-shadow: var(--anatl-shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--anatl-shadow-md);
  border-color: var(--anatl-blue);
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon-primary {
  background-color: #e0f2fe;
  color: #0284c7;
}

.stat-icon-success {
  background-color: #dcfce7;
  color: #16a34a;
}

.stat-icon-warning {
  background-color: #fef3c7;
  color: #d97706;
}

.stat-icon-info {
  background-color: #ccfbf1;
  color: #0d9488;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--anatl-text-main);
}

.stat-label {
  font-size: 0.825rem;
  color: var(--anatl-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --- Form Card Styling --- */
.custom-card {
  background: var(--anatl-card-bg);
  border: 1px solid var(--anatl-border);
  border-radius: var(--anatl-radius);
  box-shadow: var(--anatl-shadow-md);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.custom-card-header {
  background: linear-gradient(to right, var(--anatl-navy), var(--anatl-navy-light));
  color: #ffffff;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-card-body {
  padding: 1.75rem;
}

/* --- Form Inputs Styling --- */
.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--anatl-text-main);
  margin-bottom: 0.4rem;
}

.form-label .required-star {
  color: #ef4444;
  margin-left: 2px;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--anatl-border);
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  background-color: var(--anatl-card-bg);
  color: var(--anatl-text-main);
  transition: all 0.2s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: var(--anatl-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
  outline: none;
}

.form-control[readonly] {
  background-color: rgba(148, 163, 184, 0.12);
  font-weight: 700;
  color: var(--anatl-blue);
}

.input-hint {
  font-size: 0.75rem;
  color: var(--anatl-text-muted);
  margin-top: 0.25rem;
}

/* --- Buttons & Animations --- */
.btn-anatl-primary {
  background-color: var(--anatl-blue);
  border-color: var(--anatl-blue);
  color: #ffffff;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-anatl-primary:hover, .btn-anatl-primary:focus {
  background-color: var(--anatl-blue-hover);
  border-color: var(--anatl-blue-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

.btn-anatl-secondary {
  background-color: transparent;
  border: 1px solid var(--anatl-border);
  color: var(--anatl-text-main);
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-anatl-secondary:hover {
  background-color: rgba(148, 163, 184, 0.15);
  color: var(--anatl-text-main);
}

.btn-anatl-success {
  background-color: #10b981;
  border-color: #10b981;
  color: #ffffff;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-anatl-success:hover {
  background-color: #059669;
  color: #ffffff;
}

/* --- Table Styling --- */
.table-responsive {
  border-radius: var(--anatl-radius);
}

.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--anatl-text-main);
}

.table-custom th {
  background-color: var(--anatl-navy);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  border: none;
  white-space: nowrap;
}

.table-custom th:first-child {
  border-top-left-radius: 8px;
}

.table-custom th:last-child {
  border-top-right-radius: 8px;
}

.table-custom td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--anatl-border);
  vertical-align: middle;
  font-size: 0.875rem;
}

.table-custom tbody tr {
  transition: background-color 0.2s ease;
}

.table-custom tbody tr:hover {
  background-color: rgba(2, 132, 199, 0.05);
}

/* --- Badges & Tags --- */
.badge-dept {
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;

[data-bs-theme="dark"] & {
  background-color: rgba(3, 105, 161, 0.3);
  color: #7dd3fc;
}
}

.badge-position {
  background-color: #fef3c7;
  color: #b45309;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.badge-contract {
  background-color: #dcfce7;
  color: #15803d;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

/* --- File Attachment Pill --- */
.attached-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: rgba(148, 163, 184, 0.12);
  border: 1px dashed var(--anatl-border);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--anatl-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

.attached-doc-badge:hover {
  background-color: rgba(2, 132, 199, 0.15);
  color: var(--anatl-blue-hover);
  text-decoration: underline;
}

/* --- Footer --- */
.anatl-footer {
  margin-top: auto;
  background-color: var(--anatl-navy);
  color: #94a3b8;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  border-top: 3px solid var(--anatl-gold);
}

/* --- Toast Notification Styling --- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1090;
}

/* --- Print Styling --- */
@media print {
  .anatl-header, .anatl-footer, .no-print, #employeeFormCard, .stat-card {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .custom-card {
    box-shadow: none !important;
    border: none !important;
  }
  .table-custom th {
    background-color: #f1f5f9 !important;
    color: #000000 !important;
  }
}

/* ==========================================================================
   LOGIN PORTAL & USER AUTHENTICATION STYLES
   ========================================================================== */

/* Fullscreen Login Portal Backdrop Overlay */
.login-portal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(11, 34, 56, 0.95) 0%, rgba(7, 21, 36, 0.98) 100%);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-portal-backdrop.d-none {
  display: none !important;
}

.login-portal-card {
  width: 100%;
  max-width: 480px;
  background: var(--anatl-card-bg);
  border: 1px solid var(--anatl-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.login-card-header {
  background: linear-gradient(135deg, var(--anatl-navy) 0%, var(--anatl-navy-light) 100%);
  padding: 1.75rem 1.5rem;
  border-bottom: 2px solid var(--anatl-gold);
}

.login-logo-img {
  max-height: 52px;
  width: auto;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* User Navbar Utilities */
.bg-white-10 {
  background-color: rgba(255, 255, 255, 0.12) !important;
}

.border-white-20 {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.text-sky {
  color: #bae6fd !important;
}

.text-navy {
  color: var(--anatl-navy) !important;
}

.btn-xs {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
}

/* Role Badges */
.role-badge-staff {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.role-badge-chefe {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.role-badge-admin {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* ==========================================================================
   EMPLOYEE PROFILE PHOTO & BIODATA STYLES
   ========================================================================== */

/* Profile Avatar Thumbnail in Table */
.profile-avatar-thumb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--anatl-blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  background-color: #ffffff;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-avatar-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.profile-avatar-fallback {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--anatl-navy) 0%, var(--anatl-blue) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid var(--anatl-gold);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

/* Profile Modal Large Photo Avatar */
.profile-avatar-lg {
  width: 128px;
  height: 128px;
  border-radius: 16px;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 25px rgba(11, 34, 56, 0.25);
  background-color: #ffffff;
  transition: transform 0.3s ease;
}

.profile-avatar-lg:hover {
  transform: scale(1.03);
}

.profile-avatar-lg-fallback {
  width: 128px;
  height: 128px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--anatl-navy) 0%, var(--anatl-navy-light) 60%, var(--anatl-blue) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2.8rem;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 25px rgba(11, 34, 56, 0.25);
}

/* Profile Banner Container inside Modal */
.profile-modal-banner {
  background: linear-gradient(135deg, var(--anatl-navy) 0%, var(--anatl-navy-light) 60%, #0284c7 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--anatl-shadow-md);
}

.profile-modal-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

/* Profile Section Box */
.biodata-section-card {
  background-color: var(--anatl-card-bg);
  border: 1px solid var(--anatl-border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--anatl-shadow-sm);
  transition: border-color 0.2s ease;
  height: 100%;
}

.biodata-section-card:hover {
  border-color: var(--anatl-blue);
}

.biodata-section-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--anatl-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 0.5rem;
  margin-bottom: 0.85rem;
  border-bottom: 2px solid rgba(2, 132, 199, 0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.biodata-item {
  margin-bottom: 0.65rem;
}

.biodata-item:last-child {
  margin-bottom: 0;
}

.biodata-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--anatl-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.biodata-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--anatl-text-main);
  word-break: break-word;
}

/* Form Photo Upload Preview */
.foto-upload-preview {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px dashed var(--anatl-blue);
  background-color: rgba(2, 132, 199, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.foto-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


