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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 48px;
    width: 100%;
    max-width: 480px;
}

.logo-section {
    text-align: center;
    margin-bottom: 36px;
}

.logo {
    width: 200px;
    height: 100px;
    margin: 0 auto 20px;
    display: block;
}

h1 {
    color: #1a202c;
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.5rem;
    font-weight: 600;
}

.subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 32px;
    font-size: 0.875rem;
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.step {
    width: 32px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: background 0.3s;
}

.step.active {
    background: #3182ce;
}

.step-section {
    display: none;
}

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

.section-title {
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.env-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.env-option {
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.env-option:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.env-option.selected {
    border-color: #3182ce;
    background: #ebf8ff;
}

.env-option input[type="radio"] {
    display: none;
}

.env-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.env-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

.env-desc {
    font-size: 0.8rem;
    color: #718096;
}

.env-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.env-option.selected .env-indicator {
    border-color: #3182ce;
}

.env-option.selected .env-indicator::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #3182ce;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

label {
    display: block;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: white;
}

input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

input::placeholder {
    color: #a0aec0;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-primary {
    background: #3182ce;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2c5282;
}

.btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.error-message {
    background: #fff5f5;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
    font-size: 0.875rem;
    border-left: 4px solid #fc8181;
}

.loading {
    text-align: center;
    color: #718096;
    margin-top: 16px;
    display: none;
    font-size: 0.875rem;
}

.spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3182ce;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.selected-env-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ebf8ff;
    color: #2c5282;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.selected-env-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #3182ce;
    border-radius: 50%;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ======================================== */

/* Tablet and below (max-width: 768px) */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }

    .login-container {
        padding: 32px 24px;
        max-width: 100%;
    }

    h1 {
        font-size: 1.35rem;
    }

    .subtitle {
        font-size: 0.85rem;
        margin-bottom: 24px;
    }

    .logo {
        width: 160px;
        height: 80px;
        margin-bottom: 16px;
    }

    .step-indicator {
        margin-bottom: 24px;
    }

    .section-title {
        font-size: 0.95rem;
        margin-bottom: 16px;
    }

    .env-option {
        padding: 14px 16px;
    }

    .env-name {
        font-size: 0.9rem;
    }

    .env-desc {
        font-size: 0.75rem;
    }

    input[type="email"],
    input[type="password"] {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .btn {
        padding: 11px;
        font-size: 0.9rem;
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .login-container {
        padding: 24px 20px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

    h1 {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }

    .subtitle {
        font-size: 0.8rem;
        margin-bottom: 20px;
    }

    .logo {
        width: 140px;
        height: 70px;
        margin-bottom: 12px;
    }

    .logo-section {
        margin-bottom: 24px;
    }

    .step-indicator {
        gap: 6px;
        margin-bottom: 20px;
    }

    .step {
        width: 28px;
        height: 3px;
    }

    .section-title {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }

    .env-selector {
        gap: 10px;
    }

    .env-option {
        padding: 12px 14px;
    }

    .env-name {
        font-size: 0.85rem;
    }

    .env-desc {
        font-size: 0.7rem;
    }

    .env-indicator {
        width: 18px;
        height: 18px;
    }

    .env-option.selected .env-indicator::after {
        width: 9px;
        height: 9px;
    }

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

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

    input[type="email"],
    input[type="password"] {
        padding: 10px 12px;
        font-size: 0.875rem;
    }

    .btn {
        padding: 10px;
        font-size: 0.875rem;
    }

    .error-message {
        padding: 10px 12px;
        font-size: 0.8rem;
        margin-bottom: 16px;
    }

    .selected-env-badge {
        padding: 5px 10px;
        font-size: 0.75rem;
        margin-bottom: 16px;
    }

    .loading {
        margin-top: 12px;
        font-size: 0.8rem;
    }

    .spinner {
        width: 20px;
        height: 20px;
        border-width: 2px;
    }
}

/* Very small mobile (max-width: 360px) */
@media (max-width: 360px) {
    body {
        padding: 10px;
    }

    .login-container {
        padding: 20px 16px;
    }

    h1 {
        font-size: 1.1rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .logo {
        width: 120px;
        height: 60px;
    }

    .env-option {
        padding: 10px 12px;
    }

    input[type="email"],
    input[type="password"] {
        padding: 9px 12px;
        font-size: 0.85rem;
    }

    .btn {
        padding: 9px;
        font-size: 0.85rem;
    }
}

/* Landscape mode for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 12px;
        align-items: flex-start;
    }

    .login-container {
        margin: 12px 0;
        padding: 20px;
    }

    .logo-section {
        margin-bottom: 16px;
    }

    .logo {
        width: 120px;
        height: 60px;
        margin-bottom: 8px;
    }

    h1 {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }

    .subtitle {
        margin-bottom: 16px;
    }

    .step-indicator {
        margin-bottom: 16px;
    }

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