body {
    background: #f5f7fb;
    color: #1f2a44;
    min-height: 100vh;
}

.body-wrapper {
    background: #f5f7fb;
}

.system-card {
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e6edf7;
    box-shadow: 0 10px 24px rgba(31, 42, 68, 0.05);
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.system-grid-span {
    grid-column: 1 / -1;
}

.license-preview-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.license-preview-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.license-preview-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c7a95;
    margin-bottom: 4px;
}

.license-preview-key {
    font-size: 18px;
    font-weight: 600;
    color: #1f2a44;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.license-preview-tenant {
    font-size: 12px;
    color: #6c7a95;
    margin-top: 6px;
}

.license-preview-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.license-preview-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f1f5fb;
    border: 1px solid #e2e8f5;
    border-radius: 14px;
    padding: 14px 16px;
}

.license-preview-plan-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2a44;
}

.license-preview-plan-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.license-preview-plan-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #1d4ed8;
    background: #e0edff;
    border-radius: 999px;
    padding: 4px 10px;
}

.license-preview-pricing {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.license-price-box {
    background: #ffffff;
    border: 1px solid #e6edf7;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.license-price-box .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a0b8;
}

.license-price-box .value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2a44;
}

.license-preview-limits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.license-limit-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e6edf7;
    border-radius: 999px;
    padding: 6px 12px;
}

.license-limit-pill .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6c7a95;
}

.license-limit-pill .value {
    font-size: 13px;
    font-weight: 600;
    color: #1f2a44;
}

.license-preview-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.license-date-item {
    background: #ffffff;
    border: 1px dashed #e6edf7;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.license-date-item .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a0b8;
}

.license-date-item .value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2a44;
}

.license-preview-notes {
    background: #ffffff;
    border: 1px solid #e6edf7;
    border-radius: 12px;
    padding: 12px 14px;
}

.license-preview-notes .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a0b8;
    margin-bottom: 6px;
}

.system-section {
    padding-bottom: 20px;
    border-bottom: 1px dashed #e2e8f5;
    margin-bottom: 20px;
}

.system-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2a44;
    margin-bottom: 4px;
}

.system-section-subtitle {
    font-size: 12px;
    color: #6c7a95;
    margin-bottom: 16px;
}

.system-settings-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.system-settings-summary .summary-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2a44;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.system-settings-summary .summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e6edf7;
}

.system-settings-summary .summary-item .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a0b8;
}

.system-settings-summary .summary-item .value {
    font-size: 13px;
    font-weight: 600;
    color: #1f2a44;
    text-align: right;
}

.system-settings-summary .summary-meta {
    font-size: 11px;
    color: #94a0b8;
    text-align: right;
    margin-top: 4px;
}

.license-preview-notes .value {
    font-size: 13px;
    color: #6c7a95;
}

.system-stat {
    background: #f8faff;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid #e6edf7;
}

.system-stat .label {
    font-size: 12px;
    color: #6c7a95;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.system-stat .value {
    font-size: 22px;
    font-weight: 600;
    margin-top: 6px;
}

.system-table {
    width: 100%;
    border-collapse: collapse;
}

.system-table th,
.system-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eef2f8;
    text-align: left;
    font-size: 14px;
}

.system-table th {
    color: #6c7a95;
    font-weight: 600;
}

.system-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.system-pill.active {
    background: #e8f2ff;
    color: #2f6fec;
}

.system-pill.suspended {
    background: #ffeaea;
    color: #c93535;
}

.system-pill.emergency,
.system-pill.alert,
.system-pill.critical,
.system-pill.error {
    background: #ffecec;
    color: #c93535;
}

.system-pill.warning {
    background: #fff4e5;
    color: #c37a1e;
}

.system-pill.notice {
    background: #eef2ff;
    color: #4a5bdc;
}

.system-pill.info {
    background: #e9f6ff;
    color: #2f6fec;
}

.system-pill.debug {
    background: #f3f5f9;
    color: #6c7a95;
}

.system-log-table {
    max-height: 520px;
    overflow: auto;
}

.system-log-details summary {
    cursor: pointer;
    font-size: 12px;
    color: #6c7a95;
    margin-top: 6px;
}

.system-log-details pre {
    margin-top: 8px;
    background: #f7f9fc;
    border-radius: 10px;
    padding: 12px;
    font-size: 12px;
    color: #23324d;
    white-space: pre-wrap;
}

.system-notification-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #1f2a44;
}

.system-notification-dropdown {
    min-width: 320px;
    padding: 0;
    border: 1px solid #e6edf7;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(31, 42, 68, 0.15);
}

.system-notification-head {
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.system-notification-list {
    padding: 6px 0;
}

.system-notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f1f4fb;
    align-items: flex-start;
}

.system-notification-item:last-child {
    border-bottom: 0;
}

.system-notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #fef3c7;
    color: #92400e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.system-notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.system-notification-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.system-notification-ms {
    font-weight: 600;
    color: #1f2a44;
}

.system-notification-sql {
    color: #6c7a95;
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
    white-space: normal;
}

.system-notification-meta {
    display: flex;
    gap: 6px;
    font-size: 11px;
    color: #6c7a95;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .system-notification-dropdown {
        min-width: 260px;
    }
}

.system-form {
    display: grid;
    gap: 16px;
}

.system-form label {
    font-size: 13px;
    color: #6c7a95;
    margin-bottom: 6px;
}

.system-form input,
.system-form select,
.system-form textarea {
    width: 100%;
    border: 1px solid #dfe6f1;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}

.system-section-title {
    font-weight: 600;
    font-size: 15px;
    color: #24324b;
}

.system-alert {
    margin-bottom: 16px;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.plan-toggle-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e6edf7;
    box-shadow: 0 6px 20px rgba(31, 42, 68, 0.05);
}

.plan-type-toggle {
    width: 100%;
}

.plan-type-toggle .plan-toggle {
    flex: 1;
    justify-content: center;
}

.plan-toggle {
    border: none;
    background: transparent;
    color: #5b6a85;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.plan-toggle.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.plan-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e6edf7;
    box-shadow: 0 14px 28px rgba(31, 42, 68, 0.08);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.plan-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.plan-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.plan-subtitle {
    color: #6c7a95;
    font-size: 13px;
    max-width: 280px;
}

.plan-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.plan-badge {
    background: #edf4ff;
    color: #2f6fec;
}

.plan-pricing {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-price {
    font-size: 28px;
    font-weight: 600;
    color: #1f2a44;
}

.plan-price-secondary {
    font-size: 16px;
    font-weight: 500;
    color: #1f2a44;
}

.plan-unit {
    font-size: 14px;
    font-weight: 500;
    color: #6c7a95;
}

.plan-price-meta {
    color: #6c7a95;
    font-size: 12px;
}

.plan-note {
    background: #f7f9fd;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    color: #5b6a85;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-note-strong {
    font-weight: 600;
    color: #2f6fec;
}

.plan-feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px 16px;
    font-size: 13px;
    color: #6c7a95;
}

.plan-feature-list span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a0b8;
}

.plan-feature-list strong {
    display: block;
    font-weight: 600;
    color: #1f2a44;
}

.plan-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.plan-form-section {
    background: #f8faff;
    border: 1px solid #e6edf7;
    border-radius: 16px;
    padding: 18px;
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.plan-form-title {
    font-weight: 600;
    font-size: 15px;
    color: #24324b;
}

.plan-form-subtitle {
    color: #6c7a95;
    font-size: 12px;
}

.plan-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.system-auth-body {
    background: #f3f6fd;
}

.system-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: radial-gradient(circle at top left, #edf3ff 0%, #f6f8ff 45%, #f5f7fb 100%);
}

.system-auth-card {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid #e6edf7;
    box-shadow: 0 24px 60px rgba(31, 42, 68, 0.12);
    overflow: hidden;
}

.system-auth-aside {
    padding: 32px 34px;
    background: linear-gradient(155deg, #f4f7ff 0%, #ffffff 60%);
    border-right: 1px solid #eef2f8;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.system-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.system-auth-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.system-auth-brand-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2a44;
}

.system-auth-brand-subtitle {
    font-size: 12px;
    color: #6c7a95;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.system-auth-aside h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1f2a44;
    margin: 4px 0;
}

.system-auth-lead {
    color: #5b6a85;
    font-size: 14px;
    margin-bottom: 4px;
}

.system-auth-highlights {
    display: grid;
    gap: 10px;
    font-size: 13px;
    color: #5b6a85;
}

.system-auth-highlights div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #eef2f8;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(31, 42, 68, 0.06);
}

.system-auth-highlights i {
    color: #2f6fec;
    font-size: 18px;
}

.system-auth-form {
    padding: 32px 34px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.system-auth-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2a44;
    margin-bottom: 6px;
}

.system-auth-form-fields {
    gap: 18px;
}

.system-auth-form input {
    background: #ffffff;
    color: #1f2a44;
}

.system-auth-form input::placeholder {
    color: #9aa7bd;
}

.system-auth-form input:focus {
    border-color: #6ba4ff;
    box-shadow: 0 0 0 0.2rem rgba(47, 111, 236, 0.18);
    outline: none;
}

.system-auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.system-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5b6a85;
}

.system-auth-help {
    font-size: 12px;
}

.system-auth-alert {
    margin-bottom: 0;
}

.system-footer {
    border-top: 1px solid #e6edf7;
    padding: 10px 24px 16px;
    font-size: 12px;
    color: #7a879f;
    text-align: right;
    background: #f5f7fb;
}

@media (max-width: 960px) {
    .system-auth-card {
        grid-template-columns: 1fr;
    }

    .system-auth-aside {
        border-right: none;
        border-bottom: 1px solid #eef2f8;
    }
}
