* { box-sizing: border-box; }
body {
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f4f5f7;
    margin: 0;
    padding: 0;
    color: #1a1a1a;
}
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
}
.wide { max-width: 900px; }

h1 { font-size: 1.4em; margin-bottom: 4px; }
.subtitle { color: #666; margin-top: 0; margin-bottom: 20px; }

.card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

input[type=password], input[type=tel], input[type=text], select {
    width: 100%;
    padding: 14px;
    font-size: 1.1em;
    border: 1px solid #ccc;
    border-radius: 10px;
    margin-bottom: 12px;
}

button, .btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: #1a73e8;
    color: white;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}
button:active, .btn:active { background: #1558b0; }

.btn-secondary {
    background: #eee;
    color: #1a1a1a;
}

.esito-ok { color: #1a8a3f; font-size: 1.3em; font-weight: 700; }
.esito-errore { color: #c0392b; font-size: 1.3em; font-weight: 700; }

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.95em;
}
th { background: #fafafa; color: #555; font-weight: 600; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 600;
}
.badge-presente { background: #d4f4dd; color: #1a8a3f; }
.badge-uscito { background: #e0e0e0; color: #555; }
.badge-assente { background: #f5f5f5; color: #999; }
.badge-assenza { background: #e8dff5; color: #6a3fb5; }
.badge-ritardo { background: #fde2e0; color: #c0392b; }
.badge-straord { background: #fde2e0; color: #c0392b; font-weight: 700; }
.badge-deficit { background: #fff3cd; color: #8a6d1a; font-weight: 700; }

.flash { background: #fde2e0; color: #c0392b; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }

nav { margin-bottom: 20px; }
nav a { margin-right: 16px; color: #1a73e8; text-decoration: none; font-weight: 600; }

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-box { text-align: center; }
.qr-box img { max-width: 260px; margin: 16px 0; }
