Fix admin import chain and tests
This commit is contained in:
@@ -1,332 +1,439 @@
|
||||
/* Админка — палитра из §5 контекста */
|
||||
.admin-dashboard {
|
||||
min-height: 100vh;
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.admin-header {
|
||||
background: var(--bg-secondary);
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding: 16px 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.admin-header h1 {
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.admin-nav {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.admin-nav button {
|
||||
padding: 8px 16px;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.admin-nav button:hover {
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.admin-nav button.active {
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.admin-content {
|
||||
padding: 24px;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
background: linear-gradient(180deg, #0d1117 0%, #111827 100%);
|
||||
color: #e6edf3;
|
||||
}
|
||||
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 20px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.stat-card h3 {
|
||||
margin: 0 0 8px 0;
|
||||
font-size: 14px;
|
||||
color: var(--text-secondary);
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.stat-change {
|
||||
font-size: 14px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.stat-change.positive {
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.stat-change.negative {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.cases-table {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
.admin-hero {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 20px;
|
||||
padding: 20px;
|
||||
border: 1px solid #21262d;
|
||||
border-radius: 18px;
|
||||
background: #0d1117;
|
||||
}
|
||||
|
||||
.table-header h2 {
|
||||
.admin-kicker {
|
||||
margin: 0 0 8px;
|
||||
color: #ff7b42;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.admin-hero h1 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.admin-subtitle {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
color: #8b949e;
|
||||
line-height: 1.5;
|
||||
max-width: 760px;
|
||||
}
|
||||
|
||||
.table-actions {
|
||||
.admin-hero-actions {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
padding: 8px 16px;
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
.admin-metrics-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.admin-metric-card,
|
||||
.admin-panel {
|
||||
border: 1px solid #21262d;
|
||||
border-radius: 16px;
|
||||
background: #0d1117;
|
||||
}
|
||||
|
||||
.admin-metric-card {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.admin-metric-label {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
color: #8b949e;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.admin-metric-card strong {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.admin-panel {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.admin-upload-panel {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.admin-upload-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.admin-upload-row {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: flex-end;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.admin-file-picker {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
min-width: min(100%, 320px);
|
||||
}
|
||||
|
||||
.admin-file-picker input {
|
||||
border: 1px solid #30363d;
|
||||
border-radius: 12px;
|
||||
background: #161b22;
|
||||
color: #e6edf3;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.admin-upload-hint {
|
||||
color: #8b949e;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.admin-upload-preview {
|
||||
margin-top: 16px;
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.admin-upload-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.admin-upload-grid h3 {
|
||||
margin: 0 0 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.admin-preview-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.admin-preview-list li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #21262d;
|
||||
background: #161b22;
|
||||
}
|
||||
|
||||
.admin-preview-list strong {
|
||||
text-transform: lowercase;
|
||||
color: #8b949e;
|
||||
}
|
||||
|
||||
.admin-preview-list span {
|
||||
text-align: right;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.admin-raw-details {
|
||||
border: 1px solid #21262d;
|
||||
border-radius: 12px;
|
||||
background: #161b22;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.admin-raw-details summary {
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: var(--accent-hover);
|
||||
.admin-raw-text {
|
||||
margin: 12px 0 0;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
color: #c9d1d9;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
padding: 8px 16px;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
.admin-panel-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
border-color: var(--accent);
|
||||
.admin-panel-header h2 {
|
||||
margin: 0 0 6px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
table {
|
||||
.admin-panel-header p {
|
||||
margin: 0;
|
||||
color: #8b949e;
|
||||
}
|
||||
|
||||
.admin-filters-grid,
|
||||
.admin-form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.admin-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 1.7fr 1fr;
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.admin-table-panel,
|
||||
.admin-editor-panel {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.admin-table-wrap {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.admin-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
thead {
|
||||
background: var(--bg-primary);
|
||||
}
|
||||
|
||||
thead th {
|
||||
padding: 12px 20px;
|
||||
.admin-table th,
|
||||
.admin-table td {
|
||||
padding: 12px 10px;
|
||||
border-bottom: 1px solid #21262d;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.admin-table th {
|
||||
color: #8b949e;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
border-bottom: 1px solid var(--border);
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
tbody tr:hover {
|
||||
background: var(--bg-primary);
|
||||
}
|
||||
|
||||
tbody td {
|
||||
padding: 16px 20px;
|
||||
font-size: 14px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.status-badge.active {
|
||||
background: var(--warning);
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.status-badge.closed {
|
||||
background: var(--success);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.status-badge.archived {
|
||||
background: var(--text-secondary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Графики */
|
||||
.chart-container {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.chart-container h3 {
|
||||
margin: 0 0 16px 0;
|
||||
font-size: 16px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Цвета для графиков из палитры админки */
|
||||
.chart-distance {
|
||||
color: var(--chart-distance);
|
||||
}
|
||||
|
||||
.chart-terrain {
|
||||
color: var(--chart-terrain);
|
||||
}
|
||||
|
||||
.chart-outcome {
|
||||
color: var(--chart-outcome);
|
||||
}
|
||||
|
||||
/* Форма загрузки документов */
|
||||
.upload-zone {
|
||||
background: var(--bg-secondary);
|
||||
border: 2px dashed var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
.admin-table tbody tr {
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.upload-zone:hover {
|
||||
border-color: var(--accent);
|
||||
background: var(--bg-primary);
|
||||
.admin-table tbody tr:hover,
|
||||
.admin-table tbody tr.is-selected {
|
||||
background: rgba(255, 77, 0, 0.08);
|
||||
}
|
||||
|
||||
.upload-zone.dragging {
|
||||
border-color: var(--accent);
|
||||
background: var(--bg-primary);
|
||||
.admin-empty-state {
|
||||
padding: 28px 12px;
|
||||
text-align: center;
|
||||
color: #8b949e;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
font-size: 48px;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 16px;
|
||||
.admin-pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.upload-text {
|
||||
font-size: 16px;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.upload-hint {
|
||||
.admin-pagination-summary {
|
||||
color: #8b949e;
|
||||
font-size: 14px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.admin-header {
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
align-items: flex-start;
|
||||
.admin-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.admin-field-wide {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.admin-field span {
|
||||
color: #8b949e;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.admin-field input,
|
||||
.admin-field select,
|
||||
.admin-field textarea {
|
||||
width: 100%;
|
||||
border: 1px solid #30363d;
|
||||
border-radius: 12px;
|
||||
background: #161b22;
|
||||
color: #e6edf3;
|
||||
padding: 12px 12px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.admin-field textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.admin-form-actions {
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.admin-case-meta {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid #21262d;
|
||||
}
|
||||
|
||||
.admin-case-meta span {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
color: #8b949e;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.admin-case-meta strong {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.admin-empty-editor {
|
||||
padding: 28px 12px;
|
||||
color: #8b949e;
|
||||
}
|
||||
|
||||
.admin-alert {
|
||||
margin-top: 12px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.admin-alert-error {
|
||||
background: rgba(248, 81, 73, 0.12);
|
||||
border: 1px solid #f85149;
|
||||
color: #ffb4b4;
|
||||
}
|
||||
|
||||
.admin-alert-success {
|
||||
background: rgba(46, 160, 67, 0.12);
|
||||
border: 1px solid #2ea043;
|
||||
color: #b8f7c5;
|
||||
}
|
||||
|
||||
.admin-primary-button,
|
||||
.admin-secondary-button {
|
||||
min-height: 44px;
|
||||
border-radius: 12px;
|
||||
padding: 0 16px;
|
||||
border: 1px solid transparent;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.admin-primary-button {
|
||||
background: #ff4d00;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.admin-secondary-button {
|
||||
background: #161b22;
|
||||
border-color: #30363d;
|
||||
color: #e6edf3;
|
||||
}
|
||||
|
||||
.admin-secondary-button:disabled,
|
||||
.admin-primary-button:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.admin-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
border-radius: 999px;
|
||||
padding: 5px 10px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
.admin-badge-neutral {
|
||||
background: #161b22;
|
||||
border: 1px solid #30363d;
|
||||
color: #c9d1d9;
|
||||
}
|
||||
|
||||
.admin-badge-success {
|
||||
background: rgba(46, 160, 67, 0.15);
|
||||
border: 1px solid #2ea043;
|
||||
color: #b8f7c5;
|
||||
}
|
||||
|
||||
.admin-badge-danger {
|
||||
background: rgba(248, 81, 73, 0.15);
|
||||
border: 1px solid #f85149;
|
||||
color: #ffb4b4;
|
||||
}
|
||||
|
||||
.admin-mono {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.admin-metrics-grid {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.admin-nav {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.admin-nav button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.stats-grid {
|
||||
|
||||
.admin-layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.admin-dashboard {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.table-actions {
|
||||
width: 100%;
|
||||
|
||||
.admin-hero {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.table-actions button {
|
||||
width: 100%;
|
||||
|
||||
.admin-metrics-grid,
|
||||
.admin-filters-grid,
|
||||
.admin-form-grid,
|
||||
.admin-case-meta {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
thead th,
|
||||
tbody td {
|
||||
padding: 8px 12px;
|
||||
|
||||
.admin-pagination {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user