/* ========== Base layout ========== */

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f4f6f9;
    color: #1f2933;
}

.admin-header {
    background: #111827;
    color: #fff;
    padding: 20px 30px;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.4rem;
}

/* ========== Navigation ========== */

.admin-nav {
    background: #1f2937;
    padding: 10px 30px;
    display: flex;
    gap: 15px;
}

.admin-nav a {
    color: #d1d5db;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.admin-nav a:hover {
    background: #374151;
    color: #fff;
}

/* ========== Content area ========== */

.admin-content {
    padding: 30px;
    max-width: 1100px;
}

/* ========== Cards ========== */

.admin-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.admin-card h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.admin-card p {
    margin-top: 0;
    color: #4b5563;
}

/* ========== Forms ========== */

form label {
    display: block;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 6px;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="password"],
form select,
form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    box-sizing: border-box;
}

form textarea {
    resize: vertical;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: #2563eb;
}

/* ========== Buttons ========== */

button,
.btn {
    margin-top: 20px;
    padding: 10px 16px;
    background: #2563eb;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
}

button:hover,
.btn:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* ========== Tables ========== */

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

table th {
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #6b7280;
}

/* ========== Footer ========== */

.admin-footer {
    padding: 15px 30px;
    font-size: 0.85rem;
    color: #6b7280;
}
/* ----------------------------------
   Mobile safety + wrapping fixes
---------------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
}

td, th {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Cards stack better on mobile */
.admin-content {
    padding: 15px;
}


/* Buttons scale nicely */
button,
.btn {
    max-width: 100%;
}

/* ----------------------------------
   Mobile-specific tweaks
---------------------------------- */
@media (max-width: 600px) {

  .admin-header h1 {
    font-size: 1.4rem;
    text-align: center;
  }

  .admin-card {
    padding: 15px;
  }

  /* IMPORTANT: do NOT globally convert tables to blocks here.
     Each page can opt-in with its own table-to-cards CSS. */
}
/* ==================================
   Mobile navigation (members + admin)
================================== */
/* FULL WIDTH just for the Members page */
.admin-content.members-content {
  max-width: none;
  width: 95%;
}

.nav-toggle {
    display: none;
    background: #2563eb;        /* blue button */
    border: none;
    font-size: 1.6rem;
    color: #ffffff;             /* white icon */
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 6px;
    line-height: 1;
}
.nav-toggle:hover {
    background: #1d4ed8;
}

@media (max-width: 900px) {

    .nav-toggle {
        display: block;
        margin-top: 10px;
    }

    .admin-nav {
        display: none;
        flex-direction: column;
        padding: 0;
    }

    .admin-nav a {
        width: 100%;
        padding: 12px;
        text-align: center;
        border-top: 1px solid #374151;
    }

    .admin-nav.open {
        display: flex;
    }
}
.group-members{
    display:grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap:6px 16px;
}

.member-row{
    display:flex;
    align-items:center;
    gap:8px;
}

.member-children{
    font-size:12px;
    color:#6b7280;
    margin-left:26px;
}

.group-body{
    margin-top:10px;
}

@media (max-width:700px){
    .group-body{
        display:none;
    }

    .group-toggle{
        cursor:pointer;
        padding:10px;
        background:#f3f4f6;
        border-radius:6px;
    }

    .group-toggle.open{
        background:#e5e7eb;
    }
}