/* dencho Web UI minimal styles */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif; color: #1a1a1a; background: #f7f7f8; }

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem; background: #1e293b; color: #fff;
}
.topbar .brand { color: #fff; font-weight: 700; font-size: 1.05rem; }
.topnav { display: flex; gap: 1rem; align-items: center; }
.topnav a { color: #e2e8f0; font-size: 0.9rem; }
.topnav .user { color: #94a3b8; font-size: 0.85rem; }
.topnav .logout { color: #fca5a5; }

/* Main content */
.content { max-width: 1400px; margin: 1.5rem auto; padding: 0 1.5rem; }
.footer { text-align: center; padding: 2rem 0; color: #94a3b8; font-size: 0.8rem; }

h1 { margin-top: 0; font-size: 1.5rem; }
h1 small.muted { font-weight: normal; color: #64748b; font-size: 0.9rem; margin-left: 0.5rem; }
.muted { color: #64748b; }
.error { background: #fee2e2; color: #991b1b; padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.success { background: #dcfce7; color: #166534; padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.warn { color: #c2410c; font-size: 0.9rem; }
.breadcrumb { margin-bottom: 0.5rem; }

/* Login */
.login-body { background: #f1f5f9; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); width: 100%; max-width: 400px; }
.login-card h1 { font-size: 1.25rem; margin: 0 0 0.25rem 0; }
.login-card form { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 1rem; }
.login-card label { display: flex; flex-direction: column; font-size: 0.85rem; color: #475569; gap: 0.25rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  padding: 0.5rem 0.6rem; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 0.95rem; font-family: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #2563eb; outline-offset: -1px; border-color: #2563eb; }

button { padding: 0.5rem 1rem; font-size: 0.95rem; border: none; border-radius: 4px; cursor: pointer; font-family: inherit; }
.primary { background: #2563eb; color: #fff; }
.primary:hover { background: #1d4ed8; }
.secondary { background: #e2e8f0; color: #1e293b; }
.secondary:hover { background: #cbd5e1; }
.danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.danger:hover { background: #fee2e2; }

/* Review list table */
/* Bulk actions bar (review list) */
.bulk-actions {
  display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0.8rem;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 6px 6px 0 0;
  flex-wrap: wrap;
}
.bulk-actions label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; cursor: pointer; }
.bulk-actions button:disabled { opacity: 0.45; cursor: not-allowed; }
.bulk-actions small { margin-left: auto; font-size: 0.78rem; color: #64748b; }
.bulk-actions input[type="checkbox"] { transform: scale(1.1); }

.review-table { width: 100%; background: #fff; border-collapse: collapse; border-radius: 0 0 6px 6px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.review-table th, .review-table td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: 0.88rem; }
.review-table th { background: #f1f5f9; font-weight: 600; color: #475569; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.02em; }
.review-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.review-table td.nowrap { white-space: nowrap; }
.review-table td.filename { font-family: ui-monospace, monospace; font-size: 0.82rem; }
.review-table td.reasons { color: #c2410c; font-size: 0.78rem; }
.review-table tr:hover { background: #f8fafc; }
.btn { display: inline-block; padding: 0.25rem 0.75rem; background: #2563eb; color: #fff; border-radius: 4px; font-size: 0.85rem; }
.btn:hover { background: #1d4ed8; text-decoration: none; color: #fff; }

/* Slot navigation */
.slot-nav { display: flex; gap: 0.5rem; align-items: center; padding: 0.5rem 0.75rem; background: #eff6ff; border-radius: 4px; margin: 0.75rem 0; flex-wrap: wrap; }
.slot-nav .muted { font-size: 0.85rem; }
.slot-nav a, .slot-nav .slot-current { padding: 0.2rem 0.6rem; background: #fff; border: 1px solid #cbd5e1; border-radius: 3px; font-size: 0.85rem; }
.slot-nav .slot-current { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 600; }

/* Detail layout */
.layout { display: grid; grid-template-columns: 1fr 480px; gap: 1.5rem; margin-top: 1rem; }
.layout .pdf { background: #fff; border-radius: 6px; padding: 0.75rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.layout .pdf iframe { border: 1px solid #e2e8f0; border-radius: 4px; }
.layout .form { background: #fff; border-radius: 6px; padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.layout .form form { display: flex; flex-direction: column; gap: 0.75rem; }
.layout .form label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; color: #475569; }
.layout .form .meta { padding: 0.6rem 0.75rem; background: #f8fafc; border-radius: 4px; font-size: 0.8rem; color: #475569; }
.layout .form .meta > div + div { margin-top: 0.2rem; }
.layout .form .actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.layout .form .actions button { flex: 1; min-width: 130px; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
}

/* History */
.history { margin-top: 1rem; }
.history summary { cursor: pointer; font-size: 0.85rem; color: #475569; }
.history ul { list-style: none; padding-left: 0; margin: 0.5rem 0 0 0; }
.history li { padding: 0.3rem 0; border-bottom: 1px solid #e2e8f0; font-size: 0.78rem; color: #475569; }
.history time { color: #94a3b8; margin-right: 0.5rem; }
.history strong { color: #1e293b; margin-right: 0.5rem; }
.history .action { background: #eff6ff; color: #1d4ed8; padding: 0 0.4rem; border-radius: 3px; margin-right: 0.5rem; }
.history .field { color: #c2410c; }
.history code { background: #f1f5f9; padding: 0 0.3rem; border-radius: 3px; font-size: 0.78rem; }
