/* ================== NAVBAR ================== */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(45deg, #fbfbfb, #010a18);
  color: #fff;
  z-index: 1100;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.navbar-brand img { height: 40px; margin-right: 10px; }
.navbar .nav-link, .navbar .navbar-text { color: #fff !important; }

/* Active nav link */
.nav-link.active {
  background: #698b0a;
  color: #fff !important;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: all 0.3s ease-in-out;
}
.nav-link.active:hover { background: #0056b3; }

/* ================== SIDEBAR ================== */
#sidebar {
  position: fixed;
  top: 60px; /* below navbar */
  left: 0;
  width: 250px;
  height: calc(100vh - 60px);
  background: #343a40;
  color: #fff;
  z-index: 1000;
  overflow-y: auto;
  transition: all 0.3s ease;
}
#sidebar .nav-link { color: #fff; }
#sidebar .nav-link:hover { background: #495057; color: #ffc107; }

/* Desktop collapsed state */
#sidebar.collapsed { width: 60px; }

/* ================== CONTENT ================== */
#content {
  position: relative;
  margin-top: 60px;
  margin-left: 250px;
  padding: 20px;
  transition: all 0.3s ease;
  z-index: 1;
}
#content.full { margin-left: 60px; }

/* Background watermark */
#content::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('images/logo.png') no-repeat center center;
  background-size: 600px 600px;
  opacity: 0.05;
  z-index: -1;
}

/* ================== MOBILE BEHAVIOR ================== */
@media (max-width: 992px) {
  #sidebar {
    left: -250px; /* hide off-screen */
    width: 250px;
  }
  #sidebar.active { left: 0; } /* slide in */

  #content {
    margin-left: 0 !important; /* full width */
    padding: 15px;
  }
  #content.full { margin-left: 0 !important; }

  .navbar-toggler {
    display: block;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #fff;
  }
}

/* ================== TYPOGRAPHY & HEADERS ================== */
h4 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(90deg, #ff8c00, #ff0080, #00c6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s infinite;
}
h4::after {
  content: "✨";
  position: absolute;
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
  animation: sparkle 1.5s infinite ease-in-out;
  font-size: 1.2rem;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes sparkle {
  0%, 100% { opacity: 0.2; transform: translateY(-50%) scale(0.8); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.3); }
}

/* ================== MODALS ================== */
.modal { z-index: 2000 !important; }
.modal-backdrop { z-index: 1900 !important; }
.modal-dialog { margin-top: 70px; }

/* ================== FOOTER ================== */
html, body { height: 100%; margin: 0; font-family: Arial, sans-serif; }
body { display: flex; flex-direction: column; }
footer { margin-top: auto; }

/* ================== INVOICE ================== */
.invoice-box {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}
.invoice-header img { max-width: 100px; }
.watermark {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  z-index: 0;
  font-size: 100px;
  font-weight: bold;
  white-space: nowrap;
}
@media print { .btn { display: none; } }
