:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fff4ed;
    --primary-50: #fff7f3;
    --primary-100: #ffe8db;
    --primary-200: #ffc8aa;
    --primary-300: #ffa078;
    --primary-400: #ff7a4a;
    --primary-500: #f97316;
    --primary-600: #ea580c;
    --primary-700: #c9450a;

    --bg-white: #ffffff;
    --surface-card: rgba(255, 255, 255, 0.98);
    --text-main: #1e1b1b;
    --text-secondary: #5c5552;
    --text-muted: #8f8885;
    --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 8px 30px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --transition-smooth: cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

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

 body {
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-color: #2f211c;
    background-image: url('/css/loginbg.jpg');
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

body.register-page {
    background-image: url('/css/reg.png');
}

/* Overlay color using pseudo-element */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
     background: rgba(0, 0, 0, 0.60);
    pointer-events: none;
    z-index: 0;
}

.login-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.hero-section {
    flex: 1;
    background: transparent;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.logo-wrapper {
    margin-bottom: 60px;
}

.logo-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #f97316, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content {
    flex: 0 0 auto;
    margin-top: 100px;
}

.hero-title {
    font-size: 60px;
    font-weight: 800;
    line-height: 1.2;
    color: white;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-title span {
    background: linear-gradient(135deg, #f97316, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    max-width: 90%;
}

.auth-card {
    width: 60%;
    max-width: 750px;
    background: white;
    border-top-left-radius: 68px;
    border-bottom-left-radius: 68px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    position: relative;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.08);
    min-height: 100vh;
}

.form-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a2a36;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.form-header p {
    font-size: 15px;
    color: #6b7a8a;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.name-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.password-requirements {
    margin: -2px 0 0;
    padding: 0;
    list-style: none;
    color: #8f8885;
    font-size: 13px;
    line-height: 1.5;
}

.password-requirements li::before {
    content: '•';
    margin-right: 6px;
}

.password-requirements li.is-valid {
    color: #16a34a;
}

.field-error {
    color: #dc2626;
    font-size: 13px;
}
.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #b9c2ce;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.input-icon-wrapper:focus-within .input-icon {
    color: #f97316;
}

/* Input field with left padding for icon */
.input-with-icon {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1.5px solid #e8edf2;
    border-radius: 14px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

/* Special right padding for password eye button */
.input-with-icon.password-field {
    padding-right: 48px;
}

.input-with-icon:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.input-with-icon:hover {
    border-color: #f97316;
    background: #fff7f3;
}

/* ===== STYLING AUTOCOMPLETE / AUTOFILL ===== */
/* Change autofill background color */
.input-with-icon:-webkit-autofill,
.input-with-icon:-webkit-autofill:hover,
.input-with-icon:-webkit-autofill:focus,
.input-with-icon:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #fff7f3 inset !important;
    -webkit-text-fill-color: #1a2a36 !important;
    caret-color: #f97316 !important;
    border-color: #f97316 !important;
}

/* Style text selection inside inputs */
.input-with-icon::selection {
    background: #f97316;
    color: white;
}

.input-with-icon::-moz-selection {
    background: #f97316;
    color: white;
}

/* Style autocomplete suggestions dropdown (limited browser support) */
input::-webkit-calendar-picker-indicator {
    filter: invert(0.5);
}

/* For date/number inputs spinner - optional */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    opacity: 0.5;
}

/* Eye toggle button */
.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #a0abb8;
    font-size: 1.1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 3;
}

.toggle-password:hover {
    color: #f97316;
}

.toggle-password:focus {
    outline: none;
}

/* Label remains clean */
.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    display: block;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 20px;
}

.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7a8a;
}

.checkbox-modern input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #f97316;
}

.forgot-link {
    color: #f97316;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #ea580c;
    text-decoration: underline;
}


.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #ea580c, #c9450a);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.signup-prompt {
    text-align: center;
    margin-top: auto;
    padding-top: 32px;
    padding-bottom: 0;
    font-size: 14px;
    color: #7a8a9a;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

.signup-prompt a {
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.signup-prompt a:hover {
    color: #ea580c;
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.alert-danger ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.alert-danger li {
    color: #dc2626;
    font-size: 14px;
}

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

.hero-section,
.auth-card {
    animation: fadeIn 0.6s ease-out;
}

@media (max-width: 1200px) {
    .auth-card {
        width: 48%;
        padding: 48px 40px;
    }
}

@media (max-width: 1100px) {
    .hero-section {
        padding: 40px 32px;
    }
    .auth-card {
        width: 50%;
        padding: 40px 32px;
    }
    .hero-title {
        font-size: 42px;
    }
}

@media (max-width: 900px) {
    .login-layout {
        flex-direction: column;
    }
    .hero-section {
        padding: 48px 40px;
    }
    .auth-card {
        width: 100%;
        max-width: 100%;
        border-top-left-radius: 32px;
        border-bottom-left-radius: 0;
        border-top-right-radius: 32px;
        padding: 48px 40px;
        min-height: auto;
    }
    .hero-title {
        font-size: 38px;
    }
    .form-container {
        max-width: 440px;
    }
}

@media (max-width: 600px) {
    .hero-section {
        padding: 32px 24px;
    }
    .auth-card {
        padding: 40px 24px;
    }
    .hero-title {
        font-size: 32px;
    }
    .form-container {
        max-width: 100%;
    }
    .form-header h2 {
        font-size: 28px;
    }
    .name-fields {
        grid-template-columns: 1fr;
    }
}
