* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0; background: #f8fafc; color: #1e293b;
}
.hidden { display: none !important; }

.screen { min-height: 100vh; }
.login-box {
    max-width: 360px; margin: 15vh auto; background: #fff; padding: 32px;
    border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); text-align: center;
}
.login-box input { width: 100%; padding: 12px; margin: 8px 0; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px; }
.login-box button, form button {
    width: 100%; padding: 12px; background: #2563eb; color: #fff; border: none;
    border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 8px;
}
.error-text { color: #dc2626; font-size: 14px; }
.result-text { font-size: 14px; margin-top: 8px; }

header {
    background: #2563eb; color: #fff; padding: 16px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
header h1 { margin: 0; font-size: 18px; }
.link-btn { background: none; border: none; color: #fff; text-decoration: underline; cursor: pointer; margin-left: 12px; }

.tabs { display: flex; overflow-x: auto; background: #fff; border-bottom: 1px solid #e2e8f0; }
.tab-btn {
    flex: 1; padding: 14px 8px; border: none; background: none; font-size: 14px;
    cursor: pointer; color: #64748b; border-bottom: 3px solid transparent; white-space: nowrap;
}
.tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }

main { padding: 16px; max-width: 700px; margin: 0 auto; }
h2 { font-size: 16px; color: #334155; margin-top: 24px; }

.card-list { display: flex; flex-direction: column; gap: 10px; }
.status-card {
    padding: 14px 16px; border-radius: 10px; border-left: 6px solid #94a3b8; background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.status-card .title { font-weight: 700; font-size: 15px; }
.status-card .subtitle { font-size: 13px; color: #64748b; margin-top: 2px; }
.status-card .badge {
    display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; color: #fff;
}
.status-ok { border-left-color: #22c55e; }
.status-ok .badge { background: #22c55e; }
.status-due_soon { border-left-color: #f59e0b; }
.status-due_soon .badge { background: #f59e0b; }
.status-overdue { border-left-color: #dc2626; background: #fef2f2; animation: pulse 2s infinite; }
.status-overdue .badge { background: #dc2626; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 1px 4px rgba(220,38,38,0.15); }
    50% { box-shadow: 0 1px 12px rgba(220,38,38,0.45); }
}

form { display: flex; flex-direction: column; background: #fff; padding: 16px; border-radius: 10px; }
form label { font-size: 13px; font-weight: 600; margin-top: 12px; color: #475569; }
form input, form select, form textarea {
    padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; margin-top: 4px;
}
form textarea { min-height: 60px; }

.module-section { margin-bottom: 20px; }
.module-section h2 { margin-bottom: 8px; }
.module-fields { border-top: 1px dashed #e2e8f0; margin-top: 12px; padding-top: 4px; }

.item-detail-panel {
    margin-top: 12px; padding-top: 12px; border-top: 1px dashed #cbd5e1;
    font-size: 13px; color: #334155; cursor: default;
}
.detail-block { margin-bottom: 14px; }
.detail-block > strong { display: block; margin-bottom: 6px; font-size: 13px; color: #1e293b; }
.detail-history-row {
    background: #f8fafc; border-radius: 6px; padding: 8px 10px; margin-bottom: 6px;
}
