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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    min-height: 100vh;
    color: #1c1e21;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* Header */
.header {
    background-color: #4267b2;
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 150px;
}

/* GPS Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.overlay-content {
    background: white;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.location-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #e7f3ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-icon svg {
    width: 40px;
    height: 40px;
    color: #1877f2;
}

.overlay-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1c1e21;
}

.overlay-content p {
    font-size: 15px;
    color: #65676b;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Buttons */
.btn-primary {
    background-color: #1877f2;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #166fe5;
}

.btn-primary:active {
    background-color: #1565d8;
}

.btn-primary:disabled {
    background-color: #bec3c9;
    cursor: not-allowed;
}

/* Main Content */
.main-container {
    flex: 1;
    padding-top: 60px;
}

.container {
    min-height: calc(100vh - 60px - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.form-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.form-header {
    padding: 20px 20px 0;
    border-bottom: 1px solid #dadde1;
    padding-bottom: 20px;
}

.form-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-header p {
    font-size: 13px;
    color: #65676b;
    line-height: 1.4;
}

form {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1c1e21;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 45px 12px 12px;
    font-size: 16px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f5f6f7;
}

.input-wrapper input:focus {
    border-color: #1877f2;
    box-shadow: 0 0 0 2px #e7f3ff;
    background-color: white;
}

/* Input without toggle button */
.form-group:first-child .input-wrapper input {
    padding-right: 12px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password .eye-icon {
    width: 20px;
    height: 20px;
    color: #65676b;
}

.toggle-password.active .eye-icon {
    color: #1877f2;
}

/* Error and Success Messages */
.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

.success-message {
    color: #42b72a;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

.btn-submit {
    margin-top: 8px;
}

/* Footer */
.footer {
    background-color: white;
    border-top: 1px solid #dadde1;
    padding: 20px 0;
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-bottom: 10px;
}

.footer-links a {
    color: #8a8d91;
    text-decoration: none;
    font-size: 11px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-divider {
    height: 1px;
    background-color: #dadde1;
    margin: 10px 0;
}

.footer-copyright {
    color: #8a8d91;
    font-size: 11px;
    margin-top: 15px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .header {
        padding: 8px 0;
    }

    .logo img {
        height: 32px;
    }

    .overlay-content {
        padding: 30px 20px;
    }

    .location-icon {
        width: 70px;
        height: 70px;
    }

    .location-icon svg {
        width: 35px;
        height: 35px;
    }

    .overlay-content h2 {
        font-size: 18px;
    }

    .overlay-content p {
        font-size: 14px;
    }

    .form-card {
        border-radius: 0;
        box-shadow: none;
    }

    .container {
        padding: 0;
        align-items: flex-start;
        min-height: auto;
    }

    .main-container {
        padding-top: 50px;
    }

    .form-header h1 {
        font-size: 18px;
    }

    .footer {
        padding: 15px 0;
    }

    .footer-links {
        gap: 6px 12px;
    }

    .footer-links a {
        font-size: 10px;
    }
}

/* Very small screens */
@media (max-width: 350px) {
    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }

    .input-wrapper input {
        padding: 10px 40px 10px 10px;
        font-size: 14px;
    }

    .logo img {
        height: 28px;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}
