.admin-view {
    max-width: 1120px;
}

.admin-header {
    margin-bottom: 22px;
}

.admin-header h1 {
    margin: 0;
    color: var(--bs-body-color);
    font-size: 28px;
    font-weight: 800;
}

.admin-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--bs-body-color);
    text-align: left;
    font-weight: 800;
}

.admin-nav-item:hover,
.admin-nav-item:focus,
.admin-nav-item.is-active {
    border-color: var(--bs-border-color);
    background: var(--bs-secondary-bg);
    outline: 0;
}

.admin-panel {
    min-width: 0;
}

.admin-panel-header {
    margin-bottom: 18px;
}

.admin-panel-header h2 {
    margin: 0 0 5px;
    color: var(--bs-body-color);
    font-size: 20px;
    font-weight: 800;
}

.admin-panel-header p {
    margin: 0;
    color: var(--bs-secondary-color);
    font-weight: 700;
}

.admin-placeholder {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px dashed var(--bs-border-color);
    border-radius: 8px;
    color: var(--bs-secondary-color);
}

.admin-placeholder i {
    color: var(--color-accent);
    font-size: 24px;
}

.admin-placeholder strong {
    display: block;
    margin-bottom: 3px;
    color: var(--bs-body-color);
}

.admin-placeholder span {
    display: block;
    line-height: 1.5;
}

.workflow-editor {
    display: grid;
    gap: 28px;
}

.workflow-section {
    display: grid;
    gap: 14px;
}

.workflow-section-header h3 {
    margin: 0 0 4px;
    color: var(--bs-body-color);
    font-size: 18px;
    font-weight: 800;
}

.workflow-section-header p {
    margin: 0;
    color: var(--bs-secondary-color);
    font-weight: 700;
}

.workflow-context-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.workflow-graph-panel,
.workflow-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.workflow-graph-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--bs-border-color);
}

.workflow-graph-toolbar strong,
.workflow-card h3 {
    margin: 0;
    color: var(--bs-body-color);
    font-size: 15px;
    font-weight: 800;
}

.workflow-graph {
    width: 100%;
    height: 420px;
    background: var(--bs-secondary-bg);
}

.workflow-empty {
    padding: 16px;
    color: var(--bs-secondary-color);
    font-weight: 700;
}

.workflow-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.workflow-card {
    padding: 14px;
}

.workflow-card-wide {
    grid-column: 1 / -1;
}

.workflow-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    margin: 12px 0 14px;
}

.workflow-form-stacked {
    grid-template-columns: 1fr;
}

.workflow-list {
    display: grid;
    gap: 8px;
}

.workflow-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-secondary-bg);
}

.workflow-list-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
}

.workflow-list-main span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    min-width: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
}

.admin-options-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.admin-option-card {
    display: grid;
    align-content: start;
    gap: 14px;
}

.admin-option-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.8fr) auto;
    gap: 8px;
    align-items: center;
}

.admin-option-list {
    display: grid;
    gap: 8px;
}

.admin-type-editor {
    display: grid;
    gap: 14px;
}

.admin-subsection {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}

.admin-subsection h4 {
    margin: 0;
    color: var(--bs-body-color);
    font-size: 14px;
    font-weight: 800;
}

.admin-option-item {
    display: grid;
    grid-template-columns: 34px minmax(180px, 1fr) minmax(180px, 0.8fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-secondary-bg);
}

.admin-selected-option {
    background: var(--bs-body-bg);
}

.admin-custom-field-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.6fr) minmax(150px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.admin-custom-field-list {
    display: grid;
    gap: 8px;
}

.admin-custom-field-item {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.6fr) minmax(150px, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-secondary-bg);
}

.admin-user-editor {
    display: grid;
    gap: 14px;
}

.admin-user-rights {
    display: grid;
    gap: 12px;
}

.admin-user-summary {
    padding: 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-secondary-bg);
}

.admin-user-section {
    display: grid;
    gap: 10px;
}

.admin-user-section h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

.admin-right-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.admin-right-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-secondary-bg);
    font-weight: 700;
}

.admin-right-item input {
    flex: 0 0 auto;
}

.admin-project-access-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.admin-project-access-list,
.admin-project-owner-list {
    display: grid;
    gap: 8px;
}

.admin-project-access-item,
.admin-project-owner-list span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-secondary-bg);
    font-weight: 700;
}

.admin-project-access-item small,
.admin-project-owner-list small {
    color: var(--bs-secondary-color);
    font-weight: 700;
}

.admin-option-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    color: var(--bs-secondary-color);
    background: var(--bs-body-bg);
}

.admin-option-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.admin-option-remove-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--bs-secondary-color);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-option-actions {
    display: flex;
    gap: 6px;
}

.admin-option-actions .btn {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
}

@media (max-width: 700px) {

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .workflow-editor-grid {
        grid-template-columns: 1fr;
    }

    .admin-options-grid {
        grid-template-columns: 1fr;
    }

    .workflow-context-panel {
        grid-template-columns: 1fr;
    }

    .workflow-form,
    .admin-option-form,
    .admin-option-item,
    .admin-custom-field-form,
    .admin-custom-field-item {
        grid-template-columns: 1fr;
    }
}
