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;
}

/* Minimal login page */
.authpage {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #ffffff;
}

.authpage-copyright {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    text-align: center;
    font-size: 12.5px;
    color: #9aa7bd;
}

.authpage-copyright a {
    color: inherit;
    text-decoration: none;
}

.authpage-copyright a:hover {
    text-decoration: underline;
}

.authpage-card {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 36px 32px;
    border: 1px solid #e6e9f0;
    border-radius: 8px;
}

.authpage-brand {
    display: flex;
    justify-content: center;
}

.authpage-brand img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.authpage-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.authpage-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2a44;
    margin: 0;
}

.authpage-header p {
    font-size: 13.5px;
    color: #6c7a95;
    margin: 0;
}

.authpage-alert {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 8px;
}

.authpage-alert-success {
    color: #067647;
    background: #ecfdf3;
    border-color: #abefc6;
}

.authpage-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.authpage-field label {
    font-size: 13px;
    font-weight: 500;
    color: #344054;
}

.authpage-field input,
.authpage-input input {
    width: 100%;
    border: 1px solid #dfe4ee;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #1f2a44;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.authpage-field input::placeholder,
.authpage-input input::placeholder {
    color: #9aa7bd;
}

.authpage-field input:focus,
.authpage-input input:focus {
    outline: none;
    border-color: #a9c6fb;
    box-shadow: 0 0 0 3px rgba(47, 111, 236, 0.15);
}

.authpage-input {
    position: relative;
    display: flex;
    align-items: center;
}

.authpage-input input {
    padding-right: 40px;
}

.authpage-toggle {
    position: absolute;
    right: 6px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7b8aa6;
    cursor: pointer;
    font-size: 16px;
    border-radius: 8px;
}

.authpage-toggle:hover {
    color: #2f6fec;
}

.authpage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.authpage-remember input {
    width: 15px;
    height: 15px;
    accent-color: #2f6fec;
    cursor: pointer;
}

.authpage-forgot {
    font-size: 13px;
    font-weight: 500;
    color: #2f6fec;
    text-decoration: none;
}

.authpage-forgot:hover {
    text-decoration: underline;
}

.authpage-submit {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    background: #2f6fec;
    cursor: pointer;
    transition: background 0.15s ease;
}

.authpage-submit:hover {
    background: #2354c9;
}

.authpage-back-link {
    text-align: center;
}

.authpage-help {
    text-align: center;
    font-size: 12.5px;
    color: #6c7a95;
}

