.oa-domain--system {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    color: #27272a;
    background: #f7f7f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

.oa-domain--system,
.oa-domain--system * {
    box-sizing: border-box;
}

.oa-domain--system button,
.oa-domain--system input {
    font: inherit;
    letter-spacing: 0;
}

.oa-domain--system .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.oa-domain--system .header-left,
.oa-domain--system .header-right {
    min-width: 0;
    display: flex;
    align-items: center;
}

.oa-domain--system .header-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.oa-domain--system .badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.oa-domain--system.oa-sidebar-07 > .main-container {
    position: relative;
    height: 100vh;
    margin-top: 0;
    padding-top: var(--oa-sidebar-header-height);
    min-width: 0;
    overflow: hidden;
}

.oa-domain--system .content {
    width: 100%;
    height: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 22px;
    overflow: hidden;
}

.oa-domain--system .system-page-heading {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 0 2px 18px;
}

.oa-domain--system .system-page-heading h1 {
    margin: 3px 0 0;
    color: #18181b;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.oa-domain--system .system-page-heading p {
    margin: 6px 0 0;
    color: #71717a;
    font-size: 13px;
    line-height: 1.5;
}

.oa-domain--system .system-page-heading .system-page-eyebrow {
    margin: 0;
    color: #52525b;
    font-size: 12px;
    font-weight: 600;
}

.oa-domain--system .system-stage {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #ffffff;
}

.oa-domain--system .system-frame {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #ffffff;
}

.oa-domain--system .system-state {
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px;
    color: #71717a;
    text-align: center;
}

.oa-domain--system .system-state[hidden],
.oa-domain--system .system-frame[hidden],
.oa-domain--system .modal[hidden],
.oa-domain--system [hidden] {
    display: none !important;
}

.oa-domain--system .system-state > svg {
    width: 30px;
    height: 30px;
    color: #a1a1aa;
}

.oa-domain--system .system-state h2,
.oa-domain--system .system-state p {
    margin: 0;
}

.oa-domain--system .system-state h2 {
    color: #27272a;
    font-size: 18px;
}

.oa-domain--system .system-state-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e4e4e7;
    border-top-color: #52525b;
    border-radius: 50%;
    animation: system-shell-spin 700ms linear infinite;
}

.oa-domain--system .system-state-action,
.oa-domain--system .secondary-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border: 1px solid #d4d4d8;
    border-radius: 6px;
    color: #27272a;
    background: #ffffff;
    text-decoration: none;
    cursor: pointer;
}

.oa-domain--system .system-state-action:hover,
.oa-domain--system .secondary-button:hover {
    background: #f4f4f5;
}

.oa-domain--system .dropdown-menu {
    display: none;
}

.oa-domain--system .dropdown-menu.active {
    display: block;
}

.oa-domain--system .dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.oa-domain--system .dropdown-divider {
    height: 1px;
    margin: 5px 4px;
    background: #e4e4e7;
}

.oa-domain--system .modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(9, 9, 11, 0.48);
}

.oa-domain--system .modal-content {
    width: min(460px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(9, 9, 11, 0.2);
}

.oa-domain--system .modal-header,
.oa-domain--system .modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
}

.oa-domain--system .modal-header {
    border-bottom: 1px solid #e4e4e7;
}

.oa-domain--system .modal-footer {
    justify-content: flex-end;
    border-top: 1px solid #e4e4e7;
}

.oa-domain--system .modal-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.oa-domain--system .modal-close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #71717a;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.oa-domain--system .modal-close:hover {
    color: #18181b;
    background: #f4f4f5;
}

.oa-domain--system .modal-body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.oa-domain--system .form-group {
    display: grid;
    gap: 6px;
    color: #52525b;
    font-size: 13px;
    font-weight: 600;
}

.oa-domain--system .form-group input {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid #d4d4d8;
    border-radius: 6px;
    color: #27272a;
    background: #fafafa;
    font-size: 14px;
}

@keyframes system-shell-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1023px) {
    .oa-domain--system .content {
        padding: 16px;
    }

    .oa-domain--system .system-page-heading {
        padding-bottom: 14px;
    }
}

@media (max-width: 479px) {
    .oa-domain--system .content {
        padding: 12px;
    }

    .oa-domain--system .system-page-heading h1 {
        font-size: 21px;
    }

    .oa-domain--system .system-page-heading > div > p:last-child {
        max-width: 300px;
    }

    .oa-domain--system .system-stage {
        border-radius: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oa-domain--system .system-state-spinner {
        animation-duration: 1.5s;
    }
}
