:root {
    --primary-color: #8b634b;
    --primary-hover: #8b634b;
    --bg-dark: #F5E6D3;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text-main: #3E2723;
    --text-muted: #8b634b;
    --border-color: rgba(139, 99, 75, 0.2);
    --danger: #d32f2f;
    --success: #388e3c;
    --warning: #f57c00;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(circle at top right, #fff3e0, #F5E6D3);
}

.auth-bg {
    background: url('https://images.unsplash.com/photo-1554118811-1e0d58224f24?q=80&w=2047&auto=format&fit=crop') no-repeat center center/cover;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.auth-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245, 230, 211, 0.8), rgba(255, 243, 224, 0.6));
    backdrop-filter: blur(5px);
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    animation: slideUp 0.6s ease-out forwards;
}

.form-wrapper.wide {
    max-width: 800px;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(to right, #8b634b, #D2691E);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 99, 75, 0.2);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(139, 99, 75, 0.3);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.checkbox-group input {
    width: auto;
    accent-color: var(--primary-color);
}

.flash-messages {
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease-in;
}

.alert-danger {
    background: rgba(254, 226, 226, 0.95);
    border: 1px solid var(--danger);
    color: #b91c1c;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.alert-success {
    background: rgba(220, 252, 231, 0.95);
    border: 1px solid var(--success);
    color: #15803d;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.alert-warning {
    background: rgba(254, 243, 199, 0.95);
    border: 1px solid var(--warning);
    color: #b45309;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.alert-info {
    background: rgba(224, 242, 254, 0.95);
    border: 1px solid #0284c7;
    color: #0369a1;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.password-strength {
    height: 4px;
    margin-top: 0.5rem;
    border-radius: 2px;
    background: #334155;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    text-align: right;
    color: var(--text-muted);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-hover);
}

.elegant-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--primary-color);
    margin: 2rem 0;
}

.divider-line {
    flex-grow: 1;
    max-width: 300px;
    border: none;
    border-top: 1px solid rgba(139, 99, 75, 0.2);
}


/* Progress Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 20px; /* Half of step-icon height */
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(139, 99, 75, 0.1);
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(139, 99, 75, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 700;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(139, 99, 75, 0.3);
}

.step.completed .step-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.step.completed .step-icon i {
    font-size: 0.9rem;
}

.step-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
}

.step.active .step-label {
    color: var(--primary-color);
}

/* Remove default browser eye icon for password inputs to prevent overlap with custom eye icon */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

input[type="password"]::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    position: absolute;
    right: 0;
}/* Full-width layout fixes */
.container-fluid, .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.main-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.navbar .container-fluid, .navbar .container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

@media (max-width: 767px) {
    .navbar .container-fluid, .navbar .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ── Branch Selection Modal — Premium Redesign ── */
.branch-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 8, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.branch-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.branch-modal-content {
    background: #fff;
    width: 95%;
    max-width: 440px;
    border-radius: 32px;
    padding: 0;
    text-align: center;
    box-shadow: 0 50px 120px rgba(0,0,0,0.22), 0 8px 32px rgba(93,64,55,0.12);
    transform: translateY(40px) scale(0.94);
    transition: all 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(201,169,110,0.15);
    overflow: hidden;
}

.branch-modal-overlay.show .branch-modal-content {
    transform: translateY(0) scale(1);
}

/* Top gold accent banner inside the modal */
.branch-modal-content::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #a8813a, #c9a96e, #a8813a);
    width: 100%;
}

/* Inner padding wrapper */
.branch-modal-inner {
    padding: 2.6rem 2.2rem 2.4rem;
}

/* Decorative icon badge */
.branch-modal-icon {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, #3E2723 0%, #5D4037 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    box-shadow: 0 10px 28px rgba(62,39,35,0.22);
    font-size: 1.55rem;
    color: #c9a96e;
}

.branch-modal-content h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 2rem;
    color: #1c110e;
    margin-bottom: 6px;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.branch-modal-content p.subtitle-main {
    font-size: 0.7rem;
    color: #c9a96e;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Gold divider line under subtitle */
.branch-modal-divider {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a96e, transparent);
    margin: -1.2rem auto 1.8rem;
    border-radius: 2px;
}

.branch-select-wrapper {
    position: relative;
    margin-bottom: 1.2rem;
}

.branch-select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    background: #fdfaf7;
    border: 1.5px solid rgba(139, 99, 75, 0.18);
    border-radius: 14px;
    padding: 0.85rem 2.8rem 0.85rem 1.1rem;
    width: 100%;
    font-size: 0.92rem;
    color: #3E2723;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(93,64,55,0.04);
    font-family: 'Inter', sans-serif;
}

.branch-select-wrapper select:focus {
    outline: none;
    border-color: #c9a96e;
    box-shadow: 0 0 0 3px rgba(201,169,110,0.14);
    background: #fff;
}

.branch-select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #c9a96e;
    pointer-events: none;
    font-size: 0.78rem;
}

.btn-branch-confirm {
    background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(62,39,35,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.2rem;
}

.btn-branch-confirm:hover {
    background: linear-gradient(135deg, #4a3028 0%, #2d1e1a 100%);
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(62,39,35,0.28);
}

.btn-branch-confirm:active {
    transform: translateY(-1px);
}

.branch-modal-footnote {
    font-size: 0.74rem;
    color: #A1887F;
    line-height: 1.6;
    font-style: italic;
    margin: 0;
}

@media (max-width: 768px) {
    .branch-modal-inner {
        padding: 2.2rem 1.6rem 2rem;
    }
    .branch-modal-content h2 {
        font-size: 1.75rem;
    }
}
