/* BeePortal.NET Authentication Pages Common Styles */

:root {
    --primary-color: #FFB81C;
    --secondary-color:  #2C3E50;
    --danger-color: #E74C3C;
    --text-muted: #7F8C8D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 1rem 0.5rem;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 184, 28, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 165, 0, 0.15) 0%, transparent 50%);
    z-index: 0;
}

/* Generic Wrapper */
.auth-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 950px;
    padding: 0 1rem;
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    padding: 0 1rem;
}

.register-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 950px;
    padding: 0 1rem;
}

.otp-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 950px;
    padding: 0 1rem;
}

/* Generic Container */
.auth-container {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    animation: slideUp 0.7s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: grid;
    grid-template-columns: 1fr;
}

.login-container {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    animation: slideUp 0.7s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: grid;
    grid-template-columns: 1fr;
}

.register-container {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    animation: slideUp 0.7s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: grid;
    grid-template-columns: 1fr;
}

.otp-container {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    animation: slideUp 0.7s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .login-container {
        grid-template-columns: 45% 55%;
        grid-template-rows: auto;
    }

    .login-header {
        grid-column: 1;
        grid-row: 1 / 3;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 60px 40px !important;
        min-height: 500px;
    }

    .login-form {
        grid-column: 2;
        grid-row: 1;
        padding: 50px 45px !important;
    }

    .login-footer {
        grid-column: 2;
        grid-row: 2;
        padding: 30px 45px !important;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Generic Header */
.auth-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #FFA500 100%);
    padding: 40px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #FFA500 100%);
    padding: 40px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.register-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #FFA500 100%);
    padding: 40px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.register-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.register-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.otp-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #FFA500 100%);
    padding: 40px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.otp-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.otp-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-header img {
    max-width: 100px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 2;
}

.login-header img {
    max-width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 2;
}

.register-header img {
    max-width: 100px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 2;
}

.otp-header img {
    max-width: 100px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 2;
}

.auth-header h1 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 2;
}

.login-header h1 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.register-header h1 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 2;
}

.otp-header h1 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 2;
}

.auth-header p {
    color: var(--secondary-color);
    opacity: 0.85;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    margin: 0;
}

.login-header p {
    color: var(--secondary-color);
    opacity: 0.85;
    font-size: 1rem;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
}

.register-header p {
    color: var(--secondary-color);
    opacity: 0.85;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    margin: 0;
}

.otp-header p {
    color: var(--secondary-color);
    opacity: 0.85;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    margin: 0;
}

/* Form Styles */
.login-form {
    padding: 30px 25px;
}

.register-form {
    padding: 30px 25px;
}

.otp-form {
    padding: 30px 25px;
}

.form-group {
    margin-bottom: 1.3rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.6rem;
    font-size:  0.9rem;
    display: flex;
    align-items: center;
}

.form-label i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 1rem;
}

.form-control {
    width:  100%;
    padding: 14px 16px;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    -webkit-appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 184, 28, 0.15),
                0 5px 15px rgba(255, 184, 28, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-hint {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.error-box {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color:  white;
    padding: 12px 14px;
    border-radius:  10px;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size:  0.9rem;
    animation: shake 0.4s ease-in-out;
    box-shadow: 0 8px 20px rgba(238, 90, 111, 0.3);
}

.error-box i {
    font-size: 1.1rem;
    flex-shrink:  0;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.btn-signin {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #FFA500 100%);
    color: var(--secondary-color);
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 8px 20px rgba(255, 184, 28, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    touch-action: manipulation;
}

.btn-signin:active {
    transform: scale(0.98);
}

.btn-signin i {
    font-size: 1.1rem;
}

/* Footer Styles */
.login-footer {
    padding: 25px 25px 30px;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    text-align: center;
    border-top: 1px solid rgba(232, 232, 232, 0.5);
}

.register-footer {
    padding: 25px 25px 30px;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    text-align: center;
    border-top: 1px solid rgba(232, 232, 232, 0.5);
}

.otp-footer {
    padding: 25px 25px 30px;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    text-align: center;
    border-top: 1px solid rgba(232, 232, 232, 0.5);
}

.auth-footer p {
    color:  var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.login-footer p {
    color:  var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.register-footer p {
    color:  var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.otp-footer p {
    color:  var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .footer-links {
        flex-direction: row;
    }
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition:  all 0.3s ease;
    padding: 12px 0;
    border-bottom: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.footer-links a:active {
    transform: scale(0.98);
}

.footer-links a i {
    font-size: 1rem;
}

.copyright {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(232, 232, 232, 0.5);
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.dlab-logo {
    border:  none;
    padding: 5px;
    width: 90px;
    opacity: 0.3;
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 5;
    transition: opacity 0.3s ease;
}

/* Tablet and larger */
@media (min-width: 577px) {
    body {
        padding: 2rem 1rem;
        align-items: center;
    }

    .auth-header {
        padding: 50px 30px;
    }

    .login-header {
        padding: 50px 30px;
    }

    .register-header {
        padding: 50px 30px;
    }

    .otp-header {
        padding: 50px 30px;
    }

    .auth-header img {
        max-width: 110px;
        margin-bottom: 1.3rem;
    }

    .login-header img {
        max-width: 130px;
        margin-bottom: 1.5rem;
    }

    .register-header img {
        max-width: 110px;
        margin-bottom: 1.3rem;
    }

    .otp-header img {
        max-width: 110px;
        margin-bottom: 1.3rem;
    }

    .auth-header h1 {
        font-size: 1.8rem;
    }

    .login-header h1 {
        font-size: 2rem;
    }

    .register-header h1 {
        font-size: 1.8rem;
    }

    .otp-header h1 {
        font-size: 1.8rem;
    }

    .auth-header p {
        font-size: 0.95rem;
    }

    .login-header p {
        font-size: 0.95rem;
    }

    .register-header p {
        font-size: 0.95rem;
    }

    .otp-header p {
        font-size: 0.95rem;
    }

    .login-form {
        padding: 40px;
    }

    .register-form {
        padding: 40px;
    }

    .otp-form {
        padding: 40px;
    }

    .login-footer {
        padding: 30px 40px;
    }

    .register-footer {
        padding: 30px 40px;
    }

    .otp-footer {
        padding: 30px 40px;
    }

    .dlab-logo {
        width: 120px;
        right: 20px;
        bottom: 20px;
        opacity: 0.4;
    }

    .dlab-logo:hover {
        opacity: 0.7;
    }

    .btn-signin:hover {
        transform: translateY(-3px);
        box-shadow:  0 12px 30px rgba(255, 184, 28, 0.4);
    }

    .footer-links a:hover {
        color: var(--secondary-color);
        border-bottom-color: var(--primary-color);
        transform: translateY(-2px);
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .auth-header h1 {
        font-size: 1.3rem;
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .register-header h1 {
        font-size: 1.3rem;
    }

    .otp-header h1 {
        font-size: 1.3rem;
    }

    .auth-header img {
        max-width: 80px;
    }

    .login-header img {
        max-width: 80px;
    }

    .register-header img {
        max-width: 80px;
    }

    .otp-header img {
        max-width: 80px;
    }

    .login-form {
        padding: 25px 20px;
    }

    .register-form {
        padding: 25px 20px;
    }

    .otp-form {
        padding: 25px 20px;
    }

    .footer-links a {
        font-size: 0.9rem;
    }
}
