/* /home/ckpzyug5/p3apps.com/p3auth/auth.css */

:root {
    --bg: #eef3f8;
    --bg-accent: #dff4ff;
    --card: #ffffff;

    --text: #111827;
    --text-soft: #374151;
    --muted: #6b7280;

    --border: #d8dee8;
    --border-strong: #c3ccd9;

    --accent: #0ea5e9;
    --accent-dark: #0369a1;
    --accent-soft: rgba(14, 165, 233, 0.11);

    --danger-bg: #fff1f2;
    --danger-border: #fecdd3;
    --danger-text: #9f1239;

    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --success-text: #047857;

    --shadow: 0 22px 60px rgba(15, 23, 42, 0.13);
    --radius: 6px;
    --radius-sm: 6px;
    --radius-button: 6px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.20), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(3, 105, 161, 0.13), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Main card */

.auth-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(216, 222, 232, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    backdrop-filter: blur(10px);
}

.auth-brand {
    margin-bottom: 20px;
    text-align: left;
}

.auth-brand h1 {
    margin: 0;
    color: var(--text);
    font-size: 1.52rem;
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.auth-brand p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

.auth-brand strong {
    color: var(--text);
}

/* Context / SSO box */

.auth-context-box {
    margin: 0 0 16px;
    padding: 11px 12px;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #f8fbff, #eff8ff);
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: center;
}

.auth-context-box strong {
    color: var(--text);
}

.auth-context-domain {
    display: inline-block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.88rem;
}

/* Forms */

.auth-field {
    margin-bottom: 15px;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    background: #ffffff;
    color: var(--text);
    font-size: 0.98rem;
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.auth-field input:hover {
    border-color: var(--border-strong);
}

.auth-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Password toggle */

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 44px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.96rem;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.14s ease, color 0.14s ease;
}

.auth-password-toggle:hover {
    background: rgba(15, 23, 42, 0.07);
    color: var(--text);
}

/* Checkbox */

.auth-check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* Alerts */

.auth-alert {
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.91rem;
    line-height: 1.4;
}

.auth-alert.error {
    border: 1px solid var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger-text);
}

.auth-alert.success {
    border: 1px solid var(--success-border);
    background: var(--success-bg);
    color: var(--success-text);
}

/* Buttons */

/* Buttons */

.auth-button {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-button);
    background: var(--accent);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: 0.005em;
    padding: 10px 14px;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.10s ease;
}

.auth-button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: none;
    transform: translateY(-1px);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button-link {
    display: block;
    text-align: center;
    text-decoration: none;
}

.auth-button.secondary,
.auth-button-link.secondary {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
    box-shadow: none;
}

.auth-button.secondary:hover,
.auth-button-link.secondary:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
    color: #0f172a;
    box-shadow: none;
}

/* Link rows */

.auth-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.88rem;
}

.auth-links a {
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 700;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Small copy */

.auth-small {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

/* Company picker */

.auth-company-list {
    display: grid;
    gap: 10px;
}

.auth-company-btn {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-button);
    background: #ffffff;
    padding: 13px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease, background 0.14s ease;
}

.auth-company-btn:hover {
    border-color: var(--accent);
    background: #fbfdff;
    box-shadow: 0 0 0 4px var(--accent-soft);
    transform: translateY(-1px);
}

.auth-company-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.auth-company-name {
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 800;
}

.auth-company-meta {
    color: var(--muted);
    font-size: 0.84rem;
}

.auth-company-action {
    color: var(--accent-dark);
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}


/* Logged-in session card */

.auth-session-card {
    margin: 14px 0;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    background: #fbfdff;
    overflow: hidden;
}

.auth-session-row {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 10px;
    padding: 8px 11px;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.82rem;
    line-height: 1.35;
}

.auth-session-row:last-child {
    border-bottom: 0;
}

.auth-session-row strong {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.auth-session-row span {
    color: #1f2937;
    font-size: 0.82rem;
    font-weight: 500;
    word-break: break-word;
}

.auth-action-stack {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

/* Footer notice */

.auth-footer-note {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #edf0f5;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.45;
    text-align: center;
}

.auth-footer-note > div {
    display: block;
}

.auth-footer-privacy {
    margin-top: 6px;
}

.auth-footer-note .auth-footer-privacy a {
    display: inline-block;
    margin: 0;
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.auth-footer-note .auth-footer-privacy a:hover {
    text-decoration: underline;
}

/* Privacy page helper styles */

.auth-privacy {
    max-width: 620px;
}

.auth-privacy h2 {
    margin: 22px 0 8px;
    color: var(--text);
    font-size: 1rem;
}

.auth-privacy p,
.auth-privacy li {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.auth-privacy ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.auth-privacy .privacy-updated {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

/* Mobile */

@media (max-width: 520px) {
    body {
        padding: 16px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 22px;
        border-radius: 15px;
    }

    .auth-brand h1 {
        font-size: 1.38rem;
    }

    .auth-session-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .auth-company-btn {
        align-items: flex-start;
    }

    .auth-company-action {
        padding-top: 2px;
    }
}



.auth-account-card {
    max-width: 520px;
}

.auth-section-title {
    margin: 18px 0 8px;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.auth-app-list {
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #fbfdff;
    overflow: hidden;
}

.auth-app-row {
    padding: 9px 11px;
    border-bottom: 1px solid #edf2f7;
}

.auth-app-row:last-child {
    border-bottom: 0;
}

.auth-app-row strong {
    display: block;
    color: #1f2937;
    font-size: 0.86rem;
    font-weight: 650;
}

.auth-app-row span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.auth-button.danger {
    border-color: #fecaca;
    background: #fff1f2;
    color: #9f1239;
    box-shadow: none;
}

.auth-button.danger:hover {
    border-color: #fda4af;
    background: #ffe4e6;
    color: #881337;
    box-shadow: none;
}



.auth-device-list {
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #fbfdff;
    overflow: hidden;
}

.auth-device-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 10px 11px;
    border-bottom: 1px solid #edf2f7;
}

.auth-device-row:last-child {
    border-bottom: 0;
}

.auth-device-row.is-current {
    background: #f8fafc;
}

.auth-device-main strong {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #1f2937;
    font-size: 0.86rem;
    font-weight: 700;
}

.auth-device-main span,
.auth-device-meta span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.35;
}

.auth-device-meta {
    text-align: right;
}

.auth-device-badge {
    display: inline-flex !important;
    align-items: center;
    margin-top: 0 !important;
    padding: 2px 6px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    color: #166534 !important;
    font-size: 0.65rem !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

@media (max-width: 520px) {
    .auth-device-row {
        grid-template-columns: 1fr;
    }

    .auth-device-meta {
        text-align: left;
    }
}



.auth-session-row strong i {
    width: 15px;
    margin-right: 6px;
    color: #64748b;
    text-align: center;
}

.auth-section-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -2px 0 8px;
}

.auth-section-help {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.auth-small-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 0.74rem;
    font-weight: 750;
    cursor: pointer;
}

.auth-small-danger:hover {
    border-color: #fda4af;
    background: #ffe4e6;
    color: #881337;
}

.auth-device-main i,
.auth-device-meta i {
    width: 14px;
    margin-right: 5px;
    color: #94a3b8;
    text-align: center;
}

.auth-app-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-app-row strong i,
.auth-app-row span i {
    width: 15px;
    margin-right: 6px;
    color: #64748b;
    text-align: center;
}

.auth-app-launch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 0.74rem;
    font-weight: 750;
    text-decoration: none;
}

.auth-app-launch:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #0f172a;
}

@media (max-width: 520px) {
    .auth-section-action-row {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-small-danger {
        justify-content: center;
        width: 100%;
    }

    .auth-app-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-app-launch {
        justify-content: center;
        width: 100%;
    }
}



.auth-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.1rem;
}

.auth-button i,
.auth-button-link i {
    margin-right: 7px;
}

.auth-field select,
.auth-field textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    font: inherit;
    font-size: 0.92rem;
    padding: 10px 11px;
    outline: none;
}

.auth-field textarea {
    min-height: 92px;
    resize: vertical;
}

.auth-field select:focus,
.auth-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-field input[readonly] {
    background: #f8fafc;
    color: #475569;
    cursor: not-allowed;
}


.auth-request-list {
    display: grid;
    gap: 12px;
}

.auth-request-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fbfdff;
    overflow: hidden;
}

.auth-request-main {
    padding: 12px;
}

.auth-request-main strong {
    display: block;
    color: #111827;
    font-size: 0.92rem;
    font-weight: 750;
}

.auth-request-main span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.auth-request-main i {
    width: 15px;
    margin-right: 6px;
    color: #64748b;
    text-align: center;
}

.auth-request-note {
    margin-top: 10px;
    padding: 9px 10px;
    border-left: 3px solid #93c5fd;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    line-height: 1.4;
}

.auth-review-form {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #edf2f7;
    background: #ffffff;
}

.auth-review-form textarea {
    width: 100%;
    min-height: 58px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    color: #111827;
    font: inherit;
    font-size: 0.82rem;
    padding: 8px 9px;
    outline: none;
}

.auth-review-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.auth-small-success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
    font-size: 0.74rem;
    font-weight: 750;
    cursor: pointer;
}

.auth-small-success:hover {
    border-color: #86efac;
    background: #dcfce7;
    color: #14532d;
}

@media (max-width: 520px) {
    .auth-review-actions {
        flex-direction: column-reverse;
    }

    .auth-review-actions button {
        justify-content: center;
        width: 100%;
    }
}





.auth-admin-card {
    max-width: 1180px;
}

.auth-inline-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.auth-admin-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid var(--auth-border, #d9e1ec);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
}

.auth-admin-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
}

.auth-admin-filters input,
.auth-admin-filters select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    font: inherit;
    background: #fff;
}

.auth-admin-filter-actions {
    display: flex;
    align-items: end;
    gap: 0.5rem;
}

.auth-admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.auth-admin-stat {
    padding: 0.9rem;
    border: 1px solid #d9e1ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.auth-admin-stat strong {
    display: block;
    font-size: 1.45rem;
    color: #0f172a;
}

.auth-admin-stat span {
    display: block;
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.85rem;
}

.auth-admin-table-wrap {
    overflow-x: auto;
    border: 1px solid #d9e1ec;
    border-radius: 16px;
    background: #fff;
    margin-bottom: 1.25rem;
}

.auth-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.auth-admin-table th,
.auth-admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.auth-admin-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-admin-table td span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

.auth-admin-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.auth-admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #dbe3ef;
    font-size: 0.84rem;
}

.auth-admin-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
}

.auth-event-list {
    display: grid;
    gap: 0.75rem;
}

.auth-event-card {
    padding: 0.9rem;
    border: 1px solid #d9e1ec;
    border-radius: 16px;
    background: #fff;
}

.auth-event-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.65rem;
}

.auth-event-header strong {
    display: block;
    color: #0f172a;
}

.auth-event-header span {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
}

.auth-event-badge {
    display: inline-flex !important;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem !important;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-event-badge.info {
    background: #e0f2fe;
    color: #0369a1;
}

.auth-event-badge.notice {
    background: #ecfdf5;
    color: #047857;
}

.auth-event-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.auth-event-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.auth-event-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.auth-event-grid div {
    padding: 0.55rem;
    border-radius: 12px;
    background: #f8fafc;
}

.auth-event-grid strong {
    display: block;
    color: #475569;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-event-grid span {
    display: block;
    margin-top: 0.2rem;
    color: #0f172a;
    font-size: 0.85rem;
    word-break: break-word;
}

.auth-event-uri,
.auth-event-agent {
    margin-top: 0.5rem;
    padding: 0.55rem;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    word-break: break-word;
}

.auth-event-details {
    margin-top: 0.5rem;
}

.auth-event-details summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 700;
    font-size: 0.85rem;
}

.auth-event-details pre {
    overflow-x: auto;
    margin: 0.5rem 0 0;
    padding: 0.75rem;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .auth-admin-filters {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .auth-admin-stats {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .auth-event-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 560px) {
    .auth-admin-filters,
    .auth-admin-stats,
    .auth-event-grid {
        grid-template-columns: 1fr;
    }

    .auth-section-action-row,
    .auth-event-header {
        flex-direction: column;
    }
}