:root {
    /* PT Surveyor Indonesia Brand Colors */
    --si-primary-blue: #0f172a;
    --si-secondary-blue: #1e40af;
    --si-accent-blue: #3b82f6;
    --si-light-blue: #dbeafe;
    --si-red: #ef4444;
    --si-dark-red: #dc2626;
    --si-orange: #f97316;
    --si-gray-dark: #1f2937;
    --si-gray-medium: #6b7280;
    --si-gray-light: #f8fafc;
    --si-white: #ffffff;

    /* Modern Gradients */
    --si-primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #3b82f6 100%);
    --si-glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    --si-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--si-primary-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Modern Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.05;
    background-image:
        radial-gradient(circle at 25% 25%, #3b82f6 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #1e40af 0%, transparent 50%);
    animation: morphing 20s ease-in-out infinite;
}

@keyframes morphing {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(180deg);
    }
}

/* Floating Orbs */
.floating-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(30, 64, 175, 0.1));
    backdrop-filter: blur(10px);
    animation: float 15s ease-in-out infinite;
}

.orb:nth-child(1) {
    width: 200px;
    height: 200px;
    left: -100px;
    top: 20%;
    animation-delay: 0s;
}

.orb:nth-child(2) {
    width: 150px;
    height: 150px;
    right: -75px;
    top: 60%;
    animation-delay: 5s;
}

.orb:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 60%;
    top: -50px;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.6;
    }

    33% {
        transform: translateY(-30px) translateX(20px);
        opacity: 0.8;
    }

    66% {
        transform: translateY(30px) translateX(-20px);
        opacity: 0.4;
    }
}

/* Main Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.auth-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--si-card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 450px;
}

/* Left Panel - Enhanced Branding */
.brand-panel {
    background: var(--si-glass-gradient);
    backdrop-filter: blur(30px);
    padding: 35px 20px 25px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    z-index: -1;
}

.company-logo {
    width: 200px;
    height: auto;
    margin-top: 10px;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
    animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logoGlow {

    0%,
    100% {
        filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    }

    50% {
        filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    }
}

.helpdesk-illustration {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    animation: floatSlow 6s ease-in-out infinite;
}

.brand-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--si-white);
    margin-bottom: 10px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
}

.brand-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 25px;
    max-width: 280px;
    flex-grow: 1;
}

.service-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 260px;
    margin-bottom: 20px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.feature-item::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.6s ease;
}

.feature-item:hover::before {
    left: 100%;
}

.feature-item:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.feature-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
    color: rgba(255, 255, 255, 1);
}

.feature-item:hover .feature-icon svg {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.feature-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    margin: 0;
}

/* Mobile App Section */
.mobile-app-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    margin-top: auto;
    margin-bottom: 20px;
}

.mobile-app-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
}

.mobile-app-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    line-height: 1.4;
}

.store-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.store-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.store-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    text-decoration: none;
}

.store-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.store-button .button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.store-button .button-text .store-name {
    font-size: 0.7rem;
    opacity: 0.8;
}

.store-button .button-text .download-text {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Floating Elements Animation */
.floating-element {
    animation: floatElement 4s ease-in-out infinite;
}

@keyframes floatElement {
    0% {
        transform: translateY(0px) scale(1);
        opacity: 0.8;
    }

    25% {
        transform: translateY(-8px) scale(1.1);
        opacity: 1;
    }

    50% {
        transform: translateY(-4px) scale(0.9);
        opacity: 0.6;
    }

    75% {
        transform: translateY(-12px) scale(1.05);
        opacity: 0.9;
    }

    100% {
        transform: translateY(0px) scale(1);
        opacity: 0.8;
    }
}

/* Support Icon Animation */
.support-icon {
    animation: supportPulse 3s ease-in-out infinite;
}

@keyframes supportPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.5));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
    }
}

.floating-help-icon {
    animation: floatSlow 6s ease-in-out infinite;
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Right Panel - Form */
.form-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--si-gray-dark);
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 0.95rem;
    color: var(--si-gray-medium);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--si-gray-dark);
    margin-bottom: 8px;
}

.form-input,
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-input:hover,
.form-control:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.form-input:focus,
.form-control:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-3px);
}

.form-input.is-invalid,
.form-control.is-invalid {
    border-color: var(--si-red);
    background: rgba(239, 68, 68, 0.05);
}

.form-input.is-invalid:focus,
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.1);
}

.form-input::placeholder,
.form-control::placeholder {
    color: rgba(107, 114, 128, 0.6);
    font-weight: 400;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--si-gray-medium);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.password-toggle:hover {
    opacity: 1;
    background: rgba(30, 64, 175, 0.08);
    color: var(--si-secondary-blue);
}

.captcha-container {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.error-message {
    color: var(--si-red);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-message::before {
    content: '⚠';
    font-size: 0.8rem;
}

.success-message {
    color: #059669;
    font-size: 14px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Loading State */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

@keyframes spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Focus indicators for better accessibility */
.form-input:focus-visible,
.form-control:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--si-secondary-blue);
    outline-offset: 2px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Information Box */
.info-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-icon {
    color: var(--si-accent-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-content h4 {
    color: var(--si-gray-dark);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 0;
}

.info-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-content li {
    color: var(--si-gray-medium);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 6px;
    padding-left: 0;
    position: relative;
}

.info-content li:before {
    content: '•';
    color: var(--si-accent-blue);
    font-weight: bold;
    margin-right: 8px;
}

.info-content li:last-child {
    margin-bottom: 0;
}

.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #0f2557 0%, #1e3a8a 50%, #2563eb 100%);
    border-color: #2563eb;
    color: var(--si-white);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--si-gray-medium);
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: var(--si-gray-light);
    border-color: var(--si-gray-medium);
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.form-footer a {
    color: var(--si-accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--si-secondary-blue);
}

.forgot-password-link {
    color: var(--si-accent-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
}

.forgot-password-link:hover {
    color: var(--si-secondary-blue);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--si-secondary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 14px;
    border-radius: 8px;
}

.footer-links a:hover {
    color: var(--si-primary-blue);
    background: rgba(30, 64, 175, 0.08);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-card {
        max-width: 800px;
    }

    .brand-panel,
    .form-panel {
        padding: 30px 25px;
    }
}

@media (max-width: 768px) {
    .auth-card {
        grid-template-columns: 1fr;
        margin: 20px;
        max-width: 450px;
    }

    .brand-panel {
        display: none;
    }

    /* Mobile app section responsive */
    .mobile-app-section {
        margin-top: 20px;
        padding: 15px;
    }

    .mobile-app-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .mobile-app-description {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .store-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .store-button {
        padding: 12px 16px;
        justify-content: center;
    }

    .form-panel {
        padding: 30px 25px;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

/* Mobile Simple Layout */
@media (max-width: 768px) {

    /* Hide complex elements on mobile */
    .floating-orbs {
        display: none;
    }

    .bg-pattern {
        opacity: 0.02;
    }

    /* Simplify form panel */
    .form-panel {
        padding: 25px 20px;
    }

    .form-title {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    .form-subtitle {
        font-size: 0.9rem;
    }

    /* Simplify form elements */
    .form-group {
        margin-bottom: 18px;
    }

    .form-label {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .form-input,
    .form-control {
        padding: 12px 14px;
        font-size: 15px;
    }

    /* Simplify captcha */
    .captcha-container {
        margin-bottom: 20px;
    }

    .captcha-container>div {
        transform: scale(0.9);
        transform-origin: center;
    }

    /* Simplify button */
    .btn-primary {
        padding: 12px 20px;
        font-size: 15px;
    }

    /* Simplify info box */
    .info-box {
        margin-top: 20px;
        padding: 15px;
    }

    .info-content h4 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .info-content li {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    /* Simplify footer */
    .form-footer {
        margin-top: 20px;
        padding-top: 15px;
    }

    .form-footer a {
        font-size: 0.8rem;
    }

    .footer-links {
        margin-top: 20px;
        gap: 12px;
    }

    .footer-links a {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }

    .auth-card {
        margin: 10px;
        border-radius: 15px;
    }

    .form-panel {
        padding: 20px 15px;
    }

    .form-title {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .form-subtitle {
        font-size: 0.85rem;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-input,
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    .captcha-container>div {
        transform: scale(0.8);
    }

    .btn-primary {
        padding: 10px 16px;
        font-size: 14px;
    }

    .info-box {
        margin-top: 15px;
        padding: 12px;
    }

    .info-content h4 {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .info-content li {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }

    .form-footer {
        margin-top: 15px;
        padding-top: 12px;
    }

    .form-footer a {
        font-size: 0.75rem;
    }

    .footer-links {
        margin-top: 15px;
        gap: 10px;
    }

    .footer-links a {
        font-size: 0.75rem;
        padding: 5px 8px;
    }

    .form-check-label {
        font-size: 0.75rem;
    }

    .forgot-password-link {
        font-size: 0.75rem;
    }
}

/* Bootstrap form-check customization for remember me */
.form-check {
    margin-bottom: 0;
}

.form-check-input {
    margin-top: 0.125rem;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--si-gray-medium);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.form-check-label:hover {
    color: var(--si-accent-blue);
}

/* Mobile responsive for remember me */
@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    .form-check {
        width: 100%;
    }

    .d-flex.justify-content-between>div:last-child {
        width: 100%;
        text-align: right;
    }
}