@charset "utf-8";

/* Layout */

#ftr-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    flex: 1;
}

.content {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px 20px;
}

.content-fluid {
    margin-left: auto;
    margin-right: auto;
    padding: 30px 20px;
}

/* Cards — vertical spacing between stacked cards */

.px-card + .px-card {
    margin-top: 1rem;
}

.px-card h3 {
    margin-top: 0;
}

/* Login page */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-wrap {
    width: 100%;
    max-width: 400px;
    padding: 16px;
}

.login-card {
    padding: 0;
    border-radius: var(--px-r-md);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 24px 24px 20px;
    border-top: 3px solid var(--px-cyan);
    border-radius: var(--px-r-md) var(--px-r-md) 0 0;
    background: var(--px-surface-1);
    border-bottom: 1px solid var(--px-border);
}

.login-header img {
    height: 36px;
}

.login-body {
    padding: 24px;
}

.login-body .px-btn {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

/* Form labels */

label {
    display: block;
    font-size: 12px;
    color: var(--px-text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

/* Select arrow — custom chevron matching the styleguide */

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.6) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.6) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

/* Password inputs — not covered by components.css */

input[type="password"] {
    width: 100%;
    min-height: 46px;
    border-radius: var(--px-r-sm);
    border: 1px solid var(--px-border);
    background: rgba(0, 0, 0, 0.24);
    color: var(--px-text);
    font-family: var(--px-font-ui);
    padding: 0.65rem 0.78rem;
}

input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

input[type="password"]:focus {
    outline: none;
    border-color: var(--px-cyan);
    box-shadow: var(--px-focus);
}

/* Number inputs — hide the browser spinners */

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Form helper text */

.form-helper {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.license-status {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Pagination page size */

.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.list-toolbar .page-size {
    margin-bottom: 0;
}

.page-size {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.page-size label {
    margin: 0;
}

.page-size select {
    width: auto;
    min-width: 80px;
    min-height: 38px;
    padding: 0.3rem 0.5rem;
}

/* Modal */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-dialog {
    width: 100%;
    max-width: 460px;
}

.modal-dialog--wide {
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Password policy */

.policy-section {
    display: grid;
    gap: 0.72rem;
    margin-top: 1rem;
    margin-bottom: 0.42rem;
}

.policy-form {
    margin-top: -0.3rem;
}

.policy-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--px-border);
    border-radius: var(--px-r-sm);
    background: rgba(255, 255, 255, 0.03);
}

.policy-row + .policy-row {
    margin-top: 0.4rem;
}

.policy-row--length {
    justify-content: space-between;
}

.policy-row__label {
    font-weight: 600;
    color: var(--px-text);
}

.policy-row__hint {
    font-size: 12px;
    color: var(--px-text-muted);
    margin-top: 2px;
}

.policy-row__text {
    flex: 1;
    font-size: 0.88rem;
}

.policy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: var(--px-r-sm);
    border: 1px solid var(--px-border);
    background: rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-weight: 600;
    color: var(--px-text-muted);
}

.policy-length {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.policy-length input {
    width: 90px;
}

.policy-inline-select {
    width: auto;
    min-width: 64px;
    min-height: 32px;
    padding: 0.15rem 1.4rem 0.15rem 0.5rem;
    margin: 0 0.25rem;
}

.policy-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.policy-preview > .px-card {
    align-content: start;
}

.policy-preview > .px-card + .px-card {
    margin-top: 0;
}

.policy-preview__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.policy-preview code {
    font-family: monospace;
    font-size: 1rem;
    color: var(--px-cyan);
    overflow-wrap: anywhere;
}

.policy-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
}

.policy-actions__group {
    display: flex;
    gap: 0.5rem;
}

.px-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--px-border);
    color: var(--px-text-muted);
    white-space: nowrap;
}

.px-badge--ok {
    color: var(--px-text);
    border-color: rgba(44, 215, 255, 0.35);
    background: rgba(44, 215, 255, 0.10);
}

/* Toggle switch */

.toggle {
    display: inline-flex;
    flex: none;
    margin: 0;
    cursor: pointer;
}

.toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.toggle__track {
    display: block;
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--px-border);
    background: rgba(0, 0, 0, 0.24);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.toggle__track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.toggle input:checked + .toggle__track {
    background: var(--px-cyan);
    border-color: var(--px-cyan);
}

.toggle input:checked + .toggle__track::after {
    transform: translateX(20px);
    background: var(--px-navy);
}

.toggle input:focus-visible + .toggle__track {
    box-shadow: var(--px-focus);
}

.list-toolbar__actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Form actions */

.form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

/* Alerts — based on styleguide callout pattern */

.alert {
    position: relative;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--px-border);
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--px-text);
}

.alert--success,
.alert--info {
    border-color: rgba(44, 215, 255, 0.22);
    background: rgba(44, 215, 255, 0.08);
}

.alert--danger,
.alert--warning {
    border-color: rgba(255, 0, 195, 0.25);
    background: rgba(255, 0, 195, 0.08);
}

/* Structural elements */

hr {
    border: none;
    border-top: 1px solid var(--px-border);
    margin: 24px 0;
}

.px-card hr {
    margin: 0.5rem 0;
}

/* Utility */

.text-muted { color: var(--px-text-muted) !important; }
th, td { white-space: nowrap; }
.wrap { white-space: normal !important; }
.break { white-space: break-spaces !important; }

h3, h4, h5, h6 { margin: 0 0 0.5rem; line-height: 1.25; }

.px-card h3 { margin: 0; }

/* Pagination */

.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0; padding: 0;
    float: right;
    padding-top: 0.9rem;
}

.page-search { width: 290px; height: 60px; padding-top: 0.6rem; margin-left: 0.3rem; float: left; }

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--px-border);
    color: var(--px-text);
    font-size: 14px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.page-link:hover {
    background: rgba(44, 215, 255, 0.10);
    border-color: rgba(44, 215, 255, 0.25);
    color: var(--px-cyan);
}

.page-item.active .page-link {
    border-color: rgba(44, 215, 255, 0.35);
    box-shadow: 0 0 0 1px rgba(44, 215, 255, 0.10);
    color: var(--px-text);
}

.page-item.disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
}
