/* ---------------------------------------------------------
   GLOBAL RESET & BASE
--------------------------------------------------------- */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

/* ---------------------------------------------------------
   LAYOUT HELPERS
--------------------------------------------------------- */
.container1 {
    max-width: 900px;
    margin: auto;
    padding: 15px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card spacing on mobile */
.card {
    margin-bottom: 1rem;
}

header {
  height: auto;
}

footer {
  height: auto;
}

main {
    flex: 1; /* fills all remaining space */
}

.navbar {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    min-height: 40px;
    width: auto;
}

.navbar .btn {
    padding: 2px 8px !important;
    font-size: 0.8rem;
}

/* ---------------------------------------------------------
   MOBILE-FRIENDLY TABLES
--------------------------------------------------------- */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

/* ---------------------------------------------------------
   FORM ELEMENTS
--------------------------------------------------------- */
form label {
    font-weight: 600;
}

form .form-control,
form .form-select {
    font-size: 1rem;
}

/* ---------------------------------------------------------
   BUTTONS
--------------------------------------------------------- */
.btn {
    font-size: 1rem;
    padding: 0.6rem 1rem;
}

/* Full-width buttons on mobile */
@media (max-width: 768px) {
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ---------------------------------------------------------
   NAVBAR
--------------------------------------------------------- */
.navbar-brand {
    font-size: 1.3rem;
}

.navbar .btn {
    font-size: 0.9rem;
}

/* ---------------------------------------------------------
   ADMIN LIST GROUP
--------------------------------------------------------- */
.list-group-item {
    font-size: 1.1rem;
    padding: 0.9rem 1.2rem;
}

/* ---------------------------------------------------------
   RESPONSIVE TYPOGRAPHY
--------------------------------------------------------- */
h1, h2, h3, h4, h5 {
    line-height: 1.3;
}

@media (max-width: 768px) {
    h3 {
        font-size: 1.4rem;
    }
    h5 {
        font-size: 1.2rem;
    }
}

/* ---------------------------------------------------------
   CARD TITLES
--------------------------------------------------------- */
.card-title {
    font-size: 1.2rem;
    font-weight: 600;
}

/* ---------------------------------------------------------
   SPACING UTILITIES
--------------------------------------------------------- */
.mt-4 { margin-top: 1.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }

/* ---------------------------------------------------------
   MOBILE-FRIENDLY ADMIN TABLES
--------------------------------------------------------- */
@media (max-width: 768px) {
    table th,
    table td {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

/* Mobile fix */
@media (max-width: 768px) {
  header, container, footer {
    height: auto;        /* allow natural shrinking */
    min-height: unset;   /* remove constraints */
  }

  body {
    height: auto;        /* allow full compression */
  }

  container {
    padding: 20px 0;     /* small breathing room */
  }

  .card {
    margin: 0 15px;      /* avoid edge-to-edge on small screens */
  }
}
