/* ============================================================
   Portal Agency — Login Page  (Dark Space Theme)
   assets/css/page-login.css
   Primary: #0068FF  |  Accent: #315EFB  |  Font: Comfortaa
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&display=swap');

/* ── Page wrapper ─────────────────────────────────────────── */
.pt-login-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0f;
    overflow: hidden;
    font-family: 'Comfortaa', 'Segoe UI', sans-serif;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* ── Star field background ─────────────────────────────────── */
.pt-login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 60%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 10%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 40%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 80%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 20% 85%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 15%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 45%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(2px 2px at 75% 25%, rgba(49, 94, 251, 0.4) 0%, transparent 100%),
        radial-gradient(2px 2px at 35% 90%, rgba(0, 104, 255, 0.3) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ── Glowing orbs ──────────────────────────────────────────── */
.pt-login-page__bg-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.pt-login-page__bg-circle--1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(49, 94, 251, 0.15) 0%, transparent 65%);
    top: -200px;
    right: -150px;
    animation: ptFloatOrb 12s ease-in-out infinite;
}

.pt-login-page__bg-circle--2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 104, 255, 0.12) 0%, transparent 65%);
    bottom: -150px;
    left: -100px;
    animation: ptFloatOrb 15s ease-in-out infinite reverse;
}

.pt-login-page__bg-circle--3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 65%);
    top: 50%;
    left: 30%;
    animation: ptFloatOrb 18s ease-in-out infinite 3s;
}

@keyframes ptFloatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(25px, -25px) scale(1.06);
    }
}

/* ── Grid pattern ──────────────────────────────────────────── */
.pt-login-page__bg-dots {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(49, 94, 251, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49, 94, 251, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ── Container ─────────────────────────────────────────────── */
.pt-login-page__container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 460px;
    padding: 0 12px;
}

/* ── Logo ──────────────────────────────────────────────────── */
.pt-login-page__logo {
    display: block;
    margin-bottom: 36px;
    text-decoration: none;
}

.pt-login-page__logo img {
    height: 44px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.pt-login-page__logo span {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    font-family: 'Comfortaa', sans-serif;
}

/* ── Card ──────────────────────────────────────────────────── */
.pt-login-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 44px 40px 40px;
    box-shadow:
        0 0 0 1px rgba(49, 94, 251, 0.1),
        0 32px 80px rgba(0, 0, 0, 0.5),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: ptCardIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes ptCardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Glowing top accent */
.pt-login-card__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #315EFB 30%, #60a5fa 70%, transparent 100%);
    border-radius: 24px 24px 0 0;
}

/* Inner glow effect */
.pt-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(49, 94, 251, 0.6), transparent);
    pointer-events: none;
}

/* ── Role badge ────────────────────────────────────────────── */
.pt-login-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(49, 94, 251, 0.15);
    border: 1px solid rgba(49, 94, 251, 0.35);
    border-radius: 100px;
    color: #93b4fd;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 18px;
    font-family: 'Comfortaa', sans-serif;
    backdrop-filter: blur(8px);
}

/* ── Card header ───────────────────────────────────────────── */
.pt-login-card__header {
    margin-bottom: 32px;
}

.pt-login-card__title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.pt-login-card__subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* ── Alert ─────────────────────────────────────────────────── */
.pt-login-card__alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.5;
    font-family: 'Comfortaa', sans-serif;
    backdrop-filter: blur(8px);
}

.pt-login-card__alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.pt-login-card__alert--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

/* AJAX message */
.pt-login-card__ajax-msg {
    margin-bottom: 16px;
}

.pt-login-card__ajax-msg.pt-alert--success {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
    font-family: 'Comfortaa', sans-serif;
}

.pt-login-card__ajax-msg.pt-alert--error {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    font-family: 'Comfortaa', sans-serif;
}

/* ── Form groups ───────────────────────────────────────────── */
.pt-form-group {
    margin-bottom: 20px;
}

.pt-form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Comfortaa', sans-serif;
}

.pt-form-label__link {
    color: #315EFB;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: color 0.2s;
}

.pt-form-label__link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* ── Input wrapper ─────────────────────────────────────────── */
.pt-form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pt-form-icon {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 1;
}

/* ── Input ─────────────────────────────────────────────────── */
.pt-form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    padding: 13px 44px;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    font-family: 'Comfortaa', sans-serif;
}

.pt-form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.pt-form-input:focus {
    border-color: rgba(49, 94, 251, 0.7);
    background: rgba(49, 94, 251, 0.08);
    box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.15), 0 0 20px rgba(49, 94, 251, 0.1);
}

.pt-form-input:-webkit-autofill,
.pt-form-input:-webkit-autofill:hover,
.pt-form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(10, 10, 20, 0.9) inset;
    -webkit-text-fill-color: #ffffff;
    caret-color: #ffffff;
}

/* ── Password eye ──────────────────────────────────────────── */
.pt-form-eye {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    z-index: 1;
}

.pt-form-eye:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Remember me ───────────────────────────────────────────── */
.pt-form-group--remember {
    margin-bottom: 26px;
}

.pt-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    font-family: 'Comfortaa', sans-serif;
}

.pt-checkbox {
    display: none;
}

.pt-checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
}

.pt-checkbox:checked+.pt-checkmark {
    background: #315EFB;
    border-color: #315EFB;
    box-shadow: 0 0 12px rgba(49, 94, 251, 0.4);
}

.pt-checkbox:checked+.pt-checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* ── Submit button ─────────────────────────────────────────── */
.pt-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    background: linear-gradient(135deg, #315EFB 0%, #0068FF 100%);
    border: 1px solid rgba(49, 94, 251, 0.5);
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Comfortaa', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(49, 94, 251, 0.4), 0 0 40px rgba(49, 94, 251, 0.1);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.pt-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.pt-login-btn:hover::before {
    left: 100%;
}

.pt-login-btn:hover {
    background: transparent;
    color: #315EFB;
    box-shadow: 0 6px 28px rgba(49, 94, 251, 0.3), 0 0 0 1px rgba(49, 94, 251, 0.5);
    transform: translateY(-2px);
}

.pt-login-btn:active {
    transform: translateY(0);
}

.pt-login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pt-login-btn__arrow {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.pt-login-btn:hover .pt-login-btn__arrow {
    transform: translateX(4px);
}

/* ── Register link ─────────────────────────────────────────── */
.pt-login-register {
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    margin: 22px 0 0;
    font-family: 'Comfortaa', sans-serif;
}

.pt-login-register a {
    color: #315EFB;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.pt-login-register a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* ── Back link ─────────────────────────────────────────────── */
.pt-login-back {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    font-size: 13px;
    font-family: 'Comfortaa', sans-serif;
    transition: color 0.2s;
}

.pt-login-back:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Spinner ───────────────────────────────────────────────── */
@keyframes ptSpin {
    to {
        transform: rotate(360deg);
    }
}

.pt-spin {
    animation: ptSpin 0.8s linear infinite;
    display: block;
}

/* ── Shake ─────────────────────────────────────────────────── */
@keyframes ptShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}

.pt-login-card.pt-login-card--shake {
    animation: ptShake 0.4s ease;
}

/* ── Divider ───────────────────────────────────────────────── */
.pt-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.2);
    font-size: 12px;
}

.pt-login-divider::before,
.pt-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 520px) {
    .pt-login-card {
        padding: 32px 24px 28px;
        border-radius: 18px;
    }

    .pt-login-card__title {
        font-size: 22px;
    }
}