:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    /*overflow-x: hidden;*/
}

/* Background Decoration - Hidden for clean look */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 10%;
    animation-delay: 10s;
}
@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}
.app-container {
    position: relative;
    width: 100%;
    height: 100vh;
    /*overflow: hidden;*/
    z-index: 1;
}

.step-container {
    display: none;
    animation: fadeInSlide 0.4s ease-out;
    height: 100vh;
    /*overflow: hidden;*/
    padding: 30px 0;
    box-sizing: border-box;
}

.step-container.active {
    display: block;
}

.step-container .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
    /*overflow: hidden;*/
    padding: 0 15px;
    box-sizing: border-box;
}

.step-container .row {
    height: 100%;
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.app-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 28px 32px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
    border: none;
    margin: 0 auto;
    width: 100%;
    max-width: 425px;
    position: relative;
    box-sizing: border-box;
}

/* .app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #764ba2, #f093fb);
    border-radius: 24px 24px 0 0;
} */

.app-header {
    text-align: center;
    margin-bottom: 18px !important;
}

.app-logo {
    width: 75px;
    height: 75px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.3);
    position: relative;
    transition: transform 0.3s ease;
    margin-bottom: 12px !important;
}

.app-logo:hover {
    transform: scale(1.05);
}

.app-logo i {
    font-size: 2.4rem;
    color: white;
}

.app-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.8px;
    line-height: 1.2;
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.3;
}

.user-info-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f0f7ff;
    border: 1px solid #d0e7ff;
    border-radius: 20px;
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
    margin: 0 auto;
}

.demo-credentials {
    margin-top: 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    text-align: center;
}

.demo-info {
    font-size: 12px;
}

.demo-text {
    color: var(--primary-color);
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.demo-text:hover {
    background: #e7f3ff;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.app-form {
    margin-top: 16px;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
}

.form-label i {
    color: var(--primary-color);
}

.form-control,
.input-group-text {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group-text {
    background: #f8f9fa;
    color: var(--text-secondary);
    border-right: none;
    padding: 12px 16px;
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: none;
    box-shadow: none;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control {
    border-color: var(--primary-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
    font-size: 15px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #0056b3, #004085);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.form-check-input {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s ease;
    text-decoration: underline;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.back-btn {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    border: none;
    background: none;
}

.back-btn:hover {
    color: var(--primary-color);
}

.otp-input-group {
    position: relative;
}

.otp-input {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 8px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    border: 2px solid var(--border-color);
}

.otp-input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
}

.resend-link {
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
}

.resend-link:hover {
    color: var(--primary-hover);
}

.resend-link.disabled {
    color: var(--text-secondary);
    cursor: not-allowed;
    pointer-events: none;
}

.alert {
    border-radius: 12px;
    border: none;
    font-size: 14px;
    padding: 12px 16px;
}

.alert-danger {
    background: #fee;
    color: #c33;
    border-left: 3px solid var(--danger-color);
    animation: shake 0.5s ease-in-out;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 3px solid var(--success-color);
    animation: slideDown 0.3s ease-out;
}

.alert-danger i,
.alert-success i {
    color: inherit;
}

.error-message-text {
    display: inline-block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    position: relative;
    background: var(--card-bg);
    padding: 0 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.app-footer {
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.app-footer a {
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.app-footer a:hover {
    color: var(--primary-hover);
    transform: translateX(3px);
}

.signup-link {
    font-size: 15px;
}

.security-note {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Loading State */
.btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    border-color: currentColor;
    border-right-color: transparent;
}

.btn.loading {
    position: relative;
    pointer-events: none;
}

.btn.loading .btn-text {
    opacity: 0;
    visibility: hidden;
}

.btn.loading .spinner-border-sm {
    display: inline-block !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.btn-primary.loading {
    opacity: 0.8;
}

/* Tablet Optimizations */
@media (max-width: 992px) and (min-width: 577px) {
    .app-card {
        padding: 38px 35px;
        max-width: 480px;
    }
    .circle-1 {
        width: 250px;
        height: 250px;
    }
    
    .circle-2 {
        width: 180px;
        height: 180px;
    }
    .app-header {
        margin-bottom: 28px !important;
    }

    .app-form {
        margin-top: 25px;
    }
}

/* Mobile Optimizations */
@media (max-width: 576px) {
    .step-container {
        padding: 20px 0;
    }

    .app-card {
        padding: 24px 20px;
        border-radius: 20px;
        max-width: 92%;
        width: 92%;
    }

    .step-container .container-fluid {
        padding: 0 10px;
    }

    .app-logo {
        width: 75px;
        height: 75px;
        border-radius: 18px;
    }

    .app-logo i {
        font-size: 2.2rem;
    }

    .app-title {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .app-subtitle {
        font-size: 14px;
        line-height: 1.4;
    }

    .app-header {
        margin-bottom: 16px !important;
    }

    .app-logo {
        width: 65px;
        height: 65px;
        margin-bottom: 10px !important;
    }

    .app-logo i {
        font-size: 2rem;
    }

    .app-title {
        font-size: 22px;
        margin-bottom: 3px;
    }

    .app-subtitle {
        font-size: 13px;
    }

    .app-form {
        margin-top: 14px;
    }

    .otp-input {
        font-size: 26px;
        letter-spacing: 6px;
        padding: 14px 12px;
    }

.input-group-lg > .form-control,
.input-group-lg > .input-group-text,
.input-group-lg > .btn {
    padding: 11px 14px;
    font-size: 15px;
}

    .form-label {
        font-size: 13px;
    }

    .btn-lg {
        padding: 13px;
        font-size: 15px;
    }

    .user-info-badge {
        font-size: 13px;
        padding: 6px 14px;
    }

    /*.circle-1,
    .circle-2,
    .circle-3 {
        display: none;
    }*/
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .app-card {
        padding: 20px 20px;
        max-width: 100%;
        width: 100%;
    }

    .app-title {
        font-size: 24px;
    }

    .app-logo {
        width: 70px;
        height: 70px;
    }

    .app-logo i {
        font-size: 2rem;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .app-card {
        max-width: 440px;
        padding: 45px 42px;
    }

    .app-title {
        font-size: 34px;
    }

    .app-subtitle {
        font-size: 17px;
    }
}

/* Safe area for mobile devices */
@supports (padding: max(0px)) {
    body {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }
}