.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:.25s ease;
  z-index:6998;
}

.overlay.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.shell{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:280px;
  flex:0 0 280px;
  background:linear-gradient(180deg, rgba(11,18,28,.96), rgba(9,14,22,.96));
  border-right:1px solid var(--stroke);
  padding:18px 14px;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  z-index:7000;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  margin-bottom:18px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--stroke);
}

.brand img{
  width:44px;
  height:44px;
  object-fit:contain;
}

.brand-title{
  font-size:15px;
  font-weight:700;
  line-height:1.2;
}

.brand-sub{
  font-size:11px;
  color:var(--muted);
  margin-top:2px;
}

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

.nav-group-label{
  font-size:11px;
  color:var(--muted);
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:6px 10px;
}

.nav-link{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  padding:12px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid transparent;
  transition:.2s ease;
}

.nav-link:hover{
  background:rgba(255,255,255,.05);
  border-color:var(--stroke);
}

.nav-link.active{
  background:linear-gradient(135deg, rgba(51,189,228,.22), rgba(25,158,196,.18));
  border-color:rgba(51,189,228,.30);
}

.nav-icon{
  width:38px;
  height:38px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.05);
  flex:0 0 38px;
}

.nav-meta{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.nav-title{
  font-size:14px;
  font-weight:600;
  line-height:1.2;
}

.nav-sub{
  font-size:11px;
  color:var(--muted);
  line-height:1.2;
  margin-top:3px;
}

.main{
  flex:1;
  min-width:0;
  overflow:visible;
}

.topbar{
  position:sticky;
  top:0;
  z-index:6000;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 18px;
  background:rgba(8,12,20,.86);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--stroke);
}

.topbar-left,
.topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.topbar-right{
  position:relative;
  overflow:visible;
}

.burger,
.icon-btn{
  border:none;
  cursor:pointer;
  text-decoration:none;
  color:var(--text);
  background:rgba(255,255,255,.05);
  border:1px solid var(--stroke);
  border-radius:14px;
  min-width:42px;
  height:42px;
  display:grid;
  place-items:center;
  transition:.2s ease;
}

.burger:hover,
.icon-btn:hover{
  background:rgba(255,255,255,.08);
}

.profile-menu-wrap{
  position:relative;
  overflow:visible;
  z-index:6100;
}

.user-pill{
  display:flex;
  align-items:center;
  gap:10px;
  border:none;
  cursor:pointer;
  color:var(--text);
  background:rgba(255,255,255,.05);
  border:1px solid var(--stroke);
  border-radius:999px;
  padding:7px 12px 7px 8px;
  min-height:44px;
}

.user-avatar,
.profile-dd-avatar{
  width:38px;
  height:38px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--gold),var(--gold-2));
  color:#111;
  font-weight:800;
  flex:0 0 38px;
}

.user-meta{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1.15;
}

.user-name{
  font-size:13px;
  font-weight:700;
}

.user-role{
  font-size:11px;
  color:var(--muted);
}

.profile-dropdown{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:320px;
  max-width:min(92vw,320px);
  background:linear-gradient(180deg, rgba(17,27,43,.98), rgba(11,18,29,.98));
  border:1px solid var(--stroke);
  border-radius:20px;
  box-shadow:var(--shadow);
  z-index:99999;
  overflow:hidden;

  opacity:0;
  visibility:hidden;
  transform:translateY(10px) scale(.98);
  pointer-events:none;
  transition:
    opacity .18s ease,
    transform .18s ease,
    visibility .18s ease;
}

.profile-dropdown.open{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
  pointer-events:auto;
}

.profile-dd-head{
  padding:16px;
  border-bottom:1px solid var(--stroke);
}

.profile-dd-name-row{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.profile-dd-user-meta{
  min-width:0;
}

.profile-dd-name{
  font-size:15px;
  font-weight:700;
}

.profile-dd-label{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

.profile-dd-package{
  display:inline-block;
  margin-top:8px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(244,196,48,.12);
  border:1px solid rgba(244,196,48,.20);
  font-size:11px;
  font-weight:700;
}

.profile-dd-status{
  margin-top:8px;
  font-size:12px;
  font-weight:600;
}

.profile-dd-status.approved{
  color:var(--success);
}

.profile-dd-status.pending{
  color:var(--warn);
}

.profile-dd-section{
  padding:12px 14px;
  border-top:1px solid rgba(255,255,255,.04);
}

.profile-dd-section-title{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--muted);
  margin-bottom:8px;
}

.profile-dd-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  text-decoration:none;
  padding:10px 12px;
  border-radius:12px;
  margin-bottom:6px;
  background:rgba(255,255,255,.03);
  color:var(--text);
}

.profile-dd-link:hover{
  background:rgba(255,255,255,.06);
}

.profile-dd-link--logout{
  color:#ffb4b4;
}

.page-wrap{
  width:100%;
  padding:24px 18px 40px;
  box-sizing:border-box;
}

.page-shell{
  width:min(1280px, 100%);
  margin:0 auto;
}

.content-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.65fr) minmax(280px, .95fr);
  gap:20px;
  align-items:start;
}

.panel{
  position:relative;
  background:linear-gradient(180deg, rgba(20,24,34,.96), rgba(13,16,24,.94));
  border:1px solid rgba(255,255,255,.08);
  border-radius:22px;
  box-shadow:0 18px 50px rgba(0,0,0,.30);
  overflow:hidden;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.panel::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at top right, rgba(51,189,228,.10), transparent 28%),
    radial-gradient(circle at bottom left, rgba(244,196,48,.08), transparent 24%);
}

.panel + .panel{
  margin-top:20px;
}

.panel-head{
  position:relative;
  z-index:1;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:22px 22px 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.panel-title{
  margin:0;
  font-size:1.28rem;
  font-weight:800;
  line-height:1.2;
  color:#fff;
  letter-spacing:.2px;
}

.panel-sub{
  margin:7px 0 0;
  font-size:.95rem;
  line-height:1.55;
  color:rgba(226,232,240,.72);
}

.panel-body{
  position:relative;
  z-index:1;
  padding:22px;
}

.field{
  margin-bottom:18px;
}

.label{
  display:block;
  margin-bottom:8px;
  font-size:.93rem;
  font-weight:600;
  color:#e8edf7;
}

.input-field,
.select-field,
.textarea-field{
  width:100%;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  color:var(--text);
  border:1px solid rgba(255,255,255,.08);
  font-size:15px;
  outline:none;
  box-sizing:border-box;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input-field,
.select-field{
  min-height:52px;
  padding:14px 16px;
}

.textarea-field{
  min-height:120px;
  padding:14px;
  resize:vertical;
}

.input-field:focus,
.select-field:focus,
.textarea-field:focus{
  border-color:rgba(51,189,228,.85);
  box-shadow:0 0 0 4px rgba(51,189,228,.14);
  background:rgba(255,255,255,.06);
}

.select-field{
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
}

.select-field option{
  background:#11151f;
  color:#fff;
}

.input-field::placeholder,
.textarea-field::placeholder{
  color:rgba(226,232,240,.45);
}

.btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:6px;
}

.btn-primary,
.btn-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 18px;
  border-radius:12px;
  border:none;
  font-size:.95rem;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, opacity .16s ease;
  white-space:nowrap;
}

.btn-primary{
  color:#fff;
  background:linear-gradient(135deg, #33bde4, #199ec4);
  box-shadow:0 10px 24px rgba(25,158,196,.28);
}

.btn-secondary{
  color:#fff;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}

.btn-primary:hover,
.btn-secondary:hover{
  transform:translateY(-1px);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.select-field:disabled,
.input-field:disabled,
.textarea-field:disabled{
  opacity:.58;
  cursor:not-allowed;
}

.alert-box{
  display:block;
  width:100%;
  text-align:center;
  padding:14px 16px;
  border-radius:14px;
  margin-bottom:16px;
  font-size:.94rem;
  font-weight:600;
  line-height:1.5;
}

.alert-box.success{
  color:#d9ffee;
  background:rgba(16,185,129,.15);
  border:1px solid rgba(16,185,129,.28);
}

.alert-box.error{
  color:#ffe2e2;
  background:rgba(239,68,68,.14);
  border:1px solid rgba(239,68,68,.26);
}

.info-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}

.info-card{
  padding:18px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.08);
}

.info-kicker{
  font-size:.8rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#f4c430;
  margin-bottom:8px;
}

.info-value{
  font-size:1.9rem;
  font-weight:800;
  line-height:1.1;
  color:#fff;
  margin-bottom:8px;
}

.info-text{
  font-size:.93rem;
  line-height:1.55;
  color:rgba(226,232,240,.78);
}

.table-shell{
  width:100%;
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;
  overflow:hidden;
}

.table-wrap{
  width:100%;
  overflow-x:auto;
}

.data-table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
}

.data-table thead th{
  padding:15px 16px;
  text-align:left;
  font-size:.84rem;
  font-weight:700;
  letter-spacing:.02em;
  color:#b8c2d9;
  background:rgba(255,255,255,.04);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.data-table tbody td{
  padding:15px 16px;
  vertical-align:middle;
  border-bottom:1px solid rgba(255,255,255,.06);
  color:#eef2f9;
  font-size:.93rem;
}

.data-table tbody tr:last-child td{
  border-bottom:none;
}

.data-table tbody tr:hover{
  background:rgba(255,255,255,.025);
}

.table-title{
  display:inline-block;
  font-weight:700;
  color:#fff;
}

.table-link{
  color:#5fd3f1;
  text-decoration:none;
  font-weight:600;
  word-break:break-word;
}

.table-link:hover{
  text-decoration:underline;
}

.status-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:94px;
  padding:8px 12px;
  border-radius:999px;
  font-size:.82rem;
  font-weight:700;
  text-transform:capitalize;
  border:1px solid transparent;
}

.status-chip.pending{
  color:#ffe8a3;
  background:rgba(245,158,11,.14);
  border-color:rgba(245,158,11,.30);
}

.status-chip.approved{
  color:#d3ffea;
  background:rgba(16,185,129,.15);
  border-color:rgba(16,185,129,.28);
}

.status-chip.rejected{
  color:#ffd9d9;
  background:rgba(239,68,68,.14);
  border-color:rgba(239,68,68,.26);
}

.date-text{
  color:rgba(226,232,240,.82);
  white-space:nowrap;
}

.empty-text{
  margin:0;
  color:rgba(226,232,240,.72);
  font-size:.95rem;
  line-height:1.6;
}

@media (max-width:1100px){
  .content-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:1024px){
  .sidebar{
    position:fixed;
    left:0;
    top:0;
    transform:translateX(-100%);
    transition:.25s ease;
  }

  .sidebar.open{
    transform:translateX(0);
  }
}

@media (max-width:768px){
  .topbar{
    padding:12px;
  }

  .user-meta{
    display:none;
  }

  .profile-dropdown{
    position:fixed;
    top:68px;
    right:10px;
    width:min(94vw,320px);
    max-height:calc(100vh - 84px);
    overflow-y:auto;
  }

  .page-wrap{
    padding:16px 12px 28px;
  }

  .panel-head,
  .panel-body{
    padding:16px;
  }

  .panel-head{
    flex-direction:column;
    align-items:stretch;
  }

  .panel-title{
    font-size:1.08rem;
  }

  .panel-sub{
    font-size:.9rem;
  }

  .btn-primary,
  .btn-secondary{
    width:100%;
  }

  .btn-row{
    flex-direction:column;
  }

  .info-value{
    font-size:1.6rem;
  }

  .data-table{
    min-width:680px;
  }
}

@media (max-width:480px){
  .page-wrap{
    padding:12px 10px 24px;
  }

  .panel{
    border-radius:18px;
  }

  .panel-head,
  .panel-body{
    padding:14px;
  }

  .select-field,
  .input-field{
    min-height:50px;
    padding:13px 14px;
  }

  .status-chip{
    min-width:auto;
  }
}