:root{
  --brand1:#14532d;
  --brand2:#d97706;
  --soft:#f5f6f1;
  --card:#ffffff;
  --ink:#1f2937;
  --muted:#6b7280;
  --shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

body{
  color: var(--ink);
}

.bg-soft{ background: var(--soft); }

.bg-gradient-primary{
  background: linear-gradient(135deg, rgba(13,110,253,1) 0%, rgba(32,201,151,1) 100%);
}

.card,
.hero-panel,
.metric-tile{
  border: 0;
  box-shadow: var(--shadow);
  border-radius: 16px;
}

.hero-panel{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  padding:28px;
  background:
    radial-gradient(circle at top right, rgba(217,119,6,.18), transparent 35%),
    linear-gradient(135deg, rgba(20,83,45,.10), rgba(255,255,255,.94));
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:700;
  color:var(--brand1);
  margin-bottom:10px;
}

.card .card-header{
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.has-sidebar{
  overflow-x:hidden;
}

.app-shell{
  min-height:100vh;
}

.app-sidebar{
  position:fixed;
  inset:0 auto 0 0;
  width:285px;
  padding:20px 16px;
  color:#fff;
  box-shadow: 0 10px 25px rgba(10, 24, 58, .16);
  overflow-y:auto;
  z-index:1030;
}

.sidebar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.sidebar-brand{
  color:#fff;
  text-decoration:none;
  font-weight:700;
  font-size:1.12rem;
}

.sidebar-brand:hover{
  color:#fff;
}

.sidebar-mobile-toggle{
  border-radius:12px;
}

.sidebar-user{
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:16px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
}

.sidebar-language-select,
.guest-language-select{
  border-radius:12px;
}

.sidebar-language-select{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
  color: #fff;
}

.sidebar-language-select:focus{
  border-color: rgba(255,255,255,.45);
  box-shadow: 0 0 0 .2rem rgba(255,255,255,.16);
}

.sidebar-language-select option{
  color: #111827;
}

.guest-language-select{
  min-width: 140px;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}

.guest-language-select:focus{
  border-color: rgba(255,255,255,.45);
  box-shadow: 0 0 0 .2rem rgba(255,255,255,.16);
}

.guest-language-select option{
  color:#111827;
}

.sidebar-nav-wrap{
  display:flex;
  flex-direction:column;
  min-height:calc(100vh - 150px);
}

.sidebar-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.sidebar-link,
.sidebar-group-toggle,
.sidebar-sublink{
  width:100%;
  border:0;
  text-decoration:none;
  text-align:left;
  color:rgba(255,255,255,.92);
  background:transparent;
  border-radius:14px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.sidebar-link,
.sidebar-group-toggle{
  display:flex;
  align-items:center;
  padding:12px 14px;
  font-weight:600;
}

.sidebar-link{
  justify-content:flex-start;
  gap:10px;
}

.sidebar-link i{
  min-width:18px;
}

.sidebar-group-toggle{
  justify-content:space-between;
}

.sidebar-group-toggle > span{
  display:flex;
  align-items:center;
}

.sidebar-link:hover,
.sidebar-group-toggle:hover,
.sidebar-sublink:hover{
  color:#fff;
  background: rgba(255,255,255,.12);
}

.sidebar-link.active,
.sidebar-group-toggle:not(.collapsed){
  color:#fff;
  background: rgba(255,255,255,.16);
}

.sidebar-group{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.sidebar-group-toggle .bi-chevron-down{
  transition: transform .2s ease;
}

.sidebar-group-toggle:not(.collapsed) .bi-chevron-down{
  transform: rotate(180deg);
}

.sidebar-subnav{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:2px 0 2px 12px;
}

.sidebar-sublink{
  display:block;
  padding:10px 14px;
  font-size:.95rem;
}

.sidebar-sublink.active{
  color:#fff;
  background: rgba(255,255,255,.18);
}

.sidebar-footer{
  margin-top:auto;
  padding-top:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.sidebar-logout{
  display:flex;
  align-items:center;
  justify-content:center;
}

.app-content{
  margin-left:285px;
  width:calc(100% - 285px);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.app-content main{
  flex:1;
}

.badge-soft{
  background: rgba(20,83,45,.08);
  color: var(--brand1);
  border: 1px solid rgba(20,83,45,.18);
}

.kpi{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.kpi .icon{
  width:48px;height:48px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background: rgba(20,83,45,.12);
}
.kpi .icon i{ font-size: 1.4rem; color: var(--brand1); }

.metric-tile{
  height:100%;
  padding:18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,1)),
    linear-gradient(135deg, rgba(20,83,45,.08), rgba(217,119,6,.05));
}

.metric-tile .label{
  font-size:.82rem;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.06em;
}

.metric-tile .value{
  font-size:1.35rem;
  font-weight:700;
  margin-top:8px;
}

.metric-tile.accent{
  background:
    linear-gradient(180deg, rgba(255,247,237,.96), rgba(255,255,255,1)),
    linear-gradient(135deg, rgba(217,119,6,.16), rgba(20,83,45,.05));
}

.table thead th{
  white-space: nowrap;
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.table tbody td{
  vertical-align: middle;
}

.form-control, .form-select{
  border-radius: 12px;
}
.btn{
  border-radius: 12px;
}
.navbar .nav-link.active{
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Vortex Overlay (PowerPoint-like vibe) */
.vortex-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background: radial-gradient(circle at center, rgba(255,255,255,.08) 0%, rgba(0,0,0,.86) 55%, rgba(0,0,0,.96) 100%);
  backdrop-filter: blur(6px);
}
.vortex-center{
  position:relative;
  width: 320px;
  height: 320px;
}
.vortex-ring{
  position:absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 0 60px rgba(20,83,45,.22);
  transform: rotate(0deg) scale(1);
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.35));
}
.vortex-ring.r1{ animation: vortexSpin 900ms linear infinite; }
.vortex-ring.r2{ inset: 18px; border-color: rgba(217,119,6,.22); animation: vortexSpin 1100ms linear infinite reverse; }
.vortex-ring.r3{ inset: 40px; border-color: rgba(255,255,255,.14); animation: vortexSpin 1300ms linear infinite; }
.vortex-ring.r4{ inset: 70px; border-color: rgba(20,83,45,.24); animation: vortexPulse 900ms ease-in-out infinite; }

.vortex-glow{
  position:absolute;
  inset: 105px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(217,119,6,.18) 0%, rgba(20,83,45,.12) 40%, rgba(0,0,0,0) 70%);
  animation: glow 900ms ease-in-out infinite;
}

.vortex-text{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  text-align:center;
}

@keyframes vortexSpin{
  from { transform: rotate(0deg) scale(1); }
  to   { transform: rotate(360deg) scale(1); }
}
@keyframes vortexPulse{
  0%,100% { transform: rotate(0deg) scale(1); opacity: .85; }
  50%     { transform: rotate(45deg) scale(1.05); opacity: 1; }
}
@keyframes glow{
  0%,100% { opacity: .75; }
  50%     { opacity: 1; }
}

.vortex-fadeout{
  animation: fadeOut 650ms ease forwards;
}
@keyframes fadeOut{
  to{ opacity: 0; visibility: hidden; }
}

@media (max-width: 768px){
  .hero-panel{
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 992px){
  .sidebar-nav-wrap{
    display:flex !important;
  }
}

@media (max-width: 991.98px){
  .app-sidebar{
    position:relative;
    width:100%;
    inset:auto;
    border-radius:0 0 22px 22px;
  }

  .sidebar-nav-wrap{
    min-height:auto;
  }

  .app-content{
    margin-left:0;
    width:100%;
  }
}
