.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.page-header h1 {
    margin: 0;
    flex: 1;
    text-align: center;
}

.settings-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
}

.settings-btn:hover {
    background-color: #f2f2f2;
}

.forms-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: none;
}

.fetch-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.inline-fields {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fetch-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.small-select {
    height: 40px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    white-space: nowrap;
    flex: 0 0 auto;
}

.small-input {
    width: 170px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    flex: 0 0 auto;
}

.hidden {
    display: none;
}

#fetch-button {
    min-height: 40px;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

#fetch-button:hover {
    background-color: #0056b3;
}

#fetch-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#fetch-button.loading {
    opacity: 0.85;
}

#fetch-button.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    vertical-align: -2px;
}

.debug-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #444;
    white-space: nowrap;
    user-select: none;
}

.debug-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.sync-one-btn {
    height: 24px;
    padding: 0 9px;
    border: 1px solid #007bff;
    border-radius: 4px;
    background-color: #e6f7ff;
    color: #007bff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 2px;
    font-size: 12px;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
}

.sync-one-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.inline-date-input {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font: inherit;
}

.fetch-log {
    margin: 0 0 15px;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #fff;
    color: #444;
    white-space: pre-line;
}

.fetch-log:empty {
    display: none;
}

.fetch-log .ok {
    color: #155724;
    font-weight: 700;
}

.fetch-log .warn {
    color: #856404;
    font-weight: 700;
}

.fetch-log .err {
    color: #721c24;
    font-weight: 700;
}

.px-3 { padding-left: 12px; padding-right: 12px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.rounded-full { border-radius: 9999px; }
.text-white { color: #ffffff; }
[class~="text-[11px]"] { font-size: 11px; }
.font-bold { font-weight: 700; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.inline-block { display: inline-block; }
.bg-red-500 { background-color: #ef4444; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-yellow-500 { background-color: #eab308; }
.bg-purple-500 { background-color: #a855f7; }
.bg-green-500 { background-color: #22c55e; }
[class~="fixed"] { position: fixed; }
[class~="absolute"] { position: absolute; }
[class~="relative"] { position: relative; }
[class~="inset-0"] { top: 0; right: 0; bottom: 0; left: 0; }
[class~="z-50"] { z-index: 9999; }
[class~="flex"] { display: flex; }
[class~="items-center"] { align-items: center; }
[class~="justify-center"] { justify-content: center; }
[class~="justify-end"] { justify-content: flex-end; }
[class~="p-4"] { padding: 16px; }
[class~="p-6"] { padding: 24px; }
[class~="px-6"] { padding-left: 24px; padding-right: 24px; }
[class~="py-4"] { padding-top: 16px; padding-bottom: 16px; }
[class~="px-4"] { padding-left: 16px; padding-right: 16px; }
[class~="py-2"] { padding-top: 8px; padding-bottom: 8px; }
[class~="gap-3"] { gap: 12px; }
[class~="w-full"] { width: 100%; }
[class~="max-w-lg"] { max-width: 512px; }
[class~="overflow-hidden"] { overflow: hidden; }
[class~="rounded-xl"] { border-radius: 12px; }
[class~="rounded-lg"] { border-radius: 8px; }
[class~="rounded-md"] { border-radius: 6px; }
[class~="shadow-2xl"] { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
[class~="border"] { border-width: 1px; border-style: solid; }
[class~="border-b"] { border-bottom-width: 1px; border-bottom-style: solid; }
[class~="border-gray-100"] { border-color: rgba(243, 244, 246, 1); }
[class~="border-gray-300"] { border-color: rgba(209, 213, 219, 1); }
[class~="bg-white"] { background-color: #ffffff; }
[class~="bg-gray-50"] { background-color: #f9fafb; }
[class~="bg-blue-50"] { background-color: rgba(239, 246, 255, 1); }
[class~="bg-blue-600"] { background-color: #2563eb; }
[class~="text-gray-700"] { color: rgba(55, 65, 81, 1); }
[class~="text-gray-600"] { color: rgba(75, 85, 99, 1); }
[class~="text-blue-600"] { color: #2563eb; }
[class~="text-sm"] { font-size: 14px; }
[class~="leading-relaxed"] { line-height: 1.625; }
[class~="font-mono"] { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
[class~="whitespace-pre-wrap"] { white-space: pre-wrap; }
[class~="underline"] { text-decoration: underline; }
[class~="bg-black/40"] { background-color: rgba(0, 0, 0, 0.4); }
[class~="backdrop-blur-sm"] { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

[class~="text-[11px]"].rounded-full {
    white-space: nowrap;
    line-height: 16px;
    vertical-align: middle;
}

[class~="rounded-full"][class~="inline-block"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
}

.table-toolbar {
    margin: 0 0 12px;
}

.upload-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

#batch-upload-button {
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid #c9d6ea;
    border-radius: 10px;
    background-color: #f5f9ff;
    color: #0d6efd;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

#batch-upload-button:hover {
    background-color: #e8f1ff;
}

#batch-upload-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: collapse !important;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

th, td {
    border: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 8px;
    text-align: left;
    line-height: 1.6;
    vertical-align: middle;
}

th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) {
    text-align: center;
}

th {
    background-color: #f2f2f2;
    color: #333;
}

.edit-btn, .delete-btn, .update-btn, .cancel-btn {
    height: 24px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 2px;
    font-size: 12px;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
}

.action-btn-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn-group .edit-btn,
.action-btn-group .delete-btn,
.action-btn-group .sync-one-btn,
.action-btn-group .copy-btn,
.action-btn-group .wecom-push-btn {
    margin-right: 0;
}

.grace-fee-tip {
    color: #dc3545;
    font-size: 12px;
    font-weight: 700;
    margin-left: 2px;
}

.status-badge {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 190px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.status-line-main {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.status-line-sub {
    font-size: 12px;
    line-height: 1.3;
}

.status-badge-danger {
    color: #842029;
    background: #f8d7da;
    border-color: #f1aeb5;
}

.status-badge-warning {
    color: #7a4d00;
    background: #fff3cd;
    border-color: #ffda6a;
}

.status-badge-success {
    color: #0f5132;
    background: #d1e7dd;
    border-color: #75b798;
}

.debug-editable-cell {
    background-color: #fff8d6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.debug-editable-cell:hover {
    background-color: #ffeaa6;
}

.status-level-red {
    color: #dc3545;
    font-weight: 700;
}

.status-level-orange {
    color: #fd7e14;
    font-weight: 700;
}

.status-level-green {
    color: #198754;
    font-weight: 700;
}

.btn-primary {
    background-color: #0d6efd;
    color: #fff;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.edit-btn {
    background-color: #276285;
    color: #fff;
}

.delete-btn {
    background-color: #dc3545;
}

.update-btn {
    background-color: #28a745;
}

.cancel-btn {
    background-color: #6c757d;
}

.search-container {
    display: flex;
    margin-bottom: 0;
}

#search-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    border-right: none;
}

#export-button {
    padding: 10px 20px;
    border: 1px solid #17a2b8;
    background-color: #17a2b8;
    color: white;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

#daily-broadcast-button {
    padding: 10px 16px;
    border: 1px solid #6c757d;
    background-color: #6c757d;
    color: white;
    cursor: pointer;
    border-radius: 0;
}

#daily-broadcast-button:hover {
    background-color: #5a6268;
}

#daily-broadcast-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#daily-broadcast-button.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    vertical-align: -2px;
}

#export-button:hover {
    background-color: #138496;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay.hidden {
    display: none !important;
}

.drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.modal {
    width: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.overlay .modal {
    background: rgba(10, 25, 41, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 55px rgba(2, 12, 24, 0.78), 0 0 34px rgba(24, 144, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    color-scheme: dark;
}

.overlay .modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay .modal-title {
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.2px;
}

.overlay .modal-body {
    padding: 22px;
}

.overlay .modal-body .field {
    margin-bottom: 16px;
    align-items: stretch;
}

.overlay #mark-reg-hint {
    margin: 0 0 16px;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.78);
    line-height: 1.5;
}

.overlay .field-label {
    font-weight: 500;
    color: #94a3b8;
    font-size: 12px;
}

.overlay .field-input {
    width: 100%;
    padding: 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.92);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease;
}

.overlay .field-input::placeholder {
    color: rgba(148, 163, 184, 0.8);
}

.overlay .field-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 8px rgba(24, 144, 255, 0.5);
    animation: overlay-input-breath 2.2s ease-in-out infinite;
}

@keyframes overlay-input-breath {
    0%, 100% {
        box-shadow: 0 0 8px rgba(24, 144, 255, 0.32);
    }
    50% {
        box-shadow: 0 0 12px rgba(24, 144, 255, 0.55);
    }
}

.overlay .modal-footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.overlay .primary-btn {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    box-shadow: none;
    border-radius: 10px;
    transition: transform 0.12s ease, filter 0.2s ease;
}

.overlay .primary-btn:hover:not(:disabled) {
    filter: brightness(1.06);
}

.overlay .primary-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.overlay .icon-btn {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: transparent;
    color: rgba(226, 232, 240, 0.92);
    border-radius: 10px;
    padding: 8px 12px;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.overlay .icon-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(148, 163, 184, 0.55);
}

.overlay .icon-btn:active {
    transform: scale(0.98);
}

.modal-header, .drawer-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title, .drawer-title {
    font-size: 18px;
    font-weight: 700;
}

.icon-btn {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.icon-btn:hover {
    background-color: #f2f2f2;
}

.modal-body, .drawer-body {
    padding: 20px;
    flex: 1;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-weight: 600;
    color: #444;
}

.field-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    user-select: none;
}

.primary-btn {
    min-height: 40px;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: #0d6efd;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.primary-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    vertical-align: -2px;
}

#sync-all-button {
    background: #1677ff;
    transition: background-color 0.15s ease;
}

#sync-all-button:hover {
    background: #0958d9;
}

.status-text {
    color: #444;
    font-size: 12px;
    white-space: pre-line;
}

.edit-input, .edit-select {
    width: 90%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.date-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
}

.date-label {
    font-weight: 600;
    color: #444;
}

.fee-hint {
    color: #dc3545;
    font-weight: 700;
    white-space: nowrap;
}

.fee-hint-inline {
    font-size: 12px;
    color: #ff4d4f;
    font-weight: 700;
    white-space: nowrap;
}

.action-td {
    min-width: 260px;
}

.action-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 36px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.badge-blue {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.badge-green {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.badge-orange {
    background-color: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.badge-red {
    background-color: #fff1f0;
    color: #f5222d;
    border: 1px solid #ffa39e;
}

.badge-gray {
    background-color: #f5f5f5;
    color: #8c8c8c;
    border: 1px solid #d9d9d9;
}

.type-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    white-space: nowrap;
    background-color: #f5f5f5;
    color: #595959;
}

.sou-td {
    min-width: 240px;
}

.sou-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.4;
}

.sou-text strong {
    font-weight: 800;
}

.sou-ext-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.sou-ext-btn:hover {
    background: #f2f2f2;
}

.sou-ext-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.oath-td {
    min-width: 280px;
}

.oath-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.4;
}

.oath-text {
    font-size: 13px;
    color: #333;
    font-weight: bold;
    white-space: nowrap;
}

.oath-text-urgent {
    color: #dc3545;
    font-weight: 800;
}

.oath-content * {
    margin: 0;
}

.oath-text-prepare {
    font-size: 14px;
}

.oath-text-prepare strong {
    font-weight: 800;
    font-size: 15px;
}

.row-prepare-soon {
    background-color: #f0f5ff;
}

.countdown {
    color: #333;
    font-weight: 600;
    white-space: nowrap;
}

.countdown-urgent {
    color: #dc3545;
    font-weight: 800;
}

.status-row-main {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.status-row-sub {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    margin-top: 0;
}

.stage-tag-first {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.stage-tag-renewal {
    background: #f9f0ff;
    color: #722ed1;
    border: 1px solid #d3adf7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.stage-tag-sou {
    background: #e6fffb;
    color: #13c2c2;
    border: 1px solid #87e8de;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-td {
    min-width: 300px;
}

th:nth-child(7), td:nth-child(7) {
    min-width: 320px;
}

.grace-deadline-highlight {
    color: #ff4d4f;
    font-weight: bold;
}

.editable-date {
    cursor: text;
    padding: 1px 2px;
}

.debug-active .editable-date {
    border-bottom: 1px dashed #007bff;
    color: #007bff;
}

.debug-active .editable-date:focus {
    outline: 1px solid #007bff;
    background-color: #f0f7ff;
    border-radius: 2px;
}

.badge-registered {
    color: #28a745;
    font-weight: bold;
}

.badge-noa {
    color: #007bff;
    font-weight: bold;
}

.mark-reg-btn {
    height: 24px;
    padding: 0 9px;
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
    margin-left: 2px;
}

.mark-reg-btn:hover {
    background-color: #218838;
}

.row-warn-soon {
    background-color: #fff9db !important;
}

.row-approved {
    background-color: #f1f3f5;
}

.row-warn-soft {
    background-color: #fff8db;
}

.row-danger-soft {
    background-color: #fff1f0;
}

.copy-btn {
    height: 24px;
    padding: 0 9px;
    border: 1px solid #0d6efd;
    border-radius: 4px;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 2px;
    font-size: 12px;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
    background-color: #0d6efd;
}

.copy-btn:hover {
    background-color: #0b5ed7;
}

.wecom-push-btn {
    height: 24px;
    padding: 0 9px;
    border: 1px solid #28a745;
    border-radius: 4px;
    background-color: #28a745;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
}

.wecom-push-btn:hover {
    background-color: #218838;
}

.wecom-push-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.wecom-push-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    vertical-align: -2px;
}

.expired {
    background-color: #f8d7da;
}

.due-soon {
    background-color: #fff3cd;
}

.hidden {
    display: none !important;
}

#reps-table {
    table-layout: auto;
    width: 100%;
    min-width: 1360px;
}

#reps-table th,
#reps-table td {
    padding: 10px 12px;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

#reps-table th:nth-child(1),
#reps-table td:nth-child(1) {
    text-align: center;
    width: 72px;
}

#reps-table th:nth-child(3),
#reps-table td:nth-child(3) {
    min-width: 220px;
}

#reps-table th:nth-child(7),
#reps-table td:nth-child(7),
#reps-table th:nth-child(8),
#reps-table td:nth-child(8) {
    width: 108px;
    min-width: 108px;
}

#reps-table th:nth-child(9),
#reps-table td:nth-child(9) {
    min-width: 160px;
}

.users-toolbar.rep-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.users-toolbar.rep-toolbar .primary-btn,
.users-toolbar.rep-toolbar .rep-ghost-btn {
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.rep-ghost-btn {
    border: 1px solid #1677ff;
    color: #1677ff;
    background: #fff;
}

.rep-ghost-btn:hover {
    background: #e6f4ff;
    border-color: #0958d9;
    color: #0958d9;
}

.rep-search-input {
    width: 240px;
    min-height: 40px;
    margin-left: auto;
}

.overlay .rep-modal {
    width: 900px;
    max-width: calc(100vw - 32px);
    background: #fff;
    color: #1f2937;
    border: 1px solid #e6edf7;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    color-scheme: light;
}

.overlay .rep-modal .modal-header {
    background: #f7fbff;
    border-bottom: 1px solid #edf2fa;
}

.overlay .rep-modal .modal-title {
    color: #1f2937;
}

.overlay .rep-modal .modal-body {
    padding: 20px 22px 16px;
}

.rep-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rep-form-group {
    border: 1px solid #edf2fa;
    border-radius: 10px;
    padding: 12px 12px 6px;
}

.rep-form-group-title {
    margin-bottom: 10px;
    font-weight: 700;
    color: #334155;
    font-size: 13px;
}

.rep-grid-span-2 {
    grid-column: span 2;
}

.rep-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rep-reminder-toggle {
    margin-top: 4px;
}

.overlay .rep-modal .field {
    margin-bottom: 14px;
}

.overlay .rep-modal .field-label {
    color: #475569;
}

.overlay .rep-modal .field-input {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #111827;
    box-shadow: none;
    animation: none;
}

.overlay .rep-modal .field-input::placeholder {
    color: #94a3b8;
}

.overlay .rep-modal .field-input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.18);
    animation: none;
}

.overlay .rep-modal .toggle {
    color: #334155;
    font-size: 14px;
    font-weight: 500;
}

.overlay .rep-modal .toggle input {
    accent-color: #1677ff;
}

.overlay .rep-modal .modal-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #edf2fa;
}

.overlay .rep-modal .icon-btn {
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #334155;
}

.overlay .rep-modal .icon-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.rep-type-badge,
.rep-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    border: 1px solid transparent;
}

.rep-status-badge {
    gap: 6px;
}

.rep-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
}

.rep-status-dot-active {
    background: #52c41a;
}

.rep-status-dot-near {
    background: #faad14;
}

.rep-status-dot-expired {
    background: #ff4d4f;
}

.rep-action-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.rep-action-btn:hover {
    border-color: #1677ff;
    color: #1677ff;
    background: #f0f7ff;
}

.rep-action-btn i {
    font-size: 14px;
}

#reps-table th:nth-child(11),
#reps-table td:nth-child(11) {
    min-width: 130px;
}

@media (max-width: 900px) {
    .rep-search-input {
        margin-left: 0;
        width: 100%;
    }
    .rep-form-grid {
        grid-template-columns: 1fr;
    }
    .rep-grid-span-2 {
        grid-column: span 1;
    }
    .rep-form-row {
        grid-template-columns: 1fr;
    }
}

.rep-type-eu {
    color: #0958d9;
    background: #e6f4ff;
    border-color: #91caff;
}

.rep-type-uk {
    color: #cf1322;
    background: #fff1f0;
    border-color: #ffa39e;
}

.rep-type-tr {
    color: #ad4e00;
    background: #fff7e6;
    border-color: #ffd591;
}

.rep-status-active {
    color: #237804;
    background: #f6ffed;
    border-color: #b7eb8f;
}

.rep-status-near {
    color: #ad6800;
    background: #fffbe6;
    border-color: #ffe58f;
}

.rep-status-expired {
    color: #a8071a;
    background: #fff1f0;
    border-color: #ffa39e;
}
