* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
}

.reg_agreement {
    margin-top: 15px;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.reg_agreement a {
    color: #666;
    text-decoration: underline;
    font-weight: bold;
}

.page-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-section {
    flex: 1;
    background-color: black;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.top-section h1 {
    font-size: 3rem;
    font-weight: bold;
}

.bottom-section {
    flex: 1;
    background-color: white;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
}

.bottom-section p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
}
.bottom-section p a {
    color: #333;
    text-decoration: underline;
    font-weight: bold;
}

.start-label {
    position: absolute;
    left: 50%;
    bottom: -24px;
    transform: translateX(-50%);
    height: 48px;
    line-height: 48px;
    background: rgba(51, 51, 51, 0.9);
    color: white;
    padding: 0 25px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.start-label:hover {
    transform: translateX(-50%) scale(1.03);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: black;
    border: 2px solid white;
    border-radius: 0;
    padding: 50px 30px 30px 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    position: relative;
    color: white;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    line-height: 1;
    z-index: 10;
}

.close-btn:hover {
    color: white;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #ccc;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #444;
    border-radius: 0;
    background: #ddd;
    color: black;
    font-size: 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-input::placeholder {
    color: #666;
}

.form-input:focus {
    border-color: white;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.2);
}

.fingerprint-section {
    text-align: center;
    margin: 20px 0;
}

.fingerprint-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4a90e2, #357abd);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0 auto;
    display: block;
}

.fingerprint-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

.fingerprint-text {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #666;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    border: 2px solid #666;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #555 0%, #777 100%);
    border-color: #888;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.btn-secondary {
    width: 100%;
    padding: 15px;
    background: transparent;
    color: #ccc;
    border: 2px solid #444;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    background: #333;
    border-color: #666;
    color: white;
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #444;
    z-index: 1;
}

.divider span {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.request-form {
    display: none;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.back-link:hover {
    color: white;
    text-decoration: underline;
}

.pin-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 8px;
    font-weight: bold;
    border-color: #555;
}

.pin-input::placeholder {
    letter-spacing: 4px;
    font-size: 1.2rem;
    color: #555;
}

.remember-me-section {
    margin: 20px 0 25px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.remember-me-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #666;
    cursor: pointer;
}

.remember-me-label {
    color: #aaa;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.remember-me-label:hover {
    color: #ccc;
}

.login-type-header {
    display: flex;
    margin-bottom: 20px;
    border: 2px solid #444;
    border-radius: 0;
    overflow: hidden;
    background: #222;
}

.login-type-btn {
    flex: 1;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    background: #222;
    color: #aaa;
    border: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-type-btn:hover {
    background: #333;
    color: #ccc;
}

.login-type-btn.active {
    background: #444;
    color: white;
    border-left: 3px solid #666;
    border-right: 3px solid #666;
}

.login-type-btn.active:first-child {
    border-left: none;
}

.login-type-btn.active:last-child {
    border-right: none;
}

@media (max-width: 768px) {
    .page-container {
        height: 100vh;
    }

    .top-section h1 {
        font-size: 2rem;
    }

    .bottom-section p {
        font-size: 1rem;
    }

    .start-label {
        font-size: 1.1rem;
        height: 40px;
        line-height: 40px;
        padding: 0 18px;
        bottom: -20px;
    }

    .modal-content {
        margin: 15px;
        padding: 40px 20px 25px 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .close-btn {
        font-size: 2rem;
        top: 8px;
        right: 12px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .modal-overlay {
        padding: 5px;
        overflow-y: auto;
        align-items: flex-start;
    }

    .modal-content {
        margin: 5px auto;
        max-height: calc(100vh - 10px);
        overflow-y: auto;
        padding: 25px 20px 20px 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px;
        margin-bottom: 15px;
    }

    .divider {
        margin: 15px 0;
    }

    .close-btn {
        font-size: 1.8rem;
        top: 5px;
    }
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff4444;
    color: #ff6666;
    padding: 10px;
    border-radius: 0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.account-select-form {
    display: none;
}

.account-select-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #ccc;
}

.account-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 55vh;
    overflow-y: auto;
}

.account-item {
    background: #222;
    border: 2px solid #444;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.account-item:hover {
    background: #333;
    border-color: #666;
}

.account-item.selected {
    border-color: #888;
    background: #3a3a3a;
}

.account-name {
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.account-role {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-role.role-owner {
    color: #6a9;
}

.account-role.role-admin {
    color: #96a;
}

.account-role.role-agent {
    color: #a96;
}

.account-own-label {
    font-size: 0.8rem;
    color: #6a9;
    margin-top: 4px;
}

.phone-display {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.phone-display span {
    display: block;
    font-size: 1.2rem;
    color: white;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.change-phone-link {
    color: #888;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.change-phone-link:hover {
    color: #ccc;
    text-decoration: underline;
}

.forgot-pin {
    text-align: center;
    margin-top: 15px;
}

.forgot-pin-link {
    color: #888;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-pin-link:hover {
    color: #ccc;
    text-decoration: underline;
}

.resend-section {
    text-align: center;
    margin-top: 20px;
}

#resendTimer {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.resend-btn {
    background: transparent;
    border: 1px solid #555;
    color: #888;
    padding: 10px 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.resend-btn:hover:not(:disabled) {
    background: #333;
    border-color: #777;
    color: #ccc;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}