/* XAMPPTimePro - App CSS (Bootstrap-first) */
:root{
  --sidebar-w: 260px;
  --sidebar-collapsed-w: 86px;
  --brand: #0d6efd;
  --bg-soft: #f6f8fb;
  --card-radius: 16px;
  --shadow-soft: 0 10px 30px rgba(16,24,40,.08);
}

html, body { height: 100%; }
body {
  background: var(--bg-soft);
  overflow-x: hidden;
}

a { text-decoration: none; }

.fade-in {
  animation: fadeInUp .25s ease-out both;
}
@keyframes fadeInUp{
  from{ opacity:0; transform: translateY(6px); }
  to{ opacity:1; transform: translateY(0); }
}

/* Layout */
.app-shell{
  min-height: 100vh;
  display: flex;
}
.sidebar{
  width: var(--sidebar-w);
  background: #0b1220;
  color: rgba(255,255,255,.9);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width .2s ease;
}
.sidebar.collapsed{
  width: var(--sidebar-collapsed-w);
}
.sidebar .brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand .logo{
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(13,110,253,.95), rgba(32,201,151,.9));
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
}
.sidebar .brand .title{
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.1;
}
.sidebar.collapsed .brand .title{ display:none; }

.sidebar .nav-section{
  padding: 12px 10px;
}
.sidebar .nav-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .7;
  padding: 10px 10px 6px;
}
.sidebar.collapsed .nav-label{ display:none; }

.sidebar .nav-link{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255,255,255,.85);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.sidebar .nav-link:hover{
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: translateY(-1px);
}
.sidebar .nav-link.active{
  background: rgba(13,110,253,.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(13,110,253,.22);
}
.sidebar .nav-link i{
  width: 22px;
  text-align:center;
  opacity: .95;
}
.sidebar.collapsed .nav-link span{
  display:none;
}

.main{
  flex: 1;
  min-width: 0;
}

/* Topbar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246,248,251,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16,24,40,.06);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 18px;
}
.page-title{
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0;
}
.topbar .chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: #fff;
  border: 1px solid rgba(16,24,40,.08);
  padding: 8px 10px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(16,24,40,.04);
}

/* Content */
.content{
  padding: 18px;
}
.card{
  border: 0;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-soft);
}
.card .card-header{
  border-bottom: 1px solid rgba(16,24,40,.06);
  background: transparent;
  padding: 14px 16px;
}
.card .card-body{ padding: 16px; }

/* Buttons */
.btn-soft{
  background: rgba(13,110,253,.10);
  color: #0d6efd;
  border: 1px solid rgba(13,110,253,.15);
}
.btn-soft:hover{
  background: rgba(13,110,253,.16);
}

/* Utilities */
.kpi{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}
.kpi .icon{
  width: 42px; height: 42px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(13,110,253,.12);
  color: var(--brand);
}
.kpi .val{
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.kpi .lbl{
  font-size: 12px;
  opacity: .75;
}

.badge-soft{
  background: rgba(13,110,253,.10);
  color: #0d6efd;
  border: 1px solid rgba(13,110,253,.15);
}

.table thead th{
  background: #f2f4f7;
  border-bottom: 0;
}
.table td, .table th{
  vertical-align: middle;
}

/* Auth */
.auth-wrap{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  background:
    radial-gradient(1000px 400px at 20% 10%, rgba(13,110,253,.16), rgba(13,110,253,0)),
    radial-gradient(900px 400px at 80% 20%, rgba(32,201,151,.14), rgba(32,201,151,0)),
    var(--bg-soft);
}
.auth-card{
  width: 100%;
  max-width: 460px;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(16,24,40,.12);
}
.auth-card .brand-mini{
  display:flex;
  align-items:center;
  gap:10px;
}
.auth-card .brand-mini .logo{
  width: 42px; height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13,110,253,.95), rgba(32,201,151,.9));
  display:flex; align-items:center; justify-content:center;
  color:#fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

/* Loader overlay */
#globalLoader{
  position: fixed;
  inset: 0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(10,10,10,.25);
  z-index: 2000;
}
#globalLoader.show{ display:flex; }
#globalLoader .panel{
  background: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(16,24,40,.18);
  display:flex;
  align-items:center;
  gap: 12px;
}

/* Responsive */
@media (max-width: 992px){
  .sidebar{
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-102%);
    z-index: 40;
    box-shadow: 0 18px 50px rgba(16,24,40,.25);
  }
  .sidebar.mobile-open{
    transform: translateX(0);
  }
  .content{ padding: 14px; }
}
