/* Whole site: phones and small screens */
html { -webkit-text-size-adjust: 100%; }
img  { max-width: 100%; height: auto; }

/* Forms inside the logged-in pages: full width, easy to tap */
.main form input[type="text"],
.main form input[type="email"],
.main form input[type="number"],
.main form input[type="date"],
.main form input[type="time"],
.main form input[type="tel"],
.main form input[type="password"],
.main form select,
.main form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.7rem;
    font: inherit;
    font-size: 1rem;
}
.main form button,
.main form input[type="submit"] {
    padding: 0.65rem 1.2rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.main form input[type="checkbox"],
.main form input[type="radio"] { width: 1.3rem; height: 1.3rem; }

/* Wide tables scroll sideways inside themselves instead of breaking the page */
.main table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.main td, .main th { padding: 0.5rem 0.6rem; }

@media (max-width: 700px) {
    /* The logged-in layout becomes one column: header, menu, then the content */
    .layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: none;
    }
    .layout > .headerN,
    .layout > .nav,
    .layout > .main {
        grid-column: 1 / -1;
        grid-row: auto;
        min-width: 0;
    }
    .main { padding: 0.75rem; }
    .headerN p { margin: 0.5rem 0.75rem; font-size: 0.95rem; }
    h2 { font-size: 1.3rem; }
    .module-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .module-card { min-height: 80px; }
}