/* Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    line-height: 1.5;
}

.content-wrapper {
    max-width: 48rem; /* max-w-3xl */
    margin: 0 auto;
    padding: 1rem;
}

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Keep the navbar visible at the top while scrolling */
.navbar {
    position: sticky;
    top: 0;
    z-index: 60;
}

.navbar-container {
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.desktop-nav {
  display: flex;
  gap: 2rem;
  margin-left: auto; /* pushes nav all the way to the right */
}

.logo { font-size: 1.5rem; font-weight: bold; }

.desktop-nav { display: none; gap: 1rem; }
.desktop-nav a { color: #2563eb; text-decoration: none; }
.desktop-nav a {display: flex; gap: 1rem; }
.desktop-nav a:hover { color: #1e40af; }

/* Active / Current link styles */
.desktop-nav a.active {
    color: #0f172a;
    font-weight: 700;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 2px;
}
.mobile-menu a.active {
    color: #0f172a;
    font-weight: 700;
}

/* Focus styles for accessibility */
.desktop-nav a:focus,
.mobile-menu a:focus,
.hamburger-btn:focus {
    outline: 3px solid rgba(37,99,235,0.25);
    outline-offset: 2px;
}

/* Mobile Menu */
.hamburger-btn {
    display: block;
    background: #f3f4f6;
    border: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.25rem;
}

.mobile-menu {
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    padding-top: 1rem;
}

.mobile-menu a {
    display: block;
    color: #2563eb;
    text-decoration: none;
    padding: 0.5rem 0;
}

/* Cards & Components */
.card {
    background: #fff;
    padding: 1rem;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.page-heading { font-size: 1.5rem; font-weight: bold; margin-bottom: 1rem; }
.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }

.empty-msg { font-size: 0.875rem; color: #6b7280; font-style: italic; margin-top: 0.5rem; }

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn:hover { opacity: 0.9; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-warning { background: #d97706; color: #fff; }
.btn-success { background: #16a34a; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }

.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.logout-wrapper {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0;
}

/* Alert Boxes */
.alert-box {
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.renewal-box { background-color: #dbeafe; }
.instruction-text { margin-bottom: 1rem; }
.instruction-text p { font-size: 1.125rem; font-weight: 600; color: #374151; }

/* Spinner Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.spinner-container { text-align: center; color: white; }

.spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #25D366; /* WhatsApp green */
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.whatsapp-float:hover {
  background-color: #20b858;
}

@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* Responsive Media Queries */
@media (min-width: 768px) {
    .desktop-nav { display: flex; }
    .hamburger-btn { display: none; }
    .mobile-menu { display: none; }
    
    .button-group {
        flex-direction: row;
    }
}