/* =====================================================
   KEYFRAME ANIMATIONS
===================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes borderGradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* =====================================================
   SCROLLBAR (GLOBAL)
===================================================== */
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #00e5ff, #00bfa5);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1de9b6, #00acc1);
}
* {
  scrollbar-width: thin;
  scrollbar-color: #00bfa5 rgba(255,255,255,0.15);
}

/* =====================================================
   BODY – AQUA PREMIUM GRADIENT
===================================================== */
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg,
    #0f2027,
    #203a43,
    #2c5364,
    #00bcd4);
  background-attachment: fixed;
  color: #ffffff;
  min-height: 100vh;
  animation: fadeInUp 0.8s ease-out;
}

/* =====================================================
   SIDEBAR
===================================================== */
.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  background: linear-gradient(160deg,
    rgba(0,0,0,0.85),
    rgba(0,96,100,0.75),
    rgba(0,150,136,0.65));
  backdrop-filter: blur(14px);
  box-shadow: 4px 0 25px rgba(0,0,0,0.45);
  transition: width 0.3s ease;
  z-index: 1000;
  animation: fadeInLeft 0.6s ease-out;
}

.sidebar.collapsed { width: 64px; }

.sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #e0f7fa;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.sidebar a i {
  font-size: 1.2rem;
  min-width: 24px;
}

.sidebar a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar a:hover::before { opacity: 1; }
.sidebar a:hover { color: #1de9b6; padding-left: 26px; }

.sidebar ul li.active a {
  background: rgba(255,255,255,0.18);
  border-left: 4px solid #1de9b6;
  font-weight: 600;
  box-shadow: inset 0 0 16px rgba(29,233,182,0.45);
}

.sidebar.collapsed a span,
.sidebar.collapsed .text-center h4 {
  display: none;
}

.sidebar.collapsed a i {
  font-size: 1.6rem;
}

/* =====================================================
   SIDEBAR TOGGLE BUTTON
===================================================== */
#sidebar-toggle {
  position: absolute;
  top: 12px;
  right: -18px;
  background: linear-gradient(135deg, #1de9b6, #00acc1);
  border-radius: 50%;
  padding: 8px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  transition: transform 0.25s ease;
}
#sidebar-toggle:hover {
  transform: rotate(90deg) scale(1.1);
}

/* =====================================================
   CONTENT AREA
===================================================== */
.content {
  margin-left: 250px;
  padding: 16px;
  transition: margin-left 0.3s ease;
}
.content.collapsed {
  margin-left: 64px;
}

/* =====================================================
   GLASS CARDS & FORMS
===================================================== */
.card, .form-container {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: fadeInUp 0.8s ease-out;
}

/* Animated Border */
.border-animated {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}
.border-animated::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(270deg,
    #00e5ff,
    #1de9b6,
    #00acc1,
    #00e5ff);
  background-size: 600% 600%;
  animation: borderGradientMove 6s linear infinite;
  z-index: -1;
}
.border-animated > * {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 1rem;
}

/* =====================================================
   FORM CONTROLS
===================================================== */
.form-container input,
.form-container select,
.form-container textarea,
.select2-container--default .select2-selection--single {
  background: rgba(255,255,255,0.85);
  border-radius: 10px;
  border: none;
  padding: 10px 14px;
  height: 44px;
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #222;
  width: 100%;
}

.select2-results__option { color: #004d40; }

/* =====================================================
   GLASS TABLES
===================================================== */
.table {
  width: 100%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
}

.table th {
  background: rgba(0,0,0,0.55);
  font-weight: 700;
}
.table td {
  background: rgba(255,255,255,0.08);
}

.table-responsive {
  overflow-x: auto;
  border-radius: 16px;
}

/* =====================================================
   BUTTONS
===================================================== */
button, .btn {
  background: linear-gradient(135deg, #1de9b6, #00acc1);
  border-radius: 30px;
  padding: 10px 18px;
  font-weight: 600;
  color: #fff;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

button:hover, .btn:hover {
  background: linear-gradient(135deg, #00acc1, #00838f);
  transform: scale(1.05);
}

/* =====================================================
   REPORT SECTIONS
===================================================== */
.report-section {
  margin: 18px 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

/* =====================================================
   MOBILE RESPONSIVE
===================================================== */
@media (max-width: 991px) {
  .sidebar {
    width: 64px;
  }
  .content {
    margin-left: 64px;
  }
}

@media (max-width: 576px) {
  body { font-size: 14px; }

  .sidebar {
    transform: translateX(-100%);
    position: fixed;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
    padding: 12px;
  }

  button, .btn {
    width: 100%;
  }
}

/* =====================================================
   PRINT
===================================================== */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .sidebar { display: none; }
  .card, .table {
    background: #fff !important;
    box-shadow: none !important;
  }
}

.accordion {
  --bs-accordion-bg: transparent;
}
