@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-gold: #BC8E2C;      
    --primary-gold-hover: #A37B1F;
    --bg-body: #F1F3F6;          
    --bg-white: #ffffff;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --input-bg: #F4EBD0;        
    --border-color: #e5e7eb;
    --radius-card: 16px;
    --radius-input: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
}

.top-bar {
    padding: 15px 40px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background-color: var(--bg-white);
    z-index: 1000;
}

.back-link {
    font-weight: 600;
    color: var(--primary-gold);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-decoration: none;
}

.back-link i {
    color: var(--primary-gold);
    font-size: 14px;
}

.back-link:hover {
    color: var(--primary-gold);
    opacity: 1;
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 60px; 
}

.login-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-header {
    text-align: center;
    margin-bottom: 25px;
}

.page-header h1 {
    color: var(--primary-gold);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.toggle-container {
    background-color: #e6e2d6; 
    border-radius: 50px;
    padding: 4px;
    display: flex;
    width: 340px;
    margin-bottom: 30px;
}

.toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 50px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background-color: var(--bg-white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 600;
}

.login-card {
    background-color: var(--bg-white);
    border: 1px solid #d1d5db;
    border-radius: var(--radius-card);
    padding: 40px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.card-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input, 
.form-group input[type="text"], 
.form-group input[type="email"], 
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 14px 14px 40px;
    background-color: var(--input-bg) !important;
    border: 1px solid transparent;
    border-radius: var(--radius-input);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: 0.2s;
}

.form-row input {
    padding-left: 12px !important;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #888;
}

.show-pass-icon {
    position: absolute;
    right: 14px;
    color: #888;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    background-color: var(--primary-gold);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-input);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-gold-hover);
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    display: flex;
    align-items: center;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 10px;
    color: #9ca3af;
    font-size: 0.85rem;
}

.social-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.btn-social {
    flex: 1;
    background-color: white;
    border: 1px solid #d1d5db;
    padding: 12px;
    border-radius: var(--radius-input);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.forgot-pass {
    color: blue;
    text-decoration: underline;
}

.card-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.card-footer a {
    color: var(--text-dark);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 500px) {
    .form-row { flex-direction: column; gap: 20px; }
    .toggle-container { width: 100%; }
}

.custom-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
}

.custom-alert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-alert-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px 22px;
    position: relative;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    animation: alertPopIn 0.25s ease;
}

@keyframes alertPopIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-alert-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.custom-alert-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    background: #BC8E2C;
}

.custom-alert-box.success .custom-alert-icon {
    background: #22a06b;
}

.custom-alert-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.custom-alert-message {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6b7280;
    margin-bottom: 20px;
}

.custom-alert-btn {
    width: 100%;
    border: none;
    background: #BC8E2C;
    color: #fff;
    padding: 13px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.96rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.custom-alert-btn:hover {
    background: #A37B1F;
}

body.alert-open {
    overflow: hidden;
}

.g_id_signin {
    width: 100% !important;
}

.g_id_signin > div {
    width: 100% !important;
}

.social-buttons {
    display: block;
}

.google-btn-wrapper {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.2s;
}

.google-btn-wrapper:hover {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 2px rgba(188, 142, 44, 0.1);
}

@media (max-width: 500px) {
    .custom-alert-overlay {
        padding: 14px;
    }

    .custom-alert-box {
        max-width: 100%;
        border-radius: 16px;
        padding: 24px 18px 18px;
    }

    .custom-alert-title {
        font-size: 1.08rem;
    }

    .custom-alert-message {
        font-size: 0.92rem;
    }

    .custom-alert-icon {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }
}

.login-card {
    max-width: 420px;
    margin: auto;
    padding: 32px 28px;
    border-radius: 18px;
}

.login-card h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.login-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding: 13px 45px 13px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.2s;
}

.password-wrapper input:focus {
    border-color: #BF9225;
    box-shadow: 0 0 0 3px rgba(191, 146, 37, 0.12);
    outline: none;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 15px;
    transition: 0.2s;
}

.toggle-password:hover {
    color: #BF9225;
}

.btn-primary {
    width: 100%;
    margin-top: 10px;
    padding: 13px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    background: #BF9225;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    background: #a77d1d;
}

.back-btn-wrapper {
    margin-top: 18px;
    text-align: center;
}

.btn-back {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #BF9225;
    color: #BF9225;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.btn-back:hover {
    background: #BF9225;
    color: #fff;
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .login-card h2 {
        font-size: 24px;
    }
}