* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f3f5f7;
    color: #222;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 480px; margin: 0 auto; padding: 16px; }
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    padding: 18px;
    margin-bottom: 14px;
}
h1, h2 {
    margin: 0 0 12px;
    color: #1565c0;
    font-weight: 700;
}
h1 { font-size: 22px; }
h2 { font-size: 18px; }

label { display: block; font-size: 13px; color: #555; margin: 10px 0 4px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=date], select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}
input:focus { border-color: #1565c0; outline: 0; }

button, .btn {
    display: inline-block;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    background: #1565c0;
    color: #fff !important;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    margin-top: 10px;
    -webkit-appearance: none;
    appearance: none;
}
button:active, .btn:active { background: #0d47a1; }
button.secondary, .btn.secondary {
    background: #eceff1;
    color: #333 !important;
}

.err {
    background: #ffebee;
    color: #c62828 !important;
    border: 1px solid #ef9a9a;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}
.ok {
    background: #e8f5e9;
    color: #2e7d32 !important;
    border: 1px solid #a5d6a7;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}
.hint { font-size: 12px; color: #777; margin-top: 6px; }

.topbar {
    background: #1565c0;
    color: #fff;
    padding: 12px 14px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 22px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar .title { font-weight: 700; font-size: 17px; }
.topbar .title small { font-weight: 400; font-size: 12px; opacity: .85; margin-left: 6px; }
.topbar a { color: #fff; text-decoration: none; font-size: 14px; }

table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mini th, table.mini td { padding: 8px 6px; text-align: left; border-bottom: 1px solid #eee; }
table.mini th { background: #eceff1; font-weight: 700; color: #333; }
table.mini tr:nth-child(even) td { background: #fafafa; }

.row-flex { display: flex; gap: 10px; }
.row-flex > * { flex: 1; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #fff; }
.badge-ok { background: #2e7d32; }
.badge-ko { background: #c62828; }
.badge-info { background: #1565c0; }

.chk-wrap { display:flex; align-items:center; gap:8px; margin:10px 0; font-size:14px; }
.chk-wrap input[type=checkbox] { width:20px; height:20px; }
