/* ── Variables ── */
:root {
    --ou-green: #00694e;
    --ou-green-dark: #004d39;
    --ou-green-light: #e6f2ee;
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --bg-page: #f5f6f8;
    --bg-card: #fff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --radius: 8px;
}

/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-page);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--ou-green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Header ── */
.site-header {
    background: var(--ou-green);
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.header-brand h1 a {
    color: #fff;
    text-decoration: none;
}

.header-subtitle {
    font-size: 0.85rem;
    opacity: 0.85;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.header-nav a {
    color: #fff;
    opacity: 0.9;
}

.header-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.logout-form {
    display: inline;
}

.logout-form button {
    background: none;
    border: none;
    color: #fff;
    opacity: 0.9;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.logout-form button:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ── Main ── */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ── Tile Grid ── */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    color: var(--text-primary);
    text-decoration: none;
    min-height: 160px;
}

.tile:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}

.tile-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.tile-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--ou-green);
}

.tile-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tile-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.no-tiles {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
}

/* ── Login ── */
.login-container {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--ou-green);
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.15s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--ou-green);
    box-shadow: 0 0 0 3px rgba(0, 105, 78, 0.15);
}

.btn-login {
    width: 100%;
    padding: 0.7rem;
    background: var(--ou-green);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-login:hover {
    background: var(--ou-green-dark);
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid #e5e7eb;
}
