* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f3f4f6; color: #1f2937; line-height: 1.6; }
.container { max-width: 520px; margin: 0 auto; padding: 2rem 1rem; }
.container.narrow { max-width: 384px; }
.container.wide { max-width: 520px; }
.container.xwide { max-width: 960px; }
.container.xxwide { max-width: 1200px; }
h1, h2 { margin-bottom: 1rem; color: #111827; }
.card { background: #ffffff; padding: 2rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden; }
.card.pad-0 { padding: 0; }
.card-header { padding: 1.5rem 2rem; background: #f9fafb; border-bottom: 1px solid #e5e7eb; text-align: center; }
.card-header.left { text-align: left; }
.card-header h2 { margin-bottom: 0.25rem; font-size: 1.125rem; font-weight: 600; color: #111827; }
.card-header p { color: #6b7280; font-size: 0.875rem; margin: 0; }
.card-body { padding: 1.5rem 2rem; }
.form-group { margin-bottom: 1.25rem; }
label { display: block; margin-bottom: 0.375rem; font-weight: 500; font-size: 0.875rem; color: #374151; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
    width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d1d5db;
    border-radius: 6px; font-size: 1rem; transition: border-color 0.15s;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #111827; }
button[type="submit"].normal-btn {
    background: #111827; color: #ffffff; padding: 0.625rem 1.25rem;
    border: none; border-radius: 6px; font-size: 1rem; cursor: pointer;
    font-weight: 500; transition: background 0.15s;
}
button[type="submit"]:hover { background: #374151; }
button[type="submit"].danger { background: #dc2626; color: #ffffff; }
button[type="submit"].danger:hover { background: #b91c1c; }
.alert {
    padding: 0.875rem 1rem; background: #fee2e2; color: #991b1b;
    border-radius: 6px; margin-bottom: 1rem; font-size: 0.875rem;
}
.alert ul { margin: 0; padding-left: 1.25rem; }
.alert li { font-size: 0.875rem; }
.alert-success { background: #dcfce7; color: #166534; }
.errors { margin-bottom: 1rem; padding-left: 1.25rem; }
.errors li { color: #991b1b; font-size: 0.875rem; margin-bottom: 0.25rem; }
.hint { font-size: 0.75rem; color: #6b7280; margin-top: 0.25rem; }
hr { border: none; border-top: 1px solid #e5e7eb; margin: 1.5rem 0; }
.danger { background: #dc2626; }
.danger:hover { background: #b91c1c; }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { font-weight: 600; color: #374151; background: #f9fafb; }
tr:hover { background: #f9fafb; }
.pagination { display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem; justify-content: center; }
.pagination a, .pagination span { padding: 0.375rem 0.625rem; border-radius: 4px; font-size: 0.875rem; text-decoration: none; }
.pagination a { background: #f3f4f6; color: #374151; }
.pagination a:hover { background: #e5e7eb; }
.pagination .current { background: #111827; color: #ffffff; }
.small-btn {
    background: #ffffff; color: #111827; border: 1px solid #111827;
    padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem;
    cursor: pointer; text-decoration: none; display: inline-block;
}
.small-btn:hover { background: #f3f4f6; }
.small-btn.active { background: #111827; color: #fff; border-color: #111827; }
/*.small-btn.danger { color: #dc2626; border-color: #dc2626; }
.small-btn.danger:hover { background: #fef2f2; }*/
.small-btn.btn-green { background: #16a34a; color: #fff; border-color: #16a34a; }
.small-btn.btn-green:hover { background: #15803d; }
.small-btn.btn-yellow { background: #ca8a04; color: #fff; border-color: #ca8a04; }
.small-btn.btn-yellow:hover { background: #a16207; }
.filter-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.filter-bar input, .filter-bar select { flex: 1; }

/* Utility classes for formerly inline styles */
.layout-center { display: flex; justify-content: center; padding-top: 3rem; }
.layout-center-sm { max-width: 384px; margin: 0 auto; padding-top: 3rem; }
.layout-center-md { max-width: 520px; margin: 0 auto; padding-top: 3rem; }

.mb-0-5 { margin-bottom: 0.5rem; }
.mb-0-75 { margin-bottom: 0.75rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-1-25 { margin-bottom: 1.25rem; }
.mb-1-5 { margin-bottom: 1.5rem; }
.mt-0-5 { margin-top: 0.5rem; }
.mt-1 { margin-top: 1rem; }
.mt-1-25 { margin-top: 1.25rem; }
.ml-0-5 { margin-left: 0.5rem; }
.p-0-5 { padding: 0.5rem; }

.gap-0-5 { gap: 0.5rem; }
.flex { display: flex; }
.inline { display: inline; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.block { display: block; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 0.9375rem; }
.text-0-8 { font-size: 0.8rem; }
.text-gray { color: #6b7280; }
.text-gray-dark { color: #4b5563; }
.text-dark { color: #111827; }
.text-red { color: #991b1b; }
.text-red-bright { color: #dc2626; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.leading-normal { line-height: 1.5; }

.w-full { width: 100%; }
.w-half { width: 50%; }
.w-auto { width: auto; }

.cursor-pointer { cursor: pointer; }

.bg-gray { background: #f3f4f6; }
.bg-white { background: #ffffff; }
.bg-red-light { background: #fee2e2; }
.bg-dark { background: #111827; }
.bg-green { background: #16a34a; }
.bg-yellow { background: #ca8a04; }
.br-6 { border-radius: 6px; }
.border-red { border: 1px solid #fecaca; }

.nowrap { white-space: nowrap; }

.nav-link { display: block; margin-bottom: 0.5rem; color: #111827; font-weight: 500; }
.nav-link:last-child { margin-bottom: 0; }

.info-text { margin-top: 1.25rem; text-align: center; font-size: 0.875rem; color: #6b7280; }

.badge { font-size: 0.75rem; font-weight: 600; background: #f3f4f6; padding: 0.125rem 0.375rem; border-radius: 4px; }

.code-sm { font-size: 0.75rem; }
.code-xs { font-size: 0.7rem; }
.code-truncate { max-width: 280px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.alert-box { background: #fee2e2; border: 1px solid #fecaca; border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 1rem; }
.alert-box ul { margin: 0; padding-left: 1.25rem; }
.alert-box li { color: #991b1b; font-size: 0.875rem; }
