/* =========================================
    1. FONTS & VARIABLES
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;     /* Indigo */
    --primary-hover: #4338ca;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border-color: #d1d5db;
    --white: #ffffff;
    --input-height: 38px;     /* Compact Height (Pehle 45px tha) */
    --radius: 6px;            /* Thoda sharp corners (Professional look) */
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    background-image: radial-gradient(#a3a6ab 1px, transparent 1px);
    background-size: 24px 24px;
    overflow-x: hidden;
}

/* MASTER WRAPPER: Center Content */
.full-screen-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================
   2. CARD STYLING (Compact)
   ========================================= */
.auth-card {
    background: var(--white);
    border-radius: 12px;
    /* Shadow ko halka kiya */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0,0,0,0.05);
    
    /* PADDING UPDATE: Kafi kam kar diya (Compact) */
    padding: 1.5rem; 
    
    width: 100%;
    max-width: 380px; /* Thoda aur slim kiya */
    position: relative;
}

.auth-card.register-mode {
    max-width: 520px;
}

/* =========================================
   3. TYPOGRAPHY (Smaller & Cleaner)
   ========================================= */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem; /* Gap kam kiya */
}

.auth-title {
    margin: 0;
    font-size: 1.5rem; /* Font size reduced */
    font-weight: 700;
    color: var(--text-dark);
}

.auth-subtitle {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* =========================================
   4. INPUTS & ICONS (No Glare Focus)
   ========================================= */
.form-group {
    margin-bottom: 0.85rem; /* Input ke niche ka gap kam kiya */
}

.form-label {
    display: block;
    font-size: 0.8rem; /* Label chhota */
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Icon Wrapper */
.input-icon-wrapper {
    position: relative;
    width: 100%;
}

/* Icons */
.field-icon {
    position: absolute;
    left: 12px; /* Thoda left shift */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem; /* Icon size reduced */
    z-index: 10;
    pointer-events: none;
    transition: color 0.2s;
}

.password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 10;
    padding: 4px;
}

.password-toggle-icon:hover { color: var(--text-dark); }

/* Input Fields */
.form-control, .form-select {
    width: 100%;
    height: var(--input-height); /* 38px now */
    
    /* Padding adjustments for compact look */
    padding-left: 2.4rem !important; 
    padding-right: 0.75rem;
    
    font-size: 0.9rem;
    color: var(--text-dark);
    background-color: var(--white);
    
    /* Default simple border */
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out; /* Fast transition */
}

.form-control.has-toggle {
    padding-right: 2.4rem !important;
}

/* --- THE FIX: CLEAN FOCUS STATE --- */
.form-control:focus, .form-select:focus {
    outline: none;
    
    /* Sirf Border Color Change (No Shadow/Glow) */
    border-color: var(--primary);
    
    /* Shadow bilkul hata di taaki aankh me na chube */
    box-shadow: none; 
}

/* Icon color on focus (Subtle) */
.form-control:focus + .password-toggle-icon,
.input-icon-wrapper:focus-within .field-icon {
    color: var(--primary);
}

::placeholder { color: #9ca3af; font-size: 0.85rem; }

/* =========================================
   5. BUTTONS & UTILS
   ========================================= */
.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    width: 100%;
    height: var(--input-height);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    /* Remove default button shadow if any */
    box-shadow: none; 
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Forgot Password & Footer */
.forgot-link {
    float: right;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* Error Alerts Compact */
.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 0.5rem; /* Less padding */
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* =========================================
   6. GRID SYSTEM
   ========================================= */
.register-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 10px; /* Reduced gap */
}

@media (min-width: 768px) {
    .register-grid {
        grid-template-columns: 1fr 1fr;
        column-gap: 15px;
        row-gap: 10px;
    }
    .grid-full { grid-column: span 2; }
}