/* ============================================================
   JETRANS ERP – Main Stylesheet
   Design: Dark Navy / Gold – Aviation Professional
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@500;600;700;800&display=swap');

:root {
  --navy:  #1e2d3d;
  --navy2: #2a3f55;
  --navy3: #152231;
  --gold:  #c8a84b;
  --goldl: #e8c96a;
  --goldp: #f5edcf;
  --bg:    #eef0f4;
  --white: #ffffff;
  --border:#d1d5db;
  --text:  #1a1a2e;
  --muted: #6b7280;
  --success:#16a34a;
  --danger: #dc2626;
  --info:   #0ea5e9;
  --font-body:'Barlow','Trebuchet MS',Arial,sans-serif;
  --font-head:'Barlow Condensed','Arial Narrow',Arial,sans-serif;
  --shadow: 0 4px 20px rgba(0,0,0,.12);
  --radius: 10px;
  --trans:  .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ───────────────────────────────── */
.erp-nav {
  background: var(--navy3);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,.4);
  flex-wrap: nowrap;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo-img {
  height: 32px;
  width: auto;
  display: block;
}
.brand-sub {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 1.5px;
  font-weight: 600;
  border-left: 1px solid rgba(255,255,255,.2);
  padding-left: 8px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 7px 14px;
  border-radius: 6px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--trans);
  border: 1px solid transparent;
}
.nav-link:hover, .nav-link.active {
  background: rgba(200,168,75,.15);
  color: var(--goldl);
  border-color: rgba(200,168,75,.3);
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
  flex-shrink: 0;
}
.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
}
.user-role {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: .8px;
  font-weight: 600;
  text-transform: uppercase;
}
.btn-logout {
  padding: 6px 12px;
  background: rgba(220,38,38,.15);
  border: 1px solid rgba(220,38,38,.35);
  color: #fca5a5;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--trans);
  white-space: nowrap;
}
.btn-logout:hover { background: rgba(220,38,38,.3); }

/* ── MAIN CONTENT ────────────────────────── */
.erp-main { flex: 1; padding: 28px 24px; max-width: 1200px; margin: 0 auto; width: 100%; }
.page-title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ── DASHBOARD GREETING ──────────────────── */
.dash-greeting {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.greet-text h1 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}
.greet-text p {
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.greet-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.15);
}

/* ── MODULE CARDS ────────────────────────── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.module-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  transition: transform var(--trans), box-shadow var(--trans);
  text-decoration: none;
  display: block;
  color: inherit;
}
.module-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
}
.module-card .card-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}
.module-card .card-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.module-card .card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.module-card .card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-top-green { border-top-color: #16a34a; }
.card-top-blue  { border-top-color: #0ea5e9; }
.card-top-purple{ border-top-color: #7c3aed; }
.card-top-red   { border-top-color: #dc2626; }

/* ── ADMIN NOTE ──────────────────────────── */
.admin-note {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.admin-note p { font-size: 13px; color: #0c4a6e; }
.admin-note a {
  padding: 8px 18px;
  background: var(--navy);
  color: var(--white);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--trans);
  white-space: nowrap;
}
.admin-note a:hover { background: var(--navy2); }

/* ── SECTION LABEL ───────────────────────── */
.section-label {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--gold);
}

/* ── DATA TABLE ──────────────────────────── */
.data-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 13px;
}
.data-table thead tr {
  background: var(--navy);
  color: var(--white);
}
.data-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 700;
  white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--trans); }
.data-table tbody tr:hover { background: #f8f9fb; }
.data-table td { padding: 11px 14px; }
.status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}
.status-draft    { background: #f3f4f6; color: #374151; }
.status-completed{ background: #dcfce7; color: #166534; }
.status-archived { background: #fef3c7; color: #92400e; }
.status-quoted   { background: #e0f2fe; color: #075985; }
.status-invoiced { background: #ede9fe; color: #5b21b6; }
.status-paid     { background: #dcfce7; color: #166534; }

/* ── FORM ELEMENTS ───────────────────────── */
.form-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.form-section-head {
  background: var(--navy);
  color: var(--white);
  padding: 10px 20px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
}
.form-section-body { padding: 20px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--muted);
  text-transform: uppercase;
}
.form-control {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--trans);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--goldp);
}
textarea.form-control { resize: vertical; min-height: 72px; }
select.form-control { cursor: pointer; }

/* ── BUTTONS ─────────────────────────────── */
.btn {
  padding: 9px 20px;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy2); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--goldl); }
.btn-success { background: var(--success); color: var(--white); }
.btn-danger  { background: var(--danger);  color: var(--white); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; letter-spacing: .5px; }

/* ── ALERTS ──────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* ── TOOLBAR ─────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  flex: 1;
}
.toolbar-search {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  min-width: 200px;
}
.toolbar-search:focus { outline: none; border-color: var(--gold); }

/* ── FOOTER ──────────────────────────────── */
.erp-footer {
  background: var(--navy3);
  color: rgba(255,255,255,.4);
  text-align: center;
  font-size: 11px;
  padding: 14px;
  letter-spacing: .5px;
}

/* ── LOGIN PAGE ──────────────────────────── */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy3) 0%, var(--navy) 60%, #2a3f55 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--white);
  border-radius: 14px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo-img { max-width: 220px; width: 100%; height: auto; display: block; margin: 0 auto 10px; }
.login-logo p { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-top: 4px; }
.login-form-group { margin-bottom: 16px; }
.login-form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.login-form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--trans);
}
.login-form-group input:focus { outline: none; border-color: var(--gold); background: var(--goldp); }
.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--trans);
  margin-top: 8px;
}
.login-btn:hover { opacity: .9; }
.login-divider {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0;
}

/* ── ANIMATIONS ──────────────────────────── */
@keyframes logoFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }
@keyframes fadeInUp  { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }

.anim-in { animation: fadeInUp .4s ease both; }
.anim-in-1 { animation-delay: .1s; }
.anim-in-2 { animation-delay: .2s; }
.anim-in-3 { animation-delay: .3s; }
.anim-in-4 { animation-delay: .4s; }

/* ── UTILITY ─────────────────────────────── */
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.fw-bold { font-weight: 700; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.w-100 { width: 100%; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  .erp-nav { padding: 0 14px; gap: 10px; }
  .brand-sub, .user-info { display: none; }
  .erp-main { padding: 16px 14px; }
  .dash-greeting { padding: 20px; }
  .greet-text h1 { font-size: 20px; }
  .modules-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
