/* Basic reset and layout */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header, .site-footer {
    background: #0f172a;
    color: #fff;
}

/* Site header */
.site-header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Site footer */
.site-footer {
    flex-shrink: 0; /* Prevents the footer from shrinking */
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav__brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.nav__link {
    color: #cbd5e1;
    text-decoration: none;
}

.nav__link:hover {
    color: #fff;
}

/* Make logout button styled like a link */
button.nav__link {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: #cbd5e1;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

button.nav__link:hover {
    color: #fff;
}

.container {
    flex: 1 0 auto; /* This makes the container take up all available space */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.message {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #eef2ff;
}

.message--success {
    background: #ecfdf5;
    color: #065f46;
}

.message--error {
    background: #fef2f2;
    color: #991b1b;
}

.form {
    display: grid;
    gap: 16px;
}

.form__row {
    display: grid;
    gap: 6px;
}

.form__label {
    font-weight: 600;
}

.form__input {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.form input[type="text"], .form input[type="password"], .form input[type="email"], .form input[type="number"],
.form input[type="tel"], .form select {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.form__help {
    font-size: 12px;
    color: #64748b;
}

.form__errors {
    color: #b91c1c;
    font-size: 13px;
    margin: 4px 0 0;
}

/* Wardrobe tiles */
.locker-room {
    margin: 24px 0;
}

.locker-room__title {
    margin: 0 0 8px;
    font-size: 24px;
}

.locker-room__title a {
    color: #000;
    text-decoration: none;
}

.locker-room__title a:hover {
    color: #000;
    text-decoration: underline;
}

/* Use auto-fill so complete rows stretch, last incomplete row doesn't stretch */
.wardrobes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 3px;
}

.tile {
    position: relative;
    padding: 4px;
    display: block;
    text-decoration: none;
    color: inherit;
}

.tile__number {
    font-size: 12px;
    font-weight: 600;
}

.tile--free {
    background: #ecfdf5;
}

.tile--free:hover {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .25);
}

.tile--occupied, .tile--blocked {
    background: #ef4444;
    color: #fff;
}

.actions {
    margin-top: 16px;
}

.button {
    background: #2563eb;
    color: #fff;
    border: 0;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    text-decoration: none;
}

.button:disabled {
    background: #7688b3;
    cursor: not-allowed;
}


/* Header left and right groups */
.nav__left,
.nav__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Utility and context-specific classes moved from inline styles */
.nav__logout-form {
    display: inline;
}

.profile__section {
    margin-top: 16px;
}

.profile__row {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.profile__form {
    margin-top: 8px;
}

.actions--inline {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.button--tall {
    height: 40px;
}
