/* ============================================================================
   flow-stepper.css
   Unified Stepper Flow Styles for Gyanee Online Test ERP
   Steps: 1. Login/Sign Up -> 2. OTP -> 3. Student Details -> 4. Schedule Test -> 5. Test Scheduled
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    min-height: 100vh;
    background: #F5F7FA;
    display: flex;
    flex-direction: column;
    color: #262626;
}

/* ── NAVBAR ── */
.flow-navbar {
    width: 100%;
    height: 100px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    box-shadow: 0 1px 0 #E5E5E5;
    flex-shrink: 0;
    z-index: 10;
}

.flow-navbar .nav-logo img {
    height: 42px;
    display: block;
}

.flow-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.flow-navbar .nav-links a {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #646464;
    text-decoration: none;
    transition: color 0.2s;
}

.flow-navbar .nav-links a:hover {
    color: #2B3990;
}

.flow-navbar .nav-links .nav-login a {
    font-family: 'Manrope', 'Roboto', sans-serif;
    font-weight: 700;
    color: #2B3990;
}

/* ── NAVBAR LANGUAGE FILTER PILL ── */
.flow-navbar .nav-links .gyanee-lang-nav,
.gyanee-lang-nav {
    list-style: none !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 4px !important;
    padding: 0 !important;
}

.flow-navbar .nav-links .lang-pill-switch,
.lang-pill-switch {
    display: inline-flex !important;
    align-items: center !important;
    background: #F3F4F6 !important;
    border: 1.5px solid #E5E7EB !important;
    border-radius: 24px !important;
    padding: 3px 4px !important;
    gap: 2px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
}

.flow-navbar .nav-links .lang-pill-switch:hover,
.lang-pill-switch:hover {
    border-color: #D1D5DB !important;
    background: #ECEEF2 !important;
}

.flow-navbar .nav-links a.gyanee-lang-btn,
.flow-navbar .nav-links .gyanee-lang-btn,
.gyanee-lang-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 12px !important;
    border-radius: 18px !important;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: none !important;
    background: transparent !important;
    color: #4B5563 !important;
    white-space: nowrap !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.flow-navbar .nav-links a.gyanee-lang-btn:hover,
.flow-navbar .nav-links .gyanee-lang-btn:hover,
.gyanee-lang-btn:hover {
    color: #111827 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

.flow-navbar .nav-links a.gyanee-lang-btn.active,
.flow-navbar .nav-links .gyanee-lang-btn.active,
.gyanee-lang-btn.active {
    background: #2B3990 !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 6px rgba(43, 57, 144, 0.3) !important;
}

.flow-navbar .nav-links a.gyanee-lang-btn.active:hover,
.flow-navbar .nav-links .gyanee-lang-btn.active:hover,
.gyanee-lang-btn.active:hover {
    background: #1F2B74 !important;
    color: #FFFFFF !important;
}

/* ── NAVBAR PROFILE COMPONENT & DROPDOWN ── */
.flow-navbar .nav-profile-container {
    position: relative;
    list-style: none;
}

.nav-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-family: 'Roboto', sans-serif;
    outline: none;
}

.nav-profile-btn:hover,
.nav-profile-btn:focus {
    background: transparent;
    transform: scale(1.06);
}

.avatar-circle,
.nav-profile-btn .avatar-circle,
.nav-profile-dropdown .avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C27AFF 0%, #FB64B6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(194, 122, 255, 0.25);
    transition: box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
}

.avatar-circle .avatar-img,
.nav-profile-btn .avatar-circle .avatar-img,
.nav-profile-dropdown .avatar-circle .avatar-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    z-index: 2;
}

.avatar-circle .avatar-initials,
.nav-profile-btn .avatar-circle .avatar-initials,
.nav-profile-dropdown .avatar-circle .avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.nav-profile-dropdown .dropdown-header .avatar-circle {
    width: 36px;
    height: 36px;
    font-size: 13px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C27AFF 0%, #FB64B6 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(194, 122, 255, 0.25);
}

.nav-profile-btn:hover .avatar-circle {
    box-shadow: 0 4px 12px rgba(194, 122, 255, 0.45);
}

.nav-profile-btn .profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.2;
}

.nav-profile-btn .user-name {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #1F2937;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-profile-btn .user-role {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 11px;
    color: #6B7280;
    white-space: nowrap;
}

.nav-profile-btn .profile-chevron {
    transition: transform 0.2s ease;
    color: #6B7280;
    flex-shrink: 0;
    margin-left: 2px;
}

.nav-profile-container.open .nav-profile-btn .profile-chevron {
    transform: rotate(180deg);
}

.nav-profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E7EB;
    padding: 8px 0;
    display: none;
    z-index: 1000;
    animation: dropdownFadeIn 0.15s ease-out;
}

.nav-profile-container.open .nav-profile-dropdown {
    display: block;
}

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

.nav-profile-dropdown .dropdown-header {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-profile-dropdown .dropdown-user-info {
    display: flex;
    flex-direction: column;
}

.nav-profile-dropdown .dropdown-user-name {
    font-weight: 600;
    font-size: 13px;
    color: #111827;
}

.nav-profile-dropdown .dropdown-user-role {
    font-weight: 400;
    font-size: 11px;
    color: #6B7280;
}

.nav-profile-dropdown .dropdown-divider {
    height: 1px;
    background: #F3F4F6;
    margin: 6px 0;
}

.nav-profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #374151 !important;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-profile-dropdown .dropdown-item:hover {
    background: #F3F4F6;
    color: #2B3990 !important;
}

.nav-profile-dropdown .dropdown-item svg {
    color: #6B7280;
    transition: color 0.15s ease;
}

.nav-profile-dropdown .dropdown-item:hover svg {
    color: #2B3990;
}

.nav-profile-dropdown .dropdown-item-danger {
    color: #DC2626 !important;
}

.nav-profile-dropdown .dropdown-item-danger:hover {
    background: #FEE2E2;
    color: #B91C1C !important;
}

.nav-profile-dropdown .dropdown-item-danger svg {
    color: #DC2626;
}

.nav-profile-dropdown .dropdown-item-danger:hover svg {
    color: #B91C1C;
}

/* ── FLOW WRAPPER & LAYOUT ── */
.flow-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    width: 100%;
}

.flow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 56px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.flow-container.wide-mode {
    max-width: 1240px;
    align-items: flex-start;
}

/* ── STEPPER SIDEBAR ── */
.flow-stepper {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.stepper-item {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    padding: 16px 20px 16px 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Connecting Line */
.stepper-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 28px;
    top: 48px;
    bottom: -16px;
    width: 2px;
    background: #E5E7EB;
    z-index: 1;
}

.stepper-item.completed:not(:last-child)::after {
    background: #16A34A;
}

/* Step Circle Node */
.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    z-index: 2;
    background: #FFFFFF;
    border: 2px solid #D4D4D4;
    color: #8C8C8C;
    transition: all 0.25s ease;
}

.step-circle svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Step Label */
.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #8C8C8C;
    line-height: 1.3;
    transition: color 0.25s ease;
}

/* Active Step Styling */
.stepper-item.active {
    background: transparent;
}

.stepper-item.active .step-circle {
    background: #2B3990;
    border-color: #2B3990;
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(43, 57, 144, 0.3);
}

.stepper-item.active .step-label {
    color: #2B3990;
    font-weight: 700;
}

/* Completed Step Styling */
.stepper-item.completed .step-circle {
    background: #16A34A;
    border-color: #16A34A;
    color: #FFFFFF;
}

.stepper-item.completed .step-label {
    color: #262626;
    font-weight: 600;
}

/* ── CARD STYLING ── */
.flow-card {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0px 20px 45px -10px rgba(0, 0, 0, 0.12), 0px 0px 1px 1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 440px;
    max-width: 100%;
}

.flow-card.card-md {
    width: 580px;
}

.flow-card.card-lg {
    width: 780px;
}

.flow-card.card-xl {
    width: 920px;
}

/* Card Header */
.flow-card-header {
    background: #2B3990;
    padding: 32px;
    color: #FFFFFF;
    text-align: center;
}

.flow-card-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.3;
}

.flow-card-header p {
    margin: 6px 0 0;
    font-size: 14px;
    opacity: 0.85;
    color: #E2E8F0;
}

/* Card Body */
.flow-card-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Controls */
.flow-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.flow-label {
    font-size: 14px;
    font-weight: 500;
    color: #525252;
}

.flow-input-wrap {
    position: relative;
    width: 100%;
}

.flow-input-wrap input,
.flow-input-wrap select {
    width: 100%;
    height: 56px;
    border: 2px solid #E5E5E5;
    border-radius: 10px;
    padding: 14px 16px 14px 52px;
    font-size: 15px;
    font-weight: 400;
    color: #262626;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #FFFFFF;
}

.flow-input-wrap input.dual-icon-input {
    padding-left: 96px;
}

.flow-input-wrap input.no-icon,
.flow-input-wrap select.no-icon {
    padding-left: 16px;
}

.flow-input-wrap input::placeholder {
    color: #9CA3AF;
}

.flow-input-wrap input:focus,
.flow-input-wrap select:focus {
    border-color: #2B3990;
    box-shadow: 0 0 0 3px rgba(43, 57, 144, 0.1);
}

.flow-input-wrap select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10' fill='none'%3E%3Cpath d='M1 2L7 8L13 2' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
    cursor: pointer;
}

.flow-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #A1A1A1;
    pointer-events: none;
}

.flow-input-icon.dual-icon-prefix {
    left: 18px;
    gap: 8px;
}

.flow-input-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.flow-icon-divider {
    font-size: 16px;
    color: #D4D4D4;
    font-weight: 300;
    margin: 0 1px;
}

/* 2-Column Form Grid */
.flow-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Primary Button */
.flow-btn {
    width: 100%;
    height: 56px;
    background: #D4D4D4;
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    cursor: not-allowed;
    transition: background 0.25s, box-shadow 0.25s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.flow-btn.active,
.flow-btn:not(:disabled) {
    background: #2B3990;
    cursor: pointer;
    box-shadow: 0px 10px 15px -3px rgba(43, 57, 144, 0.25);
}

.flow-btn.active:hover,
.flow-btn:not(:disabled):hover {
    background: #222E75;
}

.flow-btn.active:active,
.flow-btn:not(:disabled):active {
    transform: translateY(1px);
}

/* Card Footer */
.flow-card-footer {
    padding: 18px 24px;
    border-top: 1px solid #E5E5E5;
    background: #FAFAFA;
    font-size: 12px;
    color: #737373;
    text-align: center;
    line-height: 1.4;
}

/* ── RESPONSIVE RULES ── */
@media (max-width: 900px) {
    .flow-navbar {
        padding: 0 20px;
        height: 70px;
    }
    .flow-navbar .nav-links {
        display: none;
    }
    .flow-container {
        flex-direction: column;
        gap: 28px;
        align-items: center;
    }
    .flow-stepper {
        width: 100%;
        max-width: 440px;
        flex-direction: row;
        justify-content: space-between;
        padding-bottom: 8px;
    }
    .stepper-item {
        flex-direction: column;
        padding: 0;
        gap: 6px;
        text-align: center;
    }
    .stepper-item:not(:last-child)::after {
        left: calc(50% + 20px);
        top: 17px;
        bottom: auto;
        width: calc(100% - 40px);
        height: 2px;
    }
    .step-label {
        font-size: 11px;
        max-width: 60px;
    }
    .flow-card {
        width: 100%;
    }
    .flow-grid-2 {
        grid-template-columns: 1fr;
    }
}
