@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: #f8fafc;
}

.main-container {
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 560px;
    position: relative;
    z-index: 10;
}

.header-section {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: #037ebf;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3), 0 0 10px rgba(3,126,191,0.2);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.divider {
    width: 80px;
    height: 2px;
    background-color: #037ebf;
    margin: 0 auto 15px;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(3,126,191,0.3);
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: #037ebf;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2), 0 0 8px rgba(3,126,191,0.15);
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    padding: 40px;
    border-top: 4px solid #60a5fa;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 128px;
    height: 128px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), transparent);
    border-radius: 50%;
    transform: translate(64px, -64px);
}

.login-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 96px;
    height: 96px;
    background: linear-gradient(45deg, rgba(147, 197, 253, 0.15), transparent);
    border-radius: 50%;
    transform: translate(-48px, 48px);
}

.tabs-container {
    display: flex;
    background: linear-gradient(90deg, #f8fafc, #f1f5f9);
    border: 1px solid rgba(229, 231, 235, 0.7);
    border-radius: 12px;
    padding: 4px;
    gap: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 40px;
    position: relative;
    z-index: 10;
    overflow: hidden;
    flex-wrap: nowrap;
    backdrop-filter: blur(6px);
}

.tab {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.tab-active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    transform: translateY(-1px);
}

.tab-inactive {
    background: rgba(248, 250, 252, 0.8);
    color: #475569;
    backdrop-filter: blur(8px);
}

.tab-inactive:hover {
    background: rgba(241, 245, 249, 0.9);
    color: #334155;
    transform: translateY(-0.5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px;
    display: inline-block;
}
.tab svg *, .tab svg path, .tab svg circle, .tab svg rect, .tab svg line, .tab svg polyline, .tab svg polygon {
    stroke: currentColor;
    stroke-width: 2.2;
}

/* Ensure SVG icons remain visible on all tab states */
.tab-active svg {
    color: #ffffff;
}
.tab-inactive svg {
    color: #475569;
    opacity: 0.95;
}

.form-container {
    position: relative;
    z-index: 10;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #6b7280;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.forgot-password {
    text-align: right;
    margin-bottom: 24px;
}

.forgot-password a {
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: #1d4ed8;
}

.login-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.login-button::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.5s;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 35px rgba(2, 132, 199, 0.5);
}

.register-section {
    text-align: center;
}

.register-section p {
    font-size: 14px;
    color: #6b7280;
}

.register-section a {
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.register-section a:hover {
    color: #1d4ed8;
}

/* Error Message */
.err {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #fecaca;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .login-card {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    /* Mobile tabs fix */
    .tabs-container {
        flex-wrap: wrap;
        gap: 4px;
        padding: 3px;
    }
    
    .tab {
        flex: 1 1 calc(33.333% - 4px);
        min-width: 100px;
        padding: 10px 8px;
        font-size: 12px;
        gap: 4px;
    }
    
    .tab svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px;
    }
}

@media (max-width: 360px) {
    /* Extra small screens */
    .tab {
        flex: 1 1 100%;
        min-width: auto;
        padding: 12px 16px;
        font-size: 13px;
        gap: 8px;
    }
    
    .tab svg {
        width: 18px !important;
        height: 18px !important;
        flex: 0 0 18px;
    }
}
