:root{
  /* Javatrip brand tokens (derived to match javatrip.se look & feel) */
  --brand-primary: #0f766e;
  --brand-primary-rgb: 15, 118, 110;
  --brand-secondary: #16a34a;
  --brand-secondary-rgb: 22, 163, 74;

  --primary-gradient: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  --accent-color: var(--brand-secondary);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: 1px solid rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  --dark-text: #0f172a;
  --light-text: #64748b;
  --muted-bg: #f1f5f9;
  --ring: rgba(15,118,110,.20);

  /* Bootstrap theme overrides */
  --bs-primary: var(--brand-primary);
  --bs-primary-rgb: 15,118,110;
  --bs-link-color: var(--brand-primary);
  --bs-link-hover-color: #0b5b53;
}

body{
  font-family: "Inter", sans-serif;
  background-color: var(--muted-bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(var(--brand-primary-rgb), 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(var(--brand-secondary-rgb), 0.12) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--dark-text);
  overflow-x: hidden;
}

/* Sidebar */
.sidebar{
  width: 270px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: rgba(255,255,255,.96);
  border-right: 1px solid #e2e8f0;
  z-index: 1050;
  transition: transform .25s ease;
}
.sidebar .brand-logo{
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dark-text);
  letter-spacing: -0.5px;
}

.brand-image{
  max-width: 160px;
  height: auto;
  display: block;
  filter: none;
}

/* Brand buttons */
.btn-primary{
  background: var(--primary-gradient);
  border: none;
}
.btn-primary:hover{
  filter: brightness(0.97);
}
.btn-outline-primary{
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.btn-outline-primary:hover{
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.nav-link{
  color: var(--light-text);
  font-weight: 600;
  padding: 0.75rem 1.15rem;
  border-radius: 10px;
  margin: 0.2rem 0.75rem;
  transition: all .18s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  user-select: none;
}
.nav-link i{ width: 24px; margin-right: 10px; opacity: .75; }
.nav-link:hover{
  background: #f8fafc;
  color: var(--dark-text);
}
.nav-link.active{
  background: #ecfdf5;
  color: var(--brand-primary);
  font-weight: 700;
  box-shadow: 0 0 0 3px var(--ring) inset;
}
.nav-link.active i{ opacity: 1; }

.nav-section-title{
  font-size: .70rem;
  letter-spacing: .08em;
  font-weight: 800;
  color: #94a3b8;
  margin: 1.1rem 1.1rem .4rem;
  text-transform: uppercase;
}

/* Main content */
.main-content{
  margin-left: 270px;
  padding: 1.75rem;
  min-height: 100vh;
}

/* Top bar (mobile + demo role switch) */
.topbar{
  position: sticky;
  top: 0;
  z-index: 1040;
  backdrop-filter: blur(12px);
  background: rgba(241,245,249,.72);
  border-bottom: 1px solid rgba(226,232,240,.8);
  padding: .75rem 1rem;
  margin: -1.75rem -1.75rem 1.5rem;
}
.topbar .btn{
  border-radius: 999px;
}

/* Views */
.view-section{ display: none; animation: fadeIn .22s ease-in-out; }
.view-section.active{ display: block; }
@keyframes fadeIn{
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Components */
.glass-card{
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.stat-card-value{ font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; }
.stat-card-label{ font-size: 0.88rem; color: var(--light-text); font-weight: 600; }

.table-custom{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-custom th{
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--light-text);
  font-weight: 800;
  padding: 1rem;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.table-custom td{
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.table-custom tr:last-child td{ border-bottom: none; }

.action-box{
  background: #0b1220;
  border-radius: 18px;
  padding: 1.75rem;
  color: white;
  position: relative;
  overflow: hidden;
}
.action-box:before{
  content:"";
  position:absolute;
  inset:-60px;
  background: radial-gradient(circle at 20% 20%, rgba(var(--brand-primary-rgb), .35), transparent 55%),
              radial-gradient(circle at 80% 30%, rgba(var(--brand-secondary-rgb), .28), transparent 55%),
              radial-gradient(circle at 50% 80%, rgba(34, 197, 94, .22), transparent 60%);
  filter: blur(20px);
  opacity: .9;
}
.action-box > *{ position: relative; }

.avatar{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(15,23,42,.12);
}

.pill{
  border-radius: 999px;
  font-weight: 700;
  padding: .25rem .75rem;
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(255,255,255,.65);
}

.badge-soft{
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  font-weight: 800;
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .78rem;
}

.form-hint{
  font-size: .86rem;
  color: var(--light-text);
}

/* Print */
@media print{
  .sidebar, .no-print, .topbar { display:none !important; }
  .main-content{ margin:0; padding:0; }
  body{ background:white; -webkit-print-color-adjust: exact; }
  .glass-card{ box-shadow:none; border: 1px solid #cbd5e1; break-inside: avoid; }
  .view-section{ display:none; }
  .view-section.active{ display:block; }
}

/* Responsive */
@media (max-width: 991px){
  .sidebar{ transform: translateX(-105%); }
  .sidebar.show{ transform: translateX(0); box-shadow: 0 20px 50px rgba(15,23,42,.22); }
  .main-content{ margin-left: 0; padding: 1.1rem; }
  .topbar{ margin: -1.1rem -1.1rem 1.1rem; }
}
.required-asterisk{ color:#dc3545; margin-left:2px; }
.required-note{ font-size:.82rem; color:#64748b; }
.items-table th{ font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:#64748b; font-weight:800; }
.btn-icon{ width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; border-radius:12px; }