:root { --footer-h: 80px; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.navbar {
    background: #1a1a2e;
    color: #fff;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
}
.footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    line-height: 1.5;
}
.footer-note {
    font-size: 0.65rem;
    text-align: center;
    color: #6b7280;
    line-height: 1.5;
}
.footer svg { height: 1.5rem !important; width: auto !important; display: block; }
.navbar-brand { font-size: 1.25rem; font-weight: 700; color: #fff; text-decoration: none; }
.navbar-content { display: flex; align-items: center; gap: 2rem; }
.navbar-content svg { height: 2rem; padding-top: 0.5rem; width: auto; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: #ccc; text-decoration: none; font-size: 1rem; font-weight: 600; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; text-decoration: none; }
.nav-alert { color: #dc2626 !important; font-weight: bold; }
.navbar-user { display: flex; align-items: center; gap: 2rem; font-size: 1rem; font-weight: 600; }
.navbar-user a { color: #ccc; text-decoration: none; }
.navbar-user a:hover { color: #fff; }

.container { min-width:45rem; max-width: 75rem; margin: 0 auto; padding: 2rem; }
.form-control {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: #4361ee; box-shadow: 0 0 0 3px rgba(67,97,238,0.15); }
.btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-primary { background: #4361ee; color: #fff; }
.btn-primary:hover { background: #3a56d4; }
.card {
    background: #fff;
    border-radius: 0.625rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.5rem;
}
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.btn-close-alert { background: none; border: none; cursor: pointer; font-size: 1.2rem; line-height: 1; color: inherit; opacity: 0.7; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #e5e7eb; font-size: 0.875rem; }
th { font-weight: 600; color: #6b7280; background: #f9fafb; }
th a { text-decoration: none; color: inherit; }
th a:hover { color: #4361ee; }
tr:hover { background: #f9fafb; }
.page-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.ms-auto { margin-left: auto; }
.page-header h2 { font-size: 1.5rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.btn-secondary { background: #6b7280; color: #fff; }
.btn-secondary:hover { background: #4b5563; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: transparent; border: 1px solid #d1d5db; color: #374151; }
.btn-outline:hover { background: #f3f4f6; }
.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 62.4375rem; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.375rem; font-weight: 500; font-size: 0.875rem; }
.form-check-input { width: 1.1rem; height: 1.1rem; }
.breadcrumb { display: flex; gap: 0.5rem; font-size: 0.875rem; color: #6b7280; margin-bottom: 1.5rem; }
.breadcrumb a { color: #4361ee; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.required-asterisk { color: #dc2626; }
.search-form { display: flex; gap: 0.5rem; align-items: center; }
.status-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.filter-dropdown { position: relative; display: inline-block; }
.filter-dropdown-btn { background: none; border: none; cursor: pointer; padding: 0; color: inherit; font: inherit; line-height: inherit; }
.filter-dropdown-btn:hover { color: #4361ee; }
.filter-dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 10rem;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.15);
    z-index: 10;
    border-radius: 0.375rem;
    padding: 0.5rem;
    left: -1.5rem;
    border: 1px solid #e5e7eb;
}
.filter-dropdown-content form { font-weight: normal; }
.filter-dropdown-content label { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem; cursor: pointer; border-radius: 0.25rem; font-size: 0.875rem; color: #374151; }
.filter-dropdown-content label:hover { background-color: #f3f4f6; }
.filter-dropdown-content input[type="checkbox"] { display: none; }
.filter-dropdown-content .badge { filter: grayscale(100%); opacity: 0.4; transition: all 0.2s ease-in-out; }
.filter-dropdown-content input[type="checkbox"]:checked + .badge { filter: grayscale(0%); opacity: 1; }
.filter-dropdown-content.show { display: block; }
.table-fixed { table-layout: fixed; }
.card-no-pad { padding: 0 !important; }
.card-table { padding: 0 !important; overflow: hidden; }
.card-table-header { padding: 1rem; background-color: #f9fafb; border-bottom: 1px solid #e5e7eb; font-weight: 600; }
.btn-flex { flex: 1; text-align: center; white-space: nowrap; }
.badge-link { text-decoration: none; }
.badge-link:hover { text-decoration: none; filter: brightness(0.9);}
.link-reset { text-decoration: none; color: inherit; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-lightblue { background: #e0f2fe; color: #0369a1; }
.badge-purple { background: #dcfce7; color: #166534; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-expired { background: #fee2e2; color: #b91c1c; }
.form-contents { display: contents; }
.table-empty { padding: 2rem; text-align: center; color: #6b7280; }
.text-meta { font-size: 0.78rem; color: #6b7280; }
.text-muted-italic { color: #6b7280; font-style: italic; }
.list-scroll { flex: 1; overflow-y: auto; }
.btn-disabled-look { pointer-events: none; opacity: 0.5; }
.alert-field { margin-top: 0.25rem; margin-bottom: 0; }
.color-muted { color: #6b7280; }
.card-title { font-size: 1.25rem; margin-bottom: 1.5rem; }
.form-footer { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.field-error { color: #dc2626; font-size: 0.875rem; margin-top: 0.25rem; }
.field-hint { color: #6b7280; font-size: 0.8rem; margin-top: 0.25rem; }
.m-0 { margin: 0; }
.body-wrapper { flex: 1; display: flex; flex-direction: column; }
.arrow {
    display: inline-block;
    margin-left: 8px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.1s ease;
    vertical-align: middle;
    margin-bottom: 2px;
}

.filter-dropdown-btn:has(+ .filter-dropdown-content.show) .arrow {
    transform: rotate(135deg);
}
